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

feat(viewer): Improve UX #2693

Merged
merged 6 commits into from
Jan 15, 2025
Merged

feat(viewer): Improve UX #2693

merged 6 commits into from
Jan 15, 2025

Conversation

Merkur39
Copy link
Member

@Merkur39 Merkur39 commented Jan 10, 2025

This PR improves the UX on the Viewer.

  • Adjustment of the number of pages(40) to display the PDF in scroll mode (+ addition of a file weight constraint(10MB)).
    • As a reminder, react-pdf uses web workers.
  • Possibility of typing the page number (in page-by-page mode) in the small toolbar.
  • Hide toolbar after a short period of inactivity(1s). Unless cursor is over or page number edit field is in focus.

image

@Merkur39 Merkur39 force-pushed the feat/improve-viewer branch 4 times, most recently from 0782c37 to 193a69d Compare January 14, 2025 16:32
@Merkur39 Merkur39 marked this pull request as ready for review January 15, 2025 08:32
@Merkur39 Merkur39 force-pushed the feat/improve-viewer branch from 99b7fc8 to 49658f3 Compare January 15, 2025 08:33
The ratio is now calculated by react-pdf.
The size of the vertical scrollbar must be subtracted
from the maximum page size.
@Merkur39 Merkur39 force-pushed the feat/improve-viewer branch from 49658f3 to 0f3fbe8 Compare January 15, 2025 09:04
@Merkur39 Merkur39 force-pushed the feat/improve-viewer branch from 0f3fbe8 to 04c2013 Compare January 15, 2025 09:30
After a few tests, the limit of 40 pages and a weight
of less than 15MB seems acceptable.
To be approved and adjusted if necessary.
The style is intentionally non-dynamic,
because the Viewer UI must remain dark whatever the theme.
@Merkur39 Merkur39 force-pushed the feat/improve-viewer branch from 04c2013 to b22d6b2 Compare January 15, 2025 11:20
@Merkur39 Merkur39 merged commit 5f6008d into master Jan 15, 2025
2 checks passed
@Merkur39 Merkur39 deleted the feat/improve-viewer branch January 15, 2025 11:38
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.

2 participants