-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Add a preference to set the sidebarView on load #4669
Conversation
/botio-windows preview |
From: Bot.io (Windows)ReceivedCommand cmd_preview from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.22.172.223:8877/8b99767c1709cff/output.txt |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/8b99767c1709cff/output.txt Total script time: 0.48 mins Published
|
@@ -21,7 +21,7 @@ | |||
var DEFAULT_PREFERENCES = { | |||
showPreviousViewOnLoad: true, | |||
defaultZoomValue: '', | |||
ifAvailableShowOutlineOnLoad: false, | |||
sidebarViewOnLoad: -1, |
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.
Can we change the default one to 0? We can define our own enumeration for this: 1-thumbs, 2-outline, 3-attachments
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.
Done.
/botio-windows preview |
From: Bot.io (Windows)ReceivedCommand cmd_preview from @yurydelendik received. Current queue size: 0 Live output at: http://107.22.172.223:8877/3ff5a4a66aacdb0/output.txt |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/3ff5a4a66aacdb0/output.txt Total script time: 0.31 mins Published
|
@@ -20,6 +20,12 @@ | |||
|
|||
//#include default_preferences.js | |||
|
|||
var sidebarView = { |
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.
uppercase this name: 'SidebarView'
Could you also add one entry for 0, e.g. NONE
?
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.
Done.
Looks good when comment above is fixed. |
Good to land after the commits squashing |
@Snuffleupagus Could you rebase this? |
/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/8ba052b1a92d9d6/output.txt |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/8ba052b1a92d9d6/output.txt Total script time: 0.37 mins Published
|
Add a preference to set the sidebarView on load
Thank you! |
As promised in #4329 (diff), this PR adds a preference (
sidebarViewOnLoad
) that enables the user to choose if (and with what view) the sidebar should be opened when the viewer loads.This PR thus removes one of the current prefs (
ifAvailableShowOutlineOnLoad
) in favour of the new one. Furthermore it also re-factors the way that the sidebar is opened, to avoid duplicating code in multiple places (hence the multiple commits).As a follow-up to this PR, I'm thinking that it could be a good idea to add a Wiki page describing the available preferences. The reason that I didn't do so after support for preferences initially landed, is that I didn't want to advertise this feature too much until:
a) The actual preference implementation had stabilized.
b) We had more preferences available, and the names had stabilized.
c) Until the preferences made their way into Firefox.