The promise is supposed to return a function that can be used
to lazily generate the visual diff, not the visual diff itself.
This was broken when switching to arrow functions.
Bug: T364635
Change-Id: Ifa971333aa22af346bb62d031dc20afc8979992c
This line was introduced by If59979f.
This action is only invoked from the 'safe' action when the dialog mode
is 'info' - uploads are under 'upload-info' instead - so I believe we
shouldn't end up here from an upload and whatever condition this was
guarding against is no longer a concern.
Bug: T362015
Change-Id: I6a6551eab3fb698a6ae781be4623b48e4b4c7edb
Follow-up to
I2495fe32c2d540be50450d715b049173f2f8727d
Done with the help of Matma Rex at Wikimedia Hackathon 2024.
Bug: T361103
Change-Id: Ica328233cb6172277e66d2341cfb53f87f8aff67
* Remove need for manual hacking of sub groups via "msg" strings
carefully prepended to every assertion.
* Improve CI details, by reporting the specific case that failed,
and local dev via ability to re-run each case, and reporting names
directly in the HTML Reporter and CLI summary.
* Reduce need for assert.async() and tracking of callbacks, especially
to improve failure details in case of Promise rejection.
Current logic was likely to cause a confusing timeout instead of a
clear failure if the promise ends up rejected.
QUnit propagates these as part of awaiting and asserting the test
closure's promise value (as async fn) automatically.
This approach also avoids the pitfal of a falsely passing test
when an assertion inside a done() handler was never reached.
* Use modern for-of where possible to remove need for closures and
arrow functions. Thus reducing complexity of test code, where
complexity should be kept lowest to avoid false confidence.
* Use plain for-in instead of overly complex Object.keys().forEach().
Change-Id: I934a266e75e64371081f104cfb867fb2c282c84a
This is not great, but it's a start (and unblocks other pull-throughs).
New changes:
c401efc98 build: Replace jsduck with jsdoc for documentation
16ba162a0 JSDoc: @mixins -> @mixes
9e0a1f53b JSDoc: Fix complex return types
449b6cc0f Prefer arrow function callbacks
1539af2c8 Remove 'this' bindings in arrow functions
b760f3b14 Use arrow functions in OO.ui.Process steps
57c24109e Use arrow functions in jQuery callbacks
9622ccef9 Convert some remaining functions callbacks to arrow functions
f6c885021 Remove useless local variable
1cd800020 Clear branch node cache when rebuilding tree
Bug: T250843
Bug: T363329
Change-Id: I0f4878ca84b95e3f388b358b943f105637e455f9
Despite its generic name, this class exists just for the
template dialog and does 3 things:
1. Provides generic accept/reject override messages
2. Provides a new function signature when the prompt
and success callback are passed
3. Focuses the delete button
(1) and (2) can be provided by a local helper function.
(3) should be implemented upstream, although given this
was done to prevent users taking destructive actions
accidentally I'm not sure why this should be overridden
here.
Change-Id: Id5aa018310eded7a3552a182d19ca16b040abcbd
This reverts commit 5a54315fc2.
Reason for revert: Merged by mistake. Probably doesn't hurt, but
doesn't help either.
Change-Id: Ic38f1f0b0628968888763f15c85ef3a2f4a9890f
For the invalid border color we'll use the current border error color.
With CSS custom properties on the horizon, we'll easily replace them
consistently in the future.
Change-Id: I1ec266e90a974cf79576ee7db6287ea4eac94656
This actually creates an (expensive) clone of all attributes. Even if
this particular code is only interested in a single one of them.
I checked and it's purely used for reading, not writing. So it
doesn't make a difference if it's a clone or not.
Change-Id: I428e684ea2fa20ffcfcc53b618f3fc032d930c75
New changes:
70279c60a Refactor SpecialCharacterPage into SymbolListPage + SymbolListBookletLayout
Local changes:
* Use new special character layout
Added files:
- src/ui/layouts/ve.ui.SymbolListBookletLayout.js
- src/ui/pages/ve.ui.SymbolListPage.js
- src/ui/styles/layouts/ve.ui.SymbolListBookletLayout.less
Deleted files:
- src/ui/pages/ve.ui.SpecialCharacterPage.js
Bug: T120512
Change-Id: I357595ae490b36bcf5dd477a95c5684f3a246753
This patch promotes a consistent design decision across projects in
MediaWiki core, extensions, and skins. The darker red color meets the
W3C Web Content Accessibility Guidelines (WCAG) at Level AA that text
or images of text must have a contrast ratio of at least 4.5:1 (or 3:1
for large text).
Bug: T343239
Change-Id: I0f8db861b029c61d524416379a1a842f5137c8cb
Small fix to support new HTML markup for headings, which will soon be
used by Parsoid page views (T269630) and by the old parser (T13555).
This fixes two issues that were only apparent when using
`$wgVisualEditorEnableVisualSectionEditing = true`:
* When starting an edit from a section edit link, the viewport was
not scrolled to align with the clicked heading and thus didn't
provide a smooth transition into edit mode.
* If the editor was started from a section edit link, then when
leaving the editor without saving changes, the viewport would jump
to the top of the page instead of returning to the clicked heading.
This is similar to change If71d4d8292 in MobileFrontend editor.
Bug: T13555
Change-Id: I89f8abac521e635f8eaa782703bdb6f6323098b0
This causes saveWorkflowBegin/saveIntent to fire as soon as the save
button is pressed. If edit check is enabled, it will be part of the save
workflow in timings.
Mobile was already behaving this way.
Bug: T352130
Change-Id: I3942fd63057c97365d28a443bcc5ac1cd43a8ae6
This patch promotes a consistent design decision across projects in
MediaWiki core, extensions, and skins. The darker red color meets the
W3C Web Content Accessibility Guidelines (WCAG) at Level AA that text
or images of text must have a contrast ratio of at least 4.5:1 (or 3:1
for large text).
Bug: T343239
Change-Id: I517a8f5bee4f62267b37e66a8da7500ca547217e
1. The module always exists because this file is only
loaded from MobileFrontend.
2. If the module doesn't exist, mw.loader.using will
just reject anyway.
Change-Id: I6724078b362782813576cad2459e7b7903655e5e
The enrollment happens in ArticleTargetLoader so that the bucket will be
set for init logging.
Bug: T342930
Depends-On: I9c7c0fb52a6ec68609df6b518c7d35ddd98a95bf
Change-Id: I03c8dc8beb2eb267c052b856a30343ecab3a7657
Instead of inserting the editSwitch menu manually to the WikiEditor
toolbar, use the 'secondary' section which is already aligned to
the right.
Bug: T308423
Depends-On: Iff6d80628ebb5ec5685136fa02c2345eb5b49d42
Change-Id: Ic307f9dc7ad976862c8d8c6551ed29e6071f655f
As mentioned in the ticket access to this library is now
deprecated and consumers should require the module. The existing
method is replaced with the method in the migration table in the
Phabricator ticket.
Bug: T348807
Change-Id: I72a5242399d2cd04b5c9fbee947dc59d94c0ba7c
The URL parameter turns out to be a bit painful for people to use in
some situations.
Bug: T350749
Change-Id: I7c88dc604dd321a7c78810b21f7ad8306ff9dab6
Link is fixed by having the gallery image search results automatically
link to the image, which will resolve down to there being no `link=` in
the output. This lets us preserve whatever existing link has been
applied from source when editing gallery images later.
Follow-up to Iefc520b8513e833665dae9d5c3a9dca2762264a6
Bug: T350912
Change-Id: Iab21f72b7f1625d75fe52471b33718606c469518