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 commit only. Marked as draft for that reason.

📝 Summary

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

Addition Responsibility
showThumbnails prop (default false) Renders a sticky thumbnail sidebar; existing layout is unchanged when off
thumbnailWidth prop (default 120) Thumbnail width in px
PDFThumbnails Lazy-rendered thumbnails (IntersectionObserver), highlights the current page, emits select

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

🧪 How to test

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

Expected: 121 tests pass. For a manual check, set :show-thumbnails="true" in the demo and click thumbnails while scrolling.

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