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

Somehow store whether the contents/thumbnail sidebar is open #6935

Closed
ghost opened this issue Jan 29, 2016 · 6 comments
Closed

Somehow store whether the contents/thumbnail sidebar is open #6935

ghost opened this issue Jan 29, 2016 · 6 comments

Comments

@ghost
Copy link

ghost commented Jan 29, 2016

Proposal for a small UX enhancement:

I just had the experience that I:

  1. opened a PDF file
  2. opened the contents sidebar
  3. navigated away from the PDF by clicking a link in it
  4. navigated back to the PDF by clicking the browser's Back button

Result: the contents sidebar is not open anymore.

I think this issue might be solved relatively easily by adding #sidebar-content/#sidebar-thumbs to the URL when the sidebar is open. (And then of course changing the UI depending on that.)

But there might be better ways.

@timvandermeij
Copy link
Contributor

Might be fixed in a similar way as #5949.

@ankitaggarwal011
Copy link
Contributor

Anyone working on this? If no, I would like to try to fix this issue. Thanks!

@brendandahl
Copy link
Contributor

Anyone working on this?

Not that I know of, feel free to take it on!

@ankitaggarwal011
Copy link
Contributor

Thanks @brendandahl, since the user moves away from the PDF in this issue, would it be good idea to store the state of sidebar (openSidebar variable) in the local-storage of the browser and initialize sidebarOpen variable in viewer.js from local-storage if available. What do you think? Please let me know.

@brendandahl
Copy link
Contributor

We have code already built to persistently store preferences. As Tim suggested above, this will be very similar to the fix in #6980 and I'd suggest looking at that.

@ankitaggarwal011
Copy link
Contributor

Thanks. I will have a look and try to make the changes locally.

Update:
I have made the changes locally, I have tested them and are working as intended. It passes all the unit tests. I am opening a PR for the same. Please review the changes. Thanks.

ankitaggarwal011 added a commit to ankitaggarwal011/pdf.js that referenced this issue Feb 19, 2016
Persist the state of content sidebar while browsing away from viewer and
initialzing the same on returning back to the viewer. The state is saved
in persistent store preferences and used upon viewer initialization.

Fixes mozilla#6935
ankitaggarwal011 added a commit to ankitaggarwal011/pdf.js that referenced this issue Feb 19, 2016
Persist the state of content sidebar while browsing away from viewer and
initializing the same on returning back to the viewer. The state is saved
in persistent store preferences and used upon viewer initialization.

Fixes mozilla#6935
ankitaggarwal011 added a commit to ankitaggarwal011/pdf.js that referenced this issue Feb 20, 2016
Persist the state of content sidebar while browsing away from viewer and
initializing the same on returning back to the viewer. The state is saved
in persistent store preferences and used upon viewer initialization.

Fixes mozilla#6935
ankitaggarwal011 added a commit to ankitaggarwal011/pdf.js that referenced this issue Feb 28, 2016
Persist the state of content sidebar while browsing away from viewer and
initializing the same on returning back to the viewer. The state is saved
in persistent store preferences and used upon viewer initialization.

Fixes mozilla#6935
ankitaggarwal011 added a commit to ankitaggarwal011/pdf.js that referenced this issue Mar 24, 2016
Persist the state of content sidebar while browsing away from viewer and
initializing the same on returning back to the viewer. The state is saved
in persistent store preferences and used upon viewer initialization.

Fixes mozilla#6935
ankitaggarwal011 added a commit to ankitaggarwal011/pdf.js that referenced this issue Apr 13, 2016
Persist the state of content sidebar while browsing away from viewer and
initializing the same on returning back to the viewer. The state is saved
in persistent store preferences and used upon viewer initialization.

Fixes mozilla#6935
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants