pdfViewer overhaul, page navigator rework, seo metadata,ui polish#751
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
what changed
seo metadata for pdf pages
generateMetadatatoapp/home/[id]/pdf/[pdfId]/page.tsxso pdf pages get a proper<title>server-sidepdfIdfrom either the query param or the route segment, fetches the pdf viafetchQuerywith the convex auth token, and returns a title like"{pdf.title} - Notevo""PDF - Notevo"if the id is missing or the fetch throwsdocument.titleuseEffectinPdfViewerPageClientsince this is now handled server-side at the metadata level, which is cleaner and works before the client hydratespage navigator rework
type="number"with native spin buttons hidden via css (-webkit-appearance: noneand-moz-appearance: textfieldinglobals.css) no more manual regex replacing on every keystrokehandlePreviousPage/handleNextPagehelpers with proper bounds checks instead of callingjumpToPageinline with no guarde.currentTarget.blur()which triggers the blur handler, removing duplicate commit logictotalPagesrenamed topagesand guarded with|| 1in the "of N" display so it doesn't flash "of undefined" while the pdf is loading!rounded-fullto default border radius to stay consistent with the rest of the toolbarfocus-visible:ring-0andfocus-visible:ring-offset-0so it doesn't show a focus ring inside the toolbarpdf viewer layout
fixed right-2.5 top-[4.4rem]toabsolute inset-x-0 top-1centered it now floats above the pdf content rather than being anchored to the viewport corner, so it doesn't overlap the sidebar trigger or headerpx-3 py-1.5topx-0.5 py-0.5and border radius bumped toapp-radius-lgfor a tighter, more pill-like lookPagescomponent wrapped in a positioneddivcentered vertically in the shell, removing the previoush-full min-h-0approach that was causing layout issues in some casesz-20toz-50so they render above the centered pages wrapperborder-l-0since they're flush against the left edge and the left border was doubling with the shell borderPdfViewerShellroot element changed torelative h-full w-full flex flex-col justify-stretchandzoomOptionsadded withminZoom: 0.5andmaxZoom: 10142pxto150pxand horizontal padding bumped topx-3for better thumbnail spacingborder-l-0 border-bordersince the panel background handles the visual separationPlusandMinusicons imported (likely for a zoom control that's partially in flight)LectorSearchloading state getsw-fullso it fills the horizontal space correctlymisc
-right-[1px]to fix a subpixel gap that was showing between the handle and the sidebar edgeglobals.cssin a previous commit (and re-removed since it came back)