feat: pdf viewer swap & flicker problem fix#489
Open
Gslmao wants to merge 8 commits intoCodeChefVIT:stagingfrom
Open
feat: pdf viewer swap & flicker problem fix#489Gslmao wants to merge 8 commits intoCodeChefVIT:stagingfrom
Gslmao wants to merge 8 commits intoCodeChefVIT:stagingfrom
Conversation
Collaborator
|
remove the oldPdf Viewer if it is not used anymore |
Collaborator
|
Great ! flickering issue is solved. If wheel handler is removed, then try adding embedpdf's built in support for that. |
YOGESH-08
reviewed
Apr 12, 2026
Comment on lines
+34
to
+38
| function useBreakpoint() { | ||
| const [width, setWidth] = useState(() => window.innerWidth); | ||
|
|
||
| useEffect(() => { | ||
| setWidth(window.innerWidth); |
Collaborator
There was a problem hiding this comment.
initialize it with a constant and then update it using useEffect
Collaborator
|
update ur PR title |
Collaborator
|
why report button is enlarged a bit ? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
📌 Purpose
Migrates the PDF viewer from react-pdf to embedpdf with the Pdfium WASM engine for improved rendering performance and a more modular plugin architecture.
Corresponding issue: closes #472
🖼️ Showcase
Desktop View

Desktop view fullscreen

Mobile View

Mobile View Fullscreen

🔧 Changes
react-pdffor embedpdf with viewport, scroll, zoom, render, document manager, and export plugins.pageRefsscroll tracking,offsetTopmath, and thewheelevent handler.Controlscomponent. Added auseBreakpointhook to handle responsive layout, consolidating the three previously duplicated toolbar variants (mobile, desktop, fullscreen) into one component with a resolved layout per breakpoint.toggleFullscreen,handleDownload, and the plugins array are all stabilised withuseCallback/useMemoto prevent unnecessary re-renders of the memoisedControls.➕ Additional Notes