PDF Reader: Continuous Scroll #280 #288
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What?
Loaded all the PDF pages and changed the page number based on what page number is being viewed
Why?
Small change with the PDF Reader to get myself familiar with the frontend and the project.
How?
Modified the component to load a local pdf on my computer
Mapped component to the amount of pages in the pdf
Used intersection observer to figure out what page is being currently viewed in the browser.
Testing?
Only did local testing by rendering the component against a downloaded pdf on my computer. see screenshot below.
Did not get to set up docker instance to test against prod, so that still needs to be tested.
Anything Else?
I have prettier to auto format the code, but I reverted the auto format so that this PR diff would be less noisy. Probably worth to set up a similar system.
Equally so, ESLint would probably help with highlighting some dead code.
Storybook would help with developing components in isolation. it would help unlink some of the project setup from the UI work.
Equally so (or as a alternative), using MSW to mock API calls would help out.
I only did part 1 of this issue because I wasn't sure on the design decision; Based on the design direction, I probably would pull some other component libraries in.
Screenshots?