Skip to content

feat(thumbnails): add optional page thumbnail sidebar - #177

Draft
lfals wants to merge 3 commits into
LibreSign:mainfrom
lfals:feat/page-thumbnails
Draft

lfals wants to merge 3 commits into
LibreSign:mainfrom
lfals:feat/page-thumbnails

Conversation

@lfals

@lfals lfals commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Refs: LibreSign/libresign#1863

Stacked on #176 (feat/page-navigation). Until it is merged this PR also shows its commit; the thumbnails change is the last two commits only. Marked as draft for that reason.

What does this change?

Adds an optional left sidebar with page thumbnails, built on the navigation API from #176.

  • showThumbnails prop (default false): renders a sticky thumbnail sidebar. The existing layout is unchanged when off.
  • thumbnailWidth prop (default 120): thumbnail width in px.
  • PDFThumbnails: lazy-rendered thumbnails (IntersectionObserver). It highlights the current page, keeps the active thumbnail in view, resets when the documents change, and emits select.

Clicking a thumbnail calls goToPage; the highlighted page follows pdf-elements:page-change. Documented in docs/API.md.

How was it tested?

npm run typecheck && npm run lint && npm run test && npm run build

All pass (123 tests). For a manual check, set :show-thumbnails="true" in the demo and click thumbnails while scrolling.

Checklist

  • The change is focused on one problem.
  • Tests were added or updated when behavior changed.
  • Documentation was updated when public behavior or APIs changed.
  • npm run lint, npm run typecheck, npm run test and npm run build pass when applicable.
  • New source files include SPDX headers.

Lets hosts build pagination controls and page thumbnails without relying
on internal DOM structure.

Signed-off-by: Luis Amorim <principal@felps.zip>
Adds showThumbnails/thumbnailWidth props. Thumbnails render lazily,
highlight the current page and navigate via goToPage.

Signed-off-by: Luis Amorim <principal@felps.zip>
…n view

Signed-off-by: Luis Amorim <principal@felps.zip>

This branch has not been deployed

No deployments
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