Skip to content

fix: improve PDF viewer UI#2454

Merged
hsluoyz merged 1 commit into
the-open-agent:masterfrom
lulululu-debug:feat/pdf-viewer-improvements
Jul 7, 2026
Merged

fix: improve PDF viewer UI#2454
hsluoyz merged 1 commit into
the-open-agent:masterfrom
lulululu-debug:feat/pdf-viewer-improvements

Conversation

@lulululu-debug

Copy link
Copy Markdown
Contributor

Summary

The PDF preview on the store Overview had a hardcoded purple toolbar that clashed with the app theme, a tall page that overflowed the preview box with no way to scroll it, and a themed scrollbar that turned white against the light toolbar and
disappeared. This themes the viewer, fits the page to the box, and scrolls it inside the frame.

All CSS is scoped to .filetree-doc-viewer (the className already on the <DocViewer>), consistent with the existing msdoc rule, so it doesn't affect any other react-doc-viewer instance.

Changes

  • Theme the react-doc-viewer toolbar: a light bar with theme-colored (Setting.getThemeColor) icons/labels instead of the hardcoded purple.
  • Scroll the PDF page inside the fixed box (#pdf-renderer height: 100% + overflow-y: auto) so the mouse wheel works and a tall page no longer overflows the frame; keep the toolbar pinned (position: sticky) while scrolling.
  • Disable react-doc-viewer's themed scrollbar (it turned white on the light toolbar) and give #pdf-renderer a visible custom scrollbar.
  • Fit the page to the box width (canvas max-width: 100%) and hide react-pdf's text / annotation / struct layers (react-doc-viewer doesn't ship TextLayer.css, so they rendered as visible extracted text under the page).
  • Tidy the toolbar controls into uniform, borderless, theme-colored icon buttons.

@hsluoyz hsluoyz changed the title feat: improve the PDF preview — theme it, fit and scroll the page inside the box fix: improve PDF viewer UI Jul 7, 2026
@hsluoyz
hsluoyz merged commit d83832e into the-open-agent:master Jul 7, 2026
7 checks passed
hsluoyz pushed a commit that referenced this pull request Jul 7, 2026
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