Jonas Jenwald
c7e7122e25
[Editor] Indicate if the highlight-thickness slider is disabled
...
The fact that the highlight-thickness can only be changed in "free" mode isn't really obvious visually in the toolbar, so attempt to provide at least some indication of the `disabled`-state by "dimming" the slider.
2024-03-01 16:18:31 +01:00
calixteman
29c493d36b
Merge pull request #17760 from calixteman/fix_quadpoints
...
[Editor] Fix the quadpoints value when serializing an highlight annotation
2024-03-01 13:08:44 +01:00
Calixte Denizet
30101cbb31
[Editor] Fix the quadpoints value when serializing an highlight annotation
...
The coordinates of each point in a box are in the page coordinates system.
2024-03-01 11:36:16 +01:00
Jonas Jenwald
61036383b5
Merge pull request #17710 from Snuffleupagus/pr-17277-followup
...
Simplify the `XMLHttpRequest`-branch in the `fetchData` helper function (PR 17277 follow-up)
2024-03-01 10:23:02 +01:00
calixteman
8f75e34b6f
Merge pull request #17757 from calixteman/bug1881219
...
[Editor] Enable the thickness input when no editors are selected (bug 1881219)
2024-02-29 23:26:49 +01:00
Calixte Denizet
7af90bb8bc
[Editor] Enable the thickness input when no editors are selected (bug 1881219)
2024-02-29 23:05:33 +01:00
calixteman
c409121251
Merge pull request #17756 from calixteman/bug1882248
...
[Editor] Make the delete button clickable with the space key (bug 1882248)
2024-02-29 19:57:57 +01:00
Calixte Denizet
f52bf2836f
[Editor] Make the delete button clickable with the space key (bug 1882248)
2024-02-29 19:05:38 +01:00
calixteman
7cc34cf4a7
Merge pull request #17755 from calixteman/bug1881684
...
[Editor] Add the possibility to move the caret with the keyboard once an highlight has been made (bug 1881684)
2024-02-29 18:38:17 +01:00
Calixte Denizet
a9f47e87d5
[Editor] Add the possibility to move the caret with the keyboard once an highlight has been made (bug 1881684)
2024-02-29 18:18:13 +01:00
Jonas Jenwald
9600c48d4f
Merge pull request #17750 from Snuffleupagus/pr-17748-followup
...
Inline the `HighlightEditor.#telemetryType` getter at its only call-site (PR 17748 follow-up)
2024-02-29 10:34:37 +01:00
Jonas Jenwald
a92b38e71c
Inline the HighlightEditor.#telemetryType
getter at its only call-site (PR 17748 follow-up)
2024-02-28 20:47:01 +01:00
calixteman
9fe15d4a01
Merge pull request #17748 from calixteman/highlight_telemetry_followup
...
[Editor] Count the colors used when highlighting whatever the highlight kind is
2024-02-28 20:00:15 +01:00
Calixte Denizet
3a7e638fce
[Editor] Count the colors used when highlighting whatever the highlight kind is
2024-02-28 18:24:24 +01:00
calixteman
07abd647f4
Merge pull request #17737 from calixteman/highlight_telemetry
...
[Editor] Add some telemetry for the highlight feature (bug 1866437)
2024-02-28 15:20:57 +01:00
Calixte Denizet
65342d2bee
[Editor] Add some telemetry for the highlight feature (bug 1866437)
2024-02-28 10:17:11 +01:00
calixteman
b1a04fc184
Merge pull request #17738 from calixteman/issue17730
...
Always add links in the annotation layer
2024-02-28 09:34:10 +01:00
Calixte Denizet
e0b843d991
Always add links in the annotation layer
...
Fixes #17730 .
2024-02-27 22:48:08 +01:00
calixteman
06aef89502
Merge pull request #17733 from calixteman/puppeteer_22_1_0
...
Update puppeteer to 22.3.0
2024-02-27 13:46:30 +01:00
Calixte Denizet
5e7941afbf
Update puppeteer to 22.3.0
2024-02-27 12:19:54 +01:00
calixteman
e42b114e80
Merge pull request #17724 from calixteman/issue17707
...
Avoid to have to wait to zoom after scrolling
2024-02-26 11:05:10 +01:00
Calixte Denizet
9e042e7acc
Avoid to have to wait to zoom after scrolling
...
Allow to zoom with the wheel once the scrolling is finished.
It's now possible to know that thanks to the scrollend event.
Fixes #17707 .
2024-02-25 21:40:48 +01:00
calixteman
ca4ab064e5
Merge pull request #17720 from calixteman/editor_simplify_highlighting
...
[Editor] In caret browsing mode, allow to select in pressing shift and arrow down (bug 1881802)
2024-02-25 17:52:11 +01:00
Calixte Denizet
0520f2f0cb
[Editor] In caret browsing mode, allow to select in pressing shift and arrow down (bug 1881802)
...
In implementing caret browsing mode in pdf.js, I didn't notice that selectstart isn't always triggered.
So this patch removes the use of selectstart and rely only on selectionchange.
In order to simplify the selection management, the selection code is moved in the AnnotationUIManager:
- it simplifies the code;
- it allows to have only one listener for selectionchange instead of having one by visible page
for selectstart.
I had to add a delay in the integration tests for highlighting (there's a comment with an explanation),
it isn't really nice, but it's the only way I found and in real life there always is a delay between
press and release.
2024-02-25 15:35:30 +01:00
calixteman
1bd6af6dae
Merge pull request #17722 from calixteman/issue17721
...
Fix the string GlobalConstants.IDS_INVALID_DATE
2024-02-23 21:49:42 +01:00
Calixte Denizet
fe41e789de
Fix the string GlobalConstants.IDS_INVALID_DATE
2024-02-23 21:39:06 +01:00
Jonas Jenwald
346efe919a
Merge pull request #17718 from Snuffleupagus/hexNumbers-tweak
...
Tweak how the `hexNumbers` Array, used by `Util.makeHexColor`, is built
2024-02-23 18:17:10 +01:00
calixteman
b8b8f1af66
Merge pull request #17719 from calixteman/bug1881692
...
[Editor] In caret browsing mode, get the caret position in the text layer (bug 1881692)
2024-02-23 17:11:51 +01:00
Calixte Denizet
bb19cf9b64
[Editor] In caret browsing mode, get the caret position in the text layer (bug 1881692)
...
The function caretPositionFromPoint return the position within the last visible element
and sometimes there are some elements on top of the ones in the text layer.
So the idea is to hide the visible elements which aren't in the text layer in order
to get the right caret position.
2024-02-23 16:50:19 +01:00
calixteman
101e8efad7
Merge pull request #17708 from calixteman/editor_highlight_context_menu
...
[Editor] Add the possibility to create an highlight from the context menu when some text is selected (bug 1867739)
2024-02-23 16:39:03 +01:00
Calixte Denizet
e1f6f5179f
[Editor] Add the possibility to create an highlight from the context menu when some text is selected (bug 1867739)
2024-02-23 16:18:03 +01:00
Jonas Jenwald
49a2aff532
Tweak how the hexNumbers
Array, used by Util.makeHexColor
, is built
...
*Please note:* This is a micro optimization, hence I fully understand if the patch is rejected.
Currently we create two temporary Arrays and have to iterate twice in total when building the final `hexNumbers` Array.
With this patch there's only one temporary Array and a single iteration required to build the final `hexNumbers` Array.
2024-02-23 14:20:53 +01:00
Jonas Jenwald
33c5ef349e
Simplify the XMLHttpRequest
-branch in the fetchData
helper function (PR 17277 follow-up)
2024-02-21 23:00:24 +01:00
calixteman
72b8b29147
Merge pull request #17701 from calixteman/alt_text_ai
...
[Editor] Add the possibility to query some ML stuff to guess an alt text for an image
2024-02-21 10:14:40 +01:00
calixteman
0fb8a23051
Merge pull request #17702 from calixteman/bug1868759
...
[Editor] Disable annotation layer when highlighting (bug 1868759)
2024-02-21 09:49:48 +01:00
Calixte Denizet
46416bb131
[Editor] Add the possibility to query some ML stuff to guess an alt text for an image
...
It's only for an experimental purpose.
2024-02-20 21:29:33 +01:00
Calixte Denizet
95f9bedc7c
[Editor] Disable annotation layer when highlighting (bug 1868759)
...
When highlighting, the annotation editor layer is disabled to get pointer events
from the text layer, but the annotation layer must be then disabled either in
order to avoid bad interactions.
2024-02-20 21:17:05 +01:00
calixteman
70015ffe6b
Merge pull request #17688 from calixteman/editor_no_scroll_unselect
...
[Editor] Avoid to scroll when an editor is unselected
2024-02-20 17:00:43 +01:00
calixteman
99fa713fba
Merge pull request #17690 from calixteman/issue17689
...
Avoid to access to a missing cidSystemInfo property
2024-02-19 12:04:07 +01:00
Calixte Denizet
a6eadf8150
Avoid to access to a missing cidSystemInfo property
...
Fixes #17689 .
2024-02-19 09:55:23 +01:00
Calixte Denizet
c2fcc66302
[Editor] Avoid to scroll when an editor is unselected
2024-02-18 19:21:45 +01:00
Tim van der Meij
d96fd80ca0
Merge pull request #17687 from Snuffleupagus/pr-17686-followup
...
Disable source-map generation in the minified builds (PR 17686 follow-up)
2024-02-18 13:35:23 +01:00
Jonas Jenwald
673639c54b
Disable source-map generation in the minified builds (PR 17686 follow-up)
...
As part of the changes in PR 17686 we "accidentally" enabled source-maps for the *minified* builds, which seems unnecessary since those have never been included in the `pdfjs-dist` output.
Locally this patch reduces the run-time of `gulp minified` by ~15 percent.
2024-02-17 22:14:37 +01:00
Tim van der Meij
4ac8ee8b6d
Merge pull request #17686 from Snuffleupagus/Webpack-TerserPlugin
...
Run minification directly during Webpack building
2024-02-17 19:42:35 +01:00
Jonas Jenwald
091e861531
Run minification directly during Webpack building
...
Rather than first building the library and then use Terser "manually" to minify the files, we can utilize a Webpack plugin to combine these steps which helps to simplify the gulpfile.
2024-02-17 18:51:34 +01:00
Tim van der Meij
8487c67cb8
Merge pull request #17684 from timvandermeij/modernize-webserver-pt2
...
Modernize the webserver code (part 2)
2024-02-17 18:22:51 +01:00
Tim van der Meij
33955980c8
Merge pull request #17685 from timvandermeij/updates
...
Update dependencies and translations to the most recent versions
2024-02-17 18:09:51 +01:00
Tim van der Meij
2e6fa797d9
Improve the webserver's constructor
...
This makes the webserver configurable during instantiation rather than
having to set the parameters afterwards.
2024-02-17 16:22:10 +01:00
Tim van der Meij
985ba77579
Modernize the remainder of the webserver's code and enable the no-var
ESLint rule
...
This commit also moves the content type logic into a helper method to
ever so slightly reduce duplication.
2024-02-17 16:22:10 +01:00
Tim van der Meij
0015eb2431
Modernize the webserver's handler method
...
This commit converts `var` to `const`/`let`, gives the variables more
readable names and annotates the code to make the flow clearer.
2024-02-17 16:22:10 +01:00