Commit Graph

18125 Commits

Author SHA1 Message Date
Jonas Jenwald
57f548c989
Merge pull request #17019 from calixteman/bug1854818
[Editor] The ::before containter containing the border of a selected editor mustn't catch mouse events (bug 1854818)
2023-09-24 12:42:50 +02:00
Tim van der Meij
587a3a2eae
Merge pull request #17020 from Snuffleupagus/update-packages
Update packages and translations
2023-09-24 12:11:43 +02:00
Jonas Jenwald
073a1da6f5 Update l10n files 2023-09-24 11:05:37 +02:00
Jonas Jenwald
1b95ab7cfa Update npm packages 2023-09-24 11:03:19 +02:00
Calixte Denizet
57caa4601c [Editor] The ::before containter containing the border of a selected editor mustn't catch mouse events (bug 1854818) 2023-09-23 23:53:19 +02:00
Jonas Jenwald
f87ec67ab1 [api-major] Remove various deprecated functionality and options 2023-09-23 17:44:09 +02:00
Jonas Jenwald
0fc0dc3960
Merge pull request #17017 from Snuffleupagus/one-noContextMenu
Use one `noContextMenu` function in both the src/- and web/-folders
2023-09-23 16:18:26 +02:00
Jonas Jenwald
1df31c0284 Use one noContextMenu function in both the src/- and web/-folders
Currently we duplicate this event handler function in multiple places, which seems unnecessary.
2023-09-23 15:37:13 +02:00
Tim van der Meij
a09b7228fb
Merge pull request #16970 from timvandermeij/fix-intermittent-border
Fix integration test "Interaction in issue15053.pdf must check that a button and text field with a border are hidden"
2023-09-23 14:35:07 +02:00
Tim van der Meij
f9eda5b30e
Merge pull request #16967 from timvandermeij/fix-intermittent-freetext
Fix integration test "FreeText Editor FreeText (edit existing in double clicking on it) must move an annotation"
2023-09-23 14:34:43 +02:00
calixteman
d2e34dff93
Merge pull request #17016 from calixteman/alt_text_button_no_menu
[Editor] Disable context menu on alt-text button and in the associated dialog
2023-09-23 14:22:30 +02:00
Calixte Denizet
88f3ed7745 [Editor] Disable context menu on alt-text button and in the associated dialog
but keep it for the text area.
Disable pointerdown on the alt-text button to disable dragging the editor
when the button is clicked (especially when slightly moving the mouse
between the down and the up).
2023-09-22 23:27:55 +02:00
Jonas Jenwald
85568bd6cc
Merge pull request #17012 from Snuffleupagus/altText-telemetry-on-close
[Editor] Report telemetry when closing the altText dialog with `Esc` (PR 16987 follow-up)
2023-09-22 22:45:13 +02:00
Jonas Jenwald
9e0e67918f [Editor] Report telemetry when closing the altText dialog with Esc (PR 16987 follow-up)
The dialog element handles closing with <kbd>Esc</kbd> automatically, however we're not reporting telemetry in that case.
In order to fix that the easiest solution, as far as I'm concerned, seem to be moving the telemetry reporting into the dialog-close handler since it's always invoked.
2023-09-22 22:20:49 +02:00
Jonas Jenwald
d555f351d3
Merge pull request #17011 from Snuffleupagus/altText-destroy-keep-#currentEditor
Don't reset `this.#currentEditor` when destroying the dialog
2023-09-22 22:18:02 +02:00
Jonas Jenwald
8c5da23f67 Don't reset this.#currentEditor when destroying the dialog
This patch addresses an edge-case that'll probably never happen, but it nonetheless seems like something that we want to fix.

Note how we're using the `#currentEditor`-field to prevent opening the dialog when it's already active, and it being reset once the dialog has been closed.
By also resetting the `#currentEditor`-field during destruction, instead of waiting until the dialog has actually closed (assuming it's currently open), there's a *tiny* window of time[1] during which we could theoretically allow to (incorrectly) re-open the dialog and thus getting out-of-sync state in the viewer-component.

---
[1] Since the "close" event, on a dialog-element, is dispatched asynchronously by the browser.
2023-09-22 21:53:26 +02:00
calixteman
c027aaeefa
Merge pull request #17015 from calixteman/alt_text_save_button
[Editor] Let the Save button always enabled in the alt-text dialog
2023-09-22 21:18:30 +02:00
Calixte Denizet
d5936d9a15 [Editor] Let the Save button always enabled in the alt-text dialog 2023-09-22 20:46:29 +02:00
calixteman
f66613c8e4
Merge pull request #17005 from calixteman/alt_text_tweak_save_flow
[Editor] Tweak the save flow in the alt-text dialog
2023-09-22 17:45:49 +02:00
Jonas Jenwald
a68845c902
Merge pull request #17014 from Snuffleupagus/reporttelemetry-tweaks
Don't bother trying to unregister the "reporttelemetry" event listener
2023-09-22 17:35:55 +02:00
Jonas Jenwald
43c7e88fa9 Don't bother trying to unregister the "reporttelemetry" event listener
Note that both event-unbind methods are unused in MOZCENTRAL builds; see https://searchfox.org/mozilla-central/rev/48b6992e03fa66f77ac9688ba61c95d31a451bc1/toolkit/components/pdfjs/content/web/viewer.js#1864-1869
2023-09-22 17:24:32 +02:00
Calixte Denizet
050093c9f5 [Editor] Tweak the save flow in the alt-text dialog
When the user edit an existing alt-text and remove it, we want to be able
to save this state and consequently remove the done state from the
alt-text button.
Remove the button from its parent when the editor is removed: it should
help to save few Kb of memory.
2023-09-22 17:10:20 +02:00
calixteman
3f859f76e6
Merge pull request #17010 from calixteman/alt_text_mask_1
[Editor] Darken the toolbar when the alt-text dialog is opened
2023-09-22 13:34:57 +02:00
Jonas Jenwald
eff7ed580d
Merge pull request #17009 from Snuffleupagus/altText-label-clicks
[Editor] Make the altText dialog labels part of telemetry (PR 16987 follow-up)
2023-09-22 13:26:57 +02:00
Calixte Denizet
0237e2eb2b [Editor] Darken the toolbar when the alt-text dialog is opened
It aims to fix the issue spotted in:
https://github.com/mozilla/pdf.js/pull/17002#issuecomment-1730962273
2023-09-22 13:11:37 +02:00
Jonas Jenwald
ee5b8bcf9e [Editor] Make the altText dialog labels part of telemetry (PR 16987 follow-up)
Radio-buttons can also be toggled by clicking on their associated `label`-elements, and not only the `input`-elements itself, however it seems that "pointerdown" event listeners don't cover that case.
Hence it's possible that telemetry could miss certain cases of a mouse being used, and the easiest solution seem to be to instead use "click" event listeners and just ignore keyboard-based events.
2023-09-22 12:26:03 +02:00
calixteman
2fc8ab3477
Merge pull request #17002 from calixteman/alt_text_mask
[Editor] Avoid to darken the current editor when opening the alt-text dialog
2023-09-22 12:17:21 +02:00
Jonas Jenwald
edb83ffec2
Merge pull request #17004 from Snuffleupagus/dialog-disable-zooming
Prevent wheel/touch zooming in the viewer when a dialog is open
2023-09-22 09:19:19 +02:00
Jonas Jenwald
988222d7de
Merge pull request #17003 from Snuffleupagus/issue-17000
Restore the `collectFields` parameter in the Annotation code (issue 17000)
2023-09-22 09:11:52 +02:00
Calixte Denizet
6545551e76 [Editor] Avoid to darken the current editor when opening the alt-text dialog 2023-09-21 20:44:53 +02:00
Jonas Jenwald
9b21f17b03 Prevent wheel/touch zooming in the viewer when a dialog is open 2023-09-21 20:08:08 +02:00
Jonas Jenwald
4cedc12341 Restore the collectFields parameter in the Annotation code (issue 17000)
Rather than trying to be "clever" here, and possibly affect code readability negatively, let's just restore the `collectFields` parameter to address the unneeded parsing that now happens when printing new Annotations.
2023-09-21 19:49:31 +02:00
Jonas Jenwald
e9f707ce3f
Merge pull request #16999 from Snuffleupagus/issue-16994
[GeckoView] Exclude `annotation_editor_layer_builder.css` in the build (issue 16994)
2023-09-21 19:26:50 +02:00
Jonas Jenwald
5711d0f95d [GeckoView] Exclude annotation_editor_layer_builder.css in the build (issue 16994)
Given the limitations of the old pre-processor that's used for CSS/HTML files, this unfortunately isn't as "easy" to implement as it is for JavaScript code.
Since this is the first case where we've wanted to do conditional CSS imports, rather than trying to completely re-write the pre-processor, this patch settles for handling it explicitly in the `expandCssImports` function.
2023-09-21 15:51:33 +02:00
calixteman
a7894a4d7b
Merge pull request #16993 from Snuffleupagus/gv-no-AltTextManager
[GeckoView] Avoid bundling the `AltTextManager` class, since it's unused
2023-09-21 14:19:51 +02:00
calixteman
9de432ba7a
Merge pull request #16998 from calixteman/fix_css_linter_issue_1
Make one of the m-c linters happy
2023-09-21 14:14:56 +02:00
Calixte Denizet
61c77c7d8b Make one of the m-c linters happy 2023-09-21 14:09:48 +02:00
calixteman
b002d16f04
Merge pull request #16996 from Snuffleupagus/issue-16995
Enable the Stylelint `declaration-block-no-duplicate-properties` rule (issue 16995)
2023-09-21 13:52:54 +02:00
Jonas Jenwald
80e691d2ad Enable the Stylelint declaration-block-no-duplicate-properties rule (issue 16995)
Please refer to https://stylelint.io/user-guide/rules/declaration-block-no-duplicate-properties
2023-09-21 13:42:05 +02:00
Jonas Jenwald
e2b7896826 [GeckoView] Avoid bundling the AltTextManager class, since it's unused 2023-09-21 12:51:34 +02:00
calixteman
561aea530b
Merge pull request #16991 from Snuffleupagus/alt_text_edit-boolean
Ensure that all "alt_text_*" save-telemetry values are boolean (PR 16987 follow-up)
2023-09-21 11:04:06 +02:00
calixteman
237b8ce4a8
Merge pull request #16988 from calixteman/alt_text_dialog_others
[Editor] Tweak few values after review from UX
2023-09-21 11:03:19 +02:00
calixteman
67ddabcbc2
Merge pull request #16990 from calixteman/alt_text_aria_label
[Editor] Add an aria-label to the alt-text button depending on its state
2023-09-21 10:56:25 +02:00
Calixte Denizet
b5d18006a7 [Editor] Tweak few values after review from UX 2023-09-21 10:52:58 +02:00
Jonas Jenwald
5660cdfe68 Ensure that all "alt_text_*" save-telemetry values are boolean (PR 16987 follow-up)
Looking at the save-telemetry values they're all boolean *except* for "alt_text_edit" in one instance, since `this.#previousAltText` may be an empty string (looking at the `editAltText` method) and this value may thus become an empty string as well.
2023-09-21 08:36:41 +02:00
Jonas Jenwald
34506f8874
Merge pull request #16989 from Snuffleupagus/more-reporttelemetry-event
Use the new "reporttelemetry" event in more viewer components
2023-09-20 22:06:14 +02:00
Calixte Denizet
c90ea2314e [Editor] Add an aria-label to the alt-text button depending on its state 2023-09-20 21:56:16 +02:00
Jonas Jenwald
fe60db27b1 Use the new "reporttelemetry" event in more viewer components
By utilizing the recently added "reporttelemetry" event, we can avoid having to manually pass in `externalServices` to a number of viewer components.
2023-09-20 20:18:10 +02:00
calixteman
f2d75d9221
Merge pull request #16985 from calixteman/btn_bg
[Editor] Change the colors for the disabled Save button in alt text dialoag in HCM
2023-09-20 19:03:01 +02:00
Calixte Denizet
7d0bf376d0 [Editor] Change the colors for the disabled Save button in alt text dialoag in HCM 2023-09-20 18:58:31 +02:00