Skip to content

pdfViewer overhaul, page navigator rework, seo metadata,ui polish#751

Merged
moehdotdev merged 1 commit into
mainfrom
home-uiux-changes
May 14, 2026
Merged

pdfViewer overhaul, page navigator rework, seo metadata,ui polish#751
moehdotdev merged 1 commit into
mainfrom
home-uiux-changes

Conversation

@moehdotdev

Copy link
Copy Markdown
Member

what changed

seo metadata for pdf pages

  • added generateMetadata to app/home/[id]/pdf/[pdfId]/page.tsx so pdf pages get a proper <title> server-side
  • it resolves the pdfId from either the query param or the route segment, fetches the pdf via fetchQuery with the convex auth token, and returns a title like "{pdf.title} - Notevo"
  • falls back to "PDF - Notevo" if the id is missing or the fetch throws
  • removed the old document.title useEffect in PdfViewerPageClient since this is now handled server-side at the metadata level, which is cleaner and works before the client hydrates

page navigator rework

  • switched the page input from a plain text input with manual digit-stripping to type="number" with native spin buttons hidden via css (-webkit-appearance: none and -moz-appearance: textfield in globals.css) no more manual regex replacing on every keystroke
  • prev/next buttons extracted into handlePreviousPage / handleNextPage helpers with proper bounds checks instead of calling jumpToPage inline with no guard
  • on blur, jumps to the entered page if it's in range, otherwise resets to the current page same behavior but cleaner
  • enter key now just calls e.currentTarget.blur() which triggers the blur handler, removing duplicate commit logic
  • totalPages renamed to pages and guarded with || 1 in the "of N" display so it doesn't flash "of undefined" while the pdf is loading
  • prev/next buttons changed from !rounded-full to default border radius to stay consistent with the rest of the toolbar
  • input gets explicit focus-visible:ring-0 and focus-visible:ring-offset-0 so it doesn't show a focus ring inside the toolbar

pdf viewer layout

  • toolbar moved from fixed right-2.5 top-[4.4rem] to absolute inset-x-0 top-1 centered it now floats above the pdf content rather than being anchored to the viewport corner, so it doesn't overlap the sidebar trigger or header
  • toolbar padding changed from px-3 py-1.5 to px-0.5 py-0.5 and border radius bumped to app-radius-lg for a tighter, more pill-like look
  • Pages component wrapped in a positioned div centered vertically in the shell, removing the previous h-full min-h-0 approach that was causing layout issues in some cases
  • search and thumbnails panel z-index bumped from z-20 to z-50 so they render above the centered pages wrapper
  • both panels get border-l-0 since they're flush against the left edge and the left border was doubling with the shell border
  • PdfViewerShell root element changed to relative h-full w-full flex flex-col justify-stretch and zoomOptions added with minZoom: 0.5 and maxZoom: 10
  • thumbnails panel width increased from 142px to 150px and horizontal padding bumped to px-3 for better thumbnail spacing
  • thumbnails panel outer border simplified to remove the explicit border-l-0 border-border since the panel background handles the visual separation
  • Plus and Minus icons imported (likely for a zoom control that's partially in flight)
  • LectorSearch loading state gets w-full so it fills the horizontal space correctly

misc

  • sidebar resize handle indicator nudged to -right-[1px] to fix a subpixel gap that was showing between the handle and the sidebar edge
  • removed the trailing newline that was accidentally dropped from globals.css in a previous commit (and re-removed since it came back)

@vercel

vercel Bot commented May 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
notevo Building Building Preview, Comment May 14, 2026 3:08am

@moehdotdev moehdotdev merged commit d024e2f into main May 14, 2026
1 of 2 checks passed
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.

1 participant