Skip to content
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

Merged
merged 1 commit into from
Apr 28, 2014
Merged

Add a preference to set the sidebarView on load #4669

merged 1 commit into from
Apr 28, 2014

Conversation

Snuffleupagus
Copy link
Collaborator

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.

@Snuffleupagus
Copy link
Collaborator Author

/botio-windows preview

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_preview from @Snuffleupagus received. Current queue size: 0

Live output at: http://107.22.172.223:8877/8b99767c1709cff/output.txt

@@ -21,7 +21,7 @@
var DEFAULT_PREFERENCES = {
showPreviousViewOnLoad: true,
defaultZoomValue: '',
ifAvailableShowOutlineOnLoad: false,
sidebarViewOnLoad: -1,
Copy link
Contributor

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@yurydelendik
Copy link
Contributor

/botio-windows preview

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_preview from @yurydelendik received. Current queue size: 0

Live output at: http://107.22.172.223:8877/3ff5a4a66aacdb0/output.txt

@@ -20,6 +20,12 @@

//#include default_preferences.js

var sidebarView = {
Copy link
Contributor

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@yurydelendik
Copy link
Contributor

Looks good when comment above is fixed.

@yurydelendik
Copy link
Contributor

Good to land after the commits squashing

@timvandermeij
Copy link
Contributor

@Snuffleupagus Could you rebase this?

@timvandermeij
Copy link
Contributor

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 0

Live output at: http://107.21.233.14:8877/8ba052b1a92d9d6/output.txt

timvandermeij added a commit that referenced this pull request Apr 28, 2014
Add a preference to set the sidebarView on load
@timvandermeij timvandermeij merged commit 32a327b into mozilla:master Apr 28, 2014
@timvandermeij
Copy link
Contributor

Thank you!

@Snuffleupagus Snuffleupagus deleted the sidebar-pref branch April 28, 2014 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants