On mobile, we need to deactivate the surface so that
the checks are visible where the virtual keyboard
would be.
Change-Id: Ib108f8a0abb6fe9b503ac394188d3468f9a316cb
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
* 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
'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
This is mostly cleanup from 4cd67004d removing Diff, which was the
original caller of the moved functions.
Change-Id: I015cb310527d9e7593e4ba6ac15ac204435d9ab4
This lets us encapsulate everything about a check in its JS definition,
which makes it much simpler for other extensions or gadgets to create
checks.
Change-Id: Ica23fc26a576d55addb001e4baf78b3702927208
This reverts commit cf8a08f76c.
Reason for revert: these errors are still happening
Bug: T333710
Bug: T380234
Change-Id: I4b4a061757316bf720fecc7cfd971737b68d122f
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
This method is highly specific to reference insertion. If we ever need
it for another check it can be moved back with a more specific name.
Change-Id: Ia629c8672281f33d45ea1fff6630af9bd331d80e
* Pass just the ve.dm.Document to shouldApplyToSection, instead
of the whole diff.
* Do the quicker range check first in getModifiedRangesFromDiff
Change-Id: I1bda3a77c1c51f50fd7baadaa3619cf6719a073a
Clean up accountShouldSeeEditCheck since nothing is calling it but the
new method inside BaseEditCheck
Follow-up to e947e53f98
Change-Id: Ic55187bb77f5ef003369313b76a65897fb3be392
This was accidentally removed in d69d366469 during its refactor.
Because of the change to how checks are decided to be shown, I've made
AddReferenceEditCheck always be required -- later code in
hasAddedContentNeedingReference assumes that it's loaded anyway, so a
wiki deciding to configure it to not load at all for some account types
would have broken saving.
Bug: T373692
Change-Id: I007cd705451581ebacfa12e8ac5502bd1bc56a38
preSaveChecksShown + preSaveChecksNotShown = preSaveChecksAvailable
allowing us to use simple stat counters to detect errors in check
generation.
Follow-up to 57daf35bd6
Change-Id: I0586b766b5beec3bd059c90875ad0e2d1f092fab
Replace it with a hasAddedContentNeedingReference that'll need to be
kept in-sync with the internal logic in AddReferenceEditCheck while
we're tagging this.
Follow-up to d69d366469.
Bug: T367920
Change-Id: I9f4f96bf5c6c4b7b3131b1435426b2e283c9833a
They generate a lot of false positives in this extension.
Since this is client-side code, the worst that could happen is a
browser tab hanging, not any real security issues.
Change-Id: I177cfa7e57a6b7b528d558d2cba076e85fd0271f
When EditCheck is the first item in the menu, make the
anchor pink as well.
Relies on the :has selector in modern browsers.
Change-Id: I66e760742da25b3797529b0c65a8d90871a0a1da
Adds two new configs:
* ignoreSections, array of section names that'll be compared
* ignoreLeadSection, bool for whether to ignore the lead section
Bug: T346949
Depends-On: I7ded925b91b1d86b3c76c4135c85a3f0be1dee5e
Change-Id: I44f18fadcafbe011008d8abff566e2ccd7682f4f