21394 Commits

Author SHA1 Message Date
Tim van der Meij
84e32964ed
Merge pull request #20221 from calixteman/button_color_comment
[Editor] Use the color of the annotation for the background of the comment button
2025-09-04 21:27:07 +02:00
Calixte Denizet
2354ae4233 [Editor] Don't save the image when updating a stamp annotation
It adds some useless bytes in the file.
2025-09-04 18:54:13 +02:00
Calixte Denizet
ca280399c2 [Editor] Use the color of the annotation for the background of the comment button 2025-09-02 21:17:08 +02:00
Tim van der Meij
c386d9b87d
Merge pull request #20222 from calixteman/sidebar_scroll
[Editor] Make scrollable the area containing the comments in the sidebar
2025-09-01 20:28:35 +02:00
Calixte Denizet
dd4b475109 [Editor] Make scrollable the area containing the comments in the sidebar 2025-08-31 23:21:19 +02:00
calixteman
c8d49db624
Merge pull request #20217 from calixteman/comment_editor_sidebar
[Editor] Add editors with a comment in the sidebar
2025-08-31 21:48:52 +02:00
Calixte Denizet
2a459857ce [Editor] Add editors with a comment in the sidebar
and add a button close to the editor.
Clicking on the button will display a popup with the comment but it's for a next patch.
2025-08-31 19:59:16 +02:00
Tim van der Meij
9855d85fb5
Merge pull request #20220 from timvandermeij/editor-hint-bugfix
[Editor] Hide the comment sidebar on document change
2025-08-31 18:56:27 +02:00
Tim van der Meij
5a7c872618
[Editor] Hide the comment sidebar on document change
If the document changes the comment state from the old document should
be replaced with that of the new document. To do this the comment
manager is destroyed, but the corresponding comment sidebar wasn't
destroyed yet, which resulted in the comment state from the old document
still being visible for the new document.

This commit fixes the issue by hiding the comment sidebar if the comment
manager is destroyed. Note that hiding the comment sidebar effectively
destroys all its state, and we already set the annotation mode to "none"
on document change so we don't want to keep showing the comment sidebar
anyway.
2025-08-31 16:26:03 +02:00
calixteman
c96fa68c9d
Merge pull request #20204 from calixteman/add_changelightness
Add a function changeLightness in order to change the lightness of a RGB color
2025-08-30 21:40:31 +02:00
Calixte Denizet
0ec503e5ef Add a function changeLightness in order to change the lightness of a RGB color 2025-08-30 21:18:12 +02:00
Tim van der Meij
c2699a941e
Merge pull request #20216 from timvandermeij/updates
Update dependencies and translations to the most recent versions
2025-08-30 20:01:51 +02:00
Tim van der Meij
cac052c0be
Update translations to the most recent versions 2025-08-30 18:39:19 +02:00
Tim van der Meij
4dcfc96703
Update dependencies to the most recent versions 2025-08-30 18:38:25 +02:00
Tim van der Meij
f110e57512
Merge pull request #20215 from timvandermeij/bump
Bump the stable version in `pdfjs.config`
2025-08-30 17:52:18 +02:00
Tim van der Meij
a5456033ce
Bump the stable version in pdfjs.config 2025-08-30 17:49:19 +02:00
calixteman
9e2e9e2096
Merge pull request #20210 from calixteman/comment_sidebar
[Editor] Add a sidebar allowing the user to navigate between the comments in a pdf (bug 1985567)
v5.4.149
2025-08-30 14:19:04 +02:00
Tim van der Meij
a2d4b259c5
Merge pull request #20212 from calixteman/reset_mode
Reset editing mode when changing the pdf document
2025-08-29 20:45:21 +02:00
Calixte Denizet
25990e4287 [Editor] Add a sidebar allowing the user to navigate between the comments in a pdf (bug 1985567)
This implements what has been specified but it's still not done: we have to handle editing a comment
or an annotation containing one.
2025-08-29 16:00:06 +02:00
Calixte Denizet
3e01ee9bb7 Reset editing mode when changing the pdf document 2025-08-28 22:38:05 +02:00
Tim van der Meij
13ba311e5a
Merge pull request #20211 from calixteman/fix_css_unit
[Editor] Fix unit (for consistency) and remove few useless px
2025-08-28 20:37:18 +02:00
Tim van der Meij
53c37547f0
Merge pull request #20209 from calixteman/fix_comment_icon
[Editor] Fix the dimensions of the comment icon
2025-08-28 20:33:31 +02:00
Calixte Denizet
0a4817fb71 [Editor] Fix unit (for consistency) and remove few useless px 2025-08-28 16:09:58 +02:00
Calixte Denizet
1876013e4e [Editor] Fix the dimensions of the comment icon 2025-08-27 16:01:29 +02:00
calixteman
e37a58f978
Merge pull request #20200 from calixteman/remove_useless_css2
[Editor] Remove useless CSS and fix styling for the comment button
2025-08-26 22:10:11 +02:00
Calixte Denizet
e44e470eb2 [Editor] Remove useless CSS and fix styling for the comment button 2025-08-26 22:06:49 +02:00
Tim van der Meij
d8c01bf70d
Merge pull request #20196 from calixteman/xy_getter
[Editor] Add a method to get an editor rect in the pdf page coordinates
2025-08-26 20:27:06 +02:00
Calixte Denizet
1fc039e14f [Editor] Add a method to get an editor rect in the pdf page coordinates 2025-08-26 19:40:41 +02:00
Tim van der Meij
bde01f0998
Merge pull request #20195 from timvandermeij/fix-chrome-windows
Skip the curvature ink editor integration test for Chrome on Windows
2025-08-25 21:35:13 +02:00
Tim van der Meij
11d5d6d0ce
Skip the curvature ink editor integration test for Chrome on Windows
This test permafails for that particular OS/browser combination.

Fixes 18d3dc18.
2025-08-25 20:09:32 +02:00
calixteman
5a10376e4d
Merge pull request #20191 from calixteman/link_gotoxy
Add a method goToXY in PDFLinkService in order to scroll the document at a given location
2025-08-25 20:08:03 +02:00
calixteman
261c1f9e05
Merge pull request #20194 from calixteman/update_comment_icon
[Editor] Change the icon for inline comments
2025-08-25 20:07:37 +02:00
Calixte Denizet
5ed2dfbf26 [Editor] Change the icon for inline comments 2025-08-25 20:04:56 +02:00
Calixte Denizet
1678782680 Add a method goToXY in PDFLinkService in order to scroll the document at a given location
This function is required for the commenting feature: the user will be able to click
on a comment in the sidebar and the document will be scrolled accordingly.
2025-08-25 19:57:53 +02:00
Tim van der Meij
ab41f5095c
Merge pull request #20190 from timvandermeij/text-layer-permafail
Improve the selection check in the "doesn't jump when moving selection" integration test
2025-08-25 19:40:27 +02:00
calixteman
7a65c58b5e
Merge pull request #20170 from calixteman/bug1980958
Don't iterate over all empty slots in the xref entries (bug 1980958)
2025-08-25 15:46:20 +02:00
Calixte Denizet
af144be3ba Don't iterate over all empty slots in the xref entries (bug 1980958) 2025-08-25 14:02:08 +02:00
calixteman
5d4f0659bc
Merge pull request #20182 from calixteman/add_comment_button
[Editor] Add a button to the annotation having a popup in order to edit it
2025-08-25 13:18:37 +02:00
calixteman
307ea5d25d
Merge pull request #20187 from calixteman/update_puppeteer_24.17.0
Update puppeteer to 24.17.0
2025-08-25 13:09:44 +02:00
Calixte Denizet
0af61f5bf4 Update puppeteer to 24.17.0 2025-08-25 09:33:53 +02:00
Calixte Denizet
bd8c438428 [Editor] Add a button to the annotation having a popup in order to edit it 2025-08-24 21:36:19 +02:00
Tim van der Meij
4cc93af364
Improve the selection check in the "doesn't jump when moving selection" integration test
Locally, on Arch Linux, this integration test permafails:

```
1) Text layer Text selection using selection carets doesn't jump when moving selection
  Message:
    second selection:
        Expected '(frequently executed) bytecode sequences, records
        them, and compiles them to fast native code. We call such a s' to roughly match /frequently .* We call such a se/s.
  Stack:
        at <Jasmine>
        at UserContext.<anonymous> (file:///home/timvandermeij/Documenten/Ontwikkeling/pdf.js/Code/test/integration/text_layer_spec.mjs:521:12)
  Message:
    third selection:
        Expected '(frequently executed) bytecode sequences, records
        them, and compiles them to fast native code. We call such a s' to roughly match /frequently .* We call such a se/s.
  Stack:
        at <Jasmine>
        at UserContext.<anonymous> (file:///home/timvandermeij/Documenten/Ontwikkeling/pdf.js/Code/test/integration/text_layer_spec.mjs:529:12
```

The exact selection can differ a bit per OS/browser. In this case the
last character was consistently not selected while on other platforms it
is, so this commit fixes the issue by relaxing the regex to not consider
the final character so that the test passes if the rest matches.
2025-08-24 20:46:20 +02:00
Tim van der Meij
649a03f817
Merge pull request #20189 from timvandermeij/null-signal
[Editor] Don't use a null signal for the comment button
2025-08-24 20:43:36 +02:00
Tim van der Meij
eec1bea1b4
[Editor] Don't use a null signal for the comment button
This removes the following error from the integration test logs:

```
JavaScript error: http://127.0.0.1:59283/build/generic/build/pdf.mjs, line 3879:
TypeError: EventTarget.addEventListener: 'signal' member of AddEventListenerOptions is not an object.
```

Fixes 636ff50.
Extends 63651885.
2025-08-24 20:01:10 +02:00
Tim van der Meij
535a042b01
Merge pull request #20188 from timvandermeij/chrome-webdriverbidi
Use WebDriver BiDi for Chrome
2025-08-24 19:59:31 +02:00
Tim van der Meij
18d3dc18e0
Use WebDriver BiDi for Chrome 2025-08-24 15:58:52 +02:00
calixteman
592d6c070a
Merge pull request #20179 from calixteman/add_rect_popup
[Editor] Add a Rect entry to a saved popup in order to avoid to have an invalid pdf
2025-08-24 12:01:31 +02:00
calixteman
78f63dd6db
Merge pull request #20180 from calixteman/mv_comment_button
[Editor] Move the comment button just before the delete one
2025-08-24 12:00:29 +02:00
calixteman
cfe08bd035
Merge pull request #20184 from calixteman/use_cached_annotations
Use the cached annotations when collecting them by types
2025-08-24 11:57:17 +02:00
Tim van der Meij
8be21711a4
Merge pull request #20183 from calixteman/resizer_top_editor
[Editor] Make sure the resizers are on top of the editor content
2025-08-23 21:27:35 +02:00