Skip to content

Comments

refactor(link-layer): migrate to EmbedPDF v2.6.2 annotation state for link rendering and improve link handling#5760

Merged
Frooodle merged 5 commits intoStirling-Tools:mainfrom
balazs-szucs:embed-bump
Feb 23, 2026
Merged

refactor(link-layer): migrate to EmbedPDF v2.6.2 annotation state for link rendering and improve link handling#5760
Frooodle merged 5 commits intoStirling-Tools:mainfrom
balazs-szucs:embed-bump

Conversation

@balazs-szucs
Copy link
Collaborator

Description of Changes


Checklist

General

Documentation

Translations (if applicable)

UI Changes (if applicable)

  • Screenshots or videos demonstrating the UI changes are attached (e.g., as comments or direct attachments in the PR)

Testing (if applicable)

  • I have tested my changes locally. Refer to the Testing Guide for more details.

…endering and improve link handling

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
Copilot AI review requested due to automatic review settings February 18, 2026 19:04
@dosubot dosubot bot added the size:L This PR changes 100-499 lines ignoring generated files. label Feb 18, 2026
@stirlingbot stirlingbot bot added Front End Issues or pull requests related to front-end development refactor Code changes that neither fix a bug nor add a feature labels Feb 18, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the PDF viewer link overlay to render/navigate/delete links using EmbedPDF’s annotation state (aligned with the v2.6.1 update), replacing the previous pdf-lib-based link extraction approach.

Changes:

  • Update EmbedPDF packages from 2.6.0 to 2.6.1.
  • Refactor LinkLayer to read link annotations from useAnnotation(documentId).state and use annotation actions/destinations for navigation.
  • Simplify LocalEmbedPDF’s LinkLayer usage by removing now-unneeded props (pdfUrl, page dimensions).

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
frontend/src/core/components/viewer/LocalEmbedPDF.tsx Updates LinkLayer invocation to match the new annotation-state-driven interface.
frontend/src/core/components/viewer/LinkLayer.tsx Switches link extraction to EmbedPDF annotation state; updates navigation/deletion logic to use annotation targets/actions.
frontend/package.json Bumps EmbedPDF dependencies to ^2.6.1.
frontend/package-lock.json Locks EmbedPDF dependency tree to 2.6.1 artifacts.
Files not reviewed (1)
  • frontend/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ConnorYoh
Copy link
Contributor

/deploypr

Copy link
Contributor

@ConnorYoh ConnorYoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @balazs-szucs great work as always!


interface LinkToolbarProps {
link: PdfLibLink;
ann: PdfLinkAnnoObject;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to still name link or annotationLink as that is its primary responsibility. I am also personally not a fan of abbreviating words. I have a terrible memory when reading through code :')

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Thanks!

Addressed in: a4dc19b

@stirlingbot stirlingbot bot added the pr-deployed Pull request has been deployed to a test environment label Feb 20, 2026
reecebrowne
reecebrowne previously approved these changes Feb 20, 2026
balazs-szucs and others added 3 commits February 21, 2026 11:45
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
… link handling

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
@balazs-szucs
Copy link
Collaborator Author

/deploypr

@balazs-szucs balazs-szucs changed the title refactor(link-layer): migrate to EmbedPDF v2.6.1 annotation state for link rendering and improve link handling refactor(link-layer): migrate to EmbedPDF v2.6.2 annotation state for link rendering and improve link handling Feb 21, 2026
@Frooodle Frooodle merged commit 340224b into Stirling-Tools:main Feb 23, 2026
20 checks passed
@stirlingbot stirlingbot bot removed the pr-deployed Pull request has been deployed to a test environment label Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Front End Issues or pull requests related to front-end development refactor Code changes that neither fix a bug nor add a feature size:L This PR changes 100-499 lines ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants