Commit graph

12 commits

Author SHA1 Message Date
Ed Sanders 80ab08a1cd EditCheck: Only preserve native selection on desktop
On mobile, we need to deactivate the surface so that
the checks are visible where the virtual keyboard
would be.

Change-Id: Ib108f8a0abb6fe9b503ac394188d3468f9a316cb
2024-12-18 13:37:41 +00:00
Ed Sanders de84364ae8 EditCheck: Don't scroll in mid-edit checks except on user interaction with EditCheck
Change-Id: Ic8268a87eb010ddac480f0375ad794dc2682e1f6
2024-12-18 13:37:41 +00:00
Ed Sanders e9c7503c72 EditCheckDialog: Reset currentChecks on setup
Change-Id: Iaf0fb4122f5c7168f55e73beaf9c69add1912ae3
2024-12-18 13:37:41 +00:00
Ed Sanders a26c145574 Allow checks to be dismissed by fragment or ID
Bug: T379804
Change-Id: I8c275a560971b95e3bbcf4921633e17c0078511f
2024-12-18 13:37:41 +00:00
Ed Sanders fccb247285 EditCheck: Only pause if check is not rejected
The pause is to show the user the result of their
action (sepcifically it was designed for AddReferenceEditCheck
to let them see the reference in the page).

If they reject, there is no need to pause. This applies
to mulit-check too where it would cause a pause before moving on
to the next check.

Change-Id: I57f881b37051cc2e5ea6bda23fea66a2de2b342d
2024-12-12 12:57:47 +00:00
Ed Sanders 81197ac662 Improve timing of sidebar opening and scrolling selection into view
* Don't try to draw the selections/highlights while the sidebar
  is opening.
* Only make the scroll call once (after the sidebar is open) to
  keep the animation smooth.

Change-Id: I1c1d23b0dad07aa44a2bd10ebb32149e796d6738
2024-12-12 12:39:03 +00:00
David Lynch 37627ad9ae EditCheck: move checks to a sidebar
Bug: T341308
Bug: T379443
Change-Id: I66147d95fc23d0f72960ff93a76b3e5ba65ce44e
2024-12-11 20:20:00 +00:00
Ed Sanders e62327efe0 EditCheck: Replace highlights/selection with fragments
'selection' is only used by AddReferenceEditCheck but this can
be done in the act method.

Provide a method for getting highlight selections from
these 'affected fragments' that can be overridden.

Change-Id: Ida661682efd8ae99d945f0e310ea3ce12efc8770
2024-12-05 12:24:36 +00:00
Ed Sanders 793a1364aa Allow multiple highlight fragments to be passed to an edit check
Change-Id: Ie9d7010a1a0ee6a5c570d4fd6988fc876afdb9e2
2024-11-05 11:41:50 +00:00
Ed Sanders d06e9dbc31 Update VE core submodule to master (0e82a6db8)
New changes:
db0f21d03 ve.ce.Surface: Check dataTransfer.files is non-empty
e1cd78933 [BREAKING CHANGE] Move selection handling code to SelectionManager
b4b63a463 Move drag/drop handling code to DragDropHandler
540272769 Use the onPaste handler for dropped content
d3f9d8485 ClipboardHandler tests: Run tests in series
1232c0420 Tests: Introduce ve.dm.example.annotateText to simplify runs of annotated text
69d7ca482 Apply an annotation to imported (pasted/dropped) text
0e82a6db8 ve.ce.ClipboardHandler: Fix async test running

Added files:
- src/ce/annotations/ve.ce.ImportedDataAnnotation.js
- src/ce/ve.ce.DragDropHandler.js
- src/ce/ve.ce.SelectionManager.js
- src/dm/annotations/ve.dm.ImportedDataAnnotation.js
- tests/ce/ve.ce.DragDropHandler.test.js

Local changes:
- Implement new selection manager architecture

Added files:
- src/ce/annotations/ve.ce.ImportedDataAnnotation.js
- src/ce/ve.ce.DragDropHandler.js
- src/ce/ve.ce.SelectionManager.js
- src/dm/annotations/ve.dm.ImportedDataAnnotation.js
- tests/ce/ve.ce.DragDropHandler.test.js

Bug: T371996
Bug: T377427
Bug: T78696
Change-Id: If8d38246badf919c32915beda7c9a14f16e62a8a
2024-10-30 17:52:56 +00:00
Ed Sanders 4cd67004de editcheck: Remove mw.editcheck.Diff
This object just contained a pointer to the surface and dm,
and had one utility method.

Move the method to mw.editcheck, and pass around a surface model
or document model to other methods as appropriate.

Change-Id: Ie81d76dea2823b633328f982ee20027808bfc8e3
2024-10-17 17:10:02 +01:00
David Lynch d69d366469 Edit check API
Change-Id: Ic5504eb2fe8d1d3f22e88abe1dd88790bdfd8b9c
2024-06-12 11:01:04 +01:00