Skip to content

Add underline, strikeout and squiggly annotation in editor - #22050

Open
leblanc-simon wants to merge 2 commits into
mozilla:masterfrom
leblanc-simon:features/text-markup-editor
Open

leblanc-simon wants to merge 2 commits into
mozilla:masterfrom
leblanc-simon:features/text-markup-editor

Conversation

@leblanc-simon

Copy link
Copy Markdown
Contributor

This PR add support for annotations : underline, strikeout and squiggly
I'm refactoring highlight because all 3 new annotations and highlight are very similar

@leblanc-simon
leblanc-simon requested a review from a team as a code owner October 1, 2026 23:47
@codecov-commenter

codecov-commenter commented Oct 1, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.82081% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.39%. Comparing base (c33c32a) to head (ca12304).
⚠️ Report is 16 commits behind head on master.

Files with missing lines Patch % Lines
src/display/editor/text_markup.js 94.89% 5 Missing ⚠️
src/core/annotation.js 95.60% 4 Missing ⚠️
src/display/editor/drawers/text_markup.js 95.65% 1 Missing ⚠️
src/display/editor/highlight.js 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #22050      +/-   ##
==========================================
+ Coverage   90.35%   90.39%   +0.03%     
==========================================
  Files         269      274       +5     
  Lines       67211    67426     +215     
==========================================
+ Hits        60729    60949     +220     
+ Misses       6482     6477       -5     
Flag Coverage Δ
browsertest 65.96% <11.82%> (-0.21%) ⬇️
fonttest 8.97% <ø> (ø)
integrationtest 69.42% <71.67%> (+0.03%) ⬆️
unittest 59.49% <30.99%> (-0.08%) ⬇️
unittestcli 58.01% <30.99%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Snuffleupagus

Copy link
Copy Markdown
Collaborator

First of all, did the Firefox UI/UX team approve this and provide a design specification for the work (and created the icons, l10n strings, and so on)?
Secondly, given the very large size/scope of this it's going to be difficult for anyone to test/review it; this would probably need to be split into a few separate PRs.

@leblanc-simon

Copy link
Copy Markdown
Contributor Author

Hi @Snuffleupagus , I am sorry for not following the rules correctly.

No, I haven't received approval from the Firefox UI/UX team. I can't figure out how to contact them, perhaps via Matrix: https://chat.mozilla.org/#/room/#pdfjs:mozilla.org ?

As for the length of the patch, I understand.
I could split it into several PRs:

  • PR-1 : refactor HighlightAnnotation, UnderlineAnnotation, SquigglyAnnotation, StrikeOutAnnotation -> add createNewDict and createNewAppearanceStream for UnderlineAnnotation, SquigglyAnnotation, StrikeOutAnnotation which not used while you can't create this annotation but this annotation will be ready
  • PR-2 : refactor HighlightEditor for move some methods on a new class which will be use by the futures UnderlineEditor, SquigglyEditor, StrikeOutEditor
  • PR-3 : add UnderlineEditor
  • PR-4 : add SquigglyEditor
  • PR-5 : add StrikeOutEditor
  • PR-6 : add the AppOptions enableTextMarkupEditors to manage display all Text markup buttons

But the first step will be contact the Firefox UI/UX team.

@flodolo flodolo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Taking out of the queue for now.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants