-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Refactor document properties overlay #5959
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor document properties overlay #5959
Conversation
@Snuffleupagus Thank you for the thorough review! I will make the changes in a new set of commits. |
a5fee36
to
c02c33d
Compare
This patch: - Puts public methods at the top of the file - Puts private methods below the public methods and marks them with an underscore - Adds JSDoc comments to the class - Adds setDocumentAndUrl to avoid having to handle that in `viewer.js`
c02c33d
to
7c04ee2
Compare
this.pdfDocument = null; | ||
|
||
// Bind the event listener for the Close button. | ||
if (options.closeButton) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about not catching this earlier, but the button is missing from the JSDoc comment above. {HTMLButtonElement}
would probably be an OK type to use.
The PR is good to go once this is addressed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in the most recent commit.
This patch: - Simplifies the way fields are passed to the document properties overlay - Simplifies the way fields are filled internally in the document properties overlay - Avoids passing a document properties reference to the secondary toolbar
7c04ee2
to
6abf3d6
Compare
/botio-linux preview |
From: Bot.io (Linux)ReceivedCommand cmd_preview from @timvandermeij received. Current queue size: 0 Live output at: http://107.21.233.14:8877/70271673518e5ff/output.txt |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/70271673518e5ff/output.txt Total script time: 0.80 mins Published |
Looks great, thank you! |
Refactor document properties overlay
This PR follows a similar pattern as other refactoring patches. The aim here is to make the document properties code more class-like, simplifying field passing/handling and avoiding passing a reference to the secondary toolbar.
Using the
?w=1
URL parameter makes review easier.