* Use the event's timeStamp rather than the current time in the event
subscriber.
* Instead of using ve.trackSubscribeAll() and then branching on the topic
prefix, just use ve.trackSubscribe( prefix, ... ) to bind prefix-specific
handlers.
* Round timing measurements after performing arithmetic, and use Math#round
rather than Math#floor.
* Rename 'getDefaultTiming' to 'computeDuration'.
Change-Id: I27ff1622ecea9b82d414f871441f127fc2dbd2cc
* The methods from upload.rb are moved to a newly created gem:
https://rubygems.org/gems/commons_upload
* upload.rb is changed to simply call the method from the Gem.
* Gemfile is updated accordingly.
Bug: T89718
Change-Id: I229fbcd1b8c3cb03885947509aef27f0ae583a1c
New changes:
0ceafd5 Fix V8 deopt for ve.ce.BranchNode#onSplice
01d2d4b [BREAKING CHANGE] Store originalDomElements instead of htmlAttributes
96005a7 Localisation updates from https://translatewiki.net.
42e672e ve.ui.Toolbar: Don't call #updateToolState from #initialize
373562d Localisation updates from https://translatewiki.net.
Local changes:
Update for htmlAttributes going away
Change-Id: I576a1e5d5883b03d1fff6666926f80a5682a280f
Otherwise it gets built lazily when building the view tree,
and that makes it difficult to instrument it separately.
Change-Id: Ie8c2027e87a87e59323165f0edbba49c4a66d1b3
Tracked stages are:
* activate: wraps the entire activation
* domLoad: API request for Parsoid HTML
* parseResponse: parse HTML, interpret things like link cache data
* convertModelFromDom: create linear model from Parsoid DOM
* createSurface: build DM and CE trees, create DM, CE and UI surfaces
* initializeSurface: initialize UI and CE surfaces, and CE nodes
* setupToolbar: toolbar setup and attachment
* initializeToolbar: toolbar initialization (deferred so not wrapped by activate)
Bug: T89536
Change-Id: Ife5664e872bad68dcf3c123f274f9c8a38a06031
Generalize MWResourceQueue and MWResourceProvider so they are
extending the general classes from ve-core. This also allows for
tests in ve-core on the resource queue system.
* Depends on ve-core change I5346081317e *
Change-Id: If34cd99334f4ccb93015c3646f68ae3040b9c5d7
It's slow, especially on large pages, and it's triggered
very infrequently these days, and only for known bugs.
In the future we should replace this with a debugging
interface that displays the DOM diff between the original
DOM and the round-tripped DOM, as opposed to the boolean
interface we have now.
By extension, this also means the visualeditor-needcheck
tag won't be applied to new edits any more, although
its registration and messages are kept around because
edits with this tag still exist in page histories.
Bug: T87161
Change-Id: I909153492a5786b4b69fccd42ce3c1d4bdb3a059
Follows-up 0547d8c8.
It's still very difficult to test whether this code works, but
doing $( newDoc ).remove( 'selector1' ).remove( 'selector2' )...
demonstrably doesn't work, because 1) the selector passed to remove()
filters the collection, it doesn't descend into it, and 2) remove()
returns the collection of removed items, so chaining it doesn't work.
Instead, use $( newDoc ).find( 'selector1, selector2, ...' ).remove();
Also normalise selectors.
Change-Id: I97f3b28c4d5120f08e5d7fbf4598ddc0c01d4ecf
In beta labs some local files displayed their links without http://
make sure they all are normalized to have the prefix.
Change-Id: Ia19de9b31e234138603495f06750d202654a8788
* Screenshot taking logic and rspec tests are deleted from this repo
and moved to
https://rubygems.org/gems/screenshot
* Dependency on chunky_png is removed from VisualEditor
(and added to the screenshot gem).
* The method calls are renamed accordingly.
Change-Id: I6a0e2cc770a07f36f63bc536db109b63d38a4fd2
If an MWTransclusionNode is inserted, then immediately modified,
a race condition can occur where the GCN rendering arrives for the old
node, which is already detached and doesn't have a ModelHtmlDocument
any more. Protect against this happening so we don't cause a JS error
by passing null for the document parameter to ve.resolveUrl()
Change-Id: I1964baa3a9b294b130620e9b34a695584fc55143
New changes:
e325520 Create APIResultsProvider and APIResultsQueue and add tests
4ead645 Make newFromAnnotation test construct doc2 from data, not HTML
804fb17 Remove useless getDataElementFromDomElement / getDomElementsFromDataElement tests
c2fc6a0 DomFromModelTest: Call modify() on the document, not the data
1535331 Inline ve.ce.View#renderAttributes
Local changes:
Update modify callbacks to work on document instead of data.
Change-Id: Ia875d11627adc38f78dd5010f9ab03e8b083b448
<link> and <meta> tags are thrown away by the clipboard so make sure the
data-mw element is converted to a span.
Bug: T86401
Change-Id: Ia2869b9496ea5ce4f474e254bb4125f85152c7cf
Iff in clipboard mode:
* Set data-ve-no-generated-contents on the main element
regardless of whether we are using orignal DOM elements.
* Set data-ve-ignore on siblings, again, regardless or
where they came from.
Bug: T89658
Change-Id: I82ad60f0b90e0c6ce88c42737bd36d1a289bcf34
Originally added in 5036099906.
* Account for bug T89513 for 'tempdisable' (was done for 'enable' in 9cba9910c6).
* MediaWiki core now loads user defaults in a separate module not
subject to page caching, making our workaround obsolete.
Keeping defaultthumbsize as that is intentionally ignoring the user's
preferences.
Change-Id: I07a7aa8e08c728ddeba67f36a98e989c220dcb50
Some modules had the same name as test modules in VE core,
and this broke expand/collapse behavior in QUnit.
Change-Id: I7fd0b454b3377b7c289ddebbf91146fcbe5945c4
Mouseover and click events in the category widget should also call
their parent method.
Depends on the ooui change Ie576f4422
Change-Id: I73b574b28a5a60e4f046f3008407dbf4b1323b58
These are currently in page-specific mw.config. As these are
not related any page, they should be in the global export.
This is needed to have our tests (and code base) run error-free
without a MediaWiki page.
Bug: T89434
Change-Id: Ic42bcd14028772ff0c06e28c76ffaf156f8b985f
New changes:
50ccb23 Localisation updates from https://translatewiki.net.
9240a51 Update OOjs UI to v0.7.0
Local changes:
* MWTemplateDialog: Stop waiting for removed loading promise to
finish, as in OOjs UI I2bfa013 the loading promise is removed
since iframes were the only reason we needed it.
Change-Id: I1500f480d40d06e417366014b9c2a76f7ce9c29b
Empty file pages are returned as results in search but have no
useful information, and, more importantly, no 'imageinfo' property.
Make sure these are skipped by the provider.
Bug: T89303
Change-Id: I3374f7373efc1f5751acb16819973594abf56a56
Add the display for the actual uploader, and change the label
for the artist to "Artist" for differentiating the two roles.
Bug: T88835
Change-Id: Ie939572e7c1240321556f6f81ed9e67d792a339d
* Ensure that the toolbar remains inside the target so that
target triggers still work
* To keep the page title beneath the toolbar, move it inside
the target on setup, and restore it on teardown
* Have teardownToolBar/DebugBar return promises so we know
when teardown is completely finished.
Change-Id: If2a9ce9a653aed51d21c8e8dd7795f2533d54f70
This addresses some old technical debt.
We also shifted the re-use reference test to the cite.feature where
it belongs in the current architecture.
Paired with Rummana for the update
Change-Id: Ie50ac5bffec0d0ab6bcad704c323639f8e8553f0
The media test was passing against garbage wikitext markup match.
Fixed the steps so that it fails when it should.
Change-Id: I3d8dbc959c6244968dd9ac58af663b81cb115dc6
If data-mw.body.html is not set, search for the element
whose ID matches data-mw.body.id and use its contents.
.body.html is still used for new content: new references
use .body.html, and if a reference using .body.id is
changed, the changed HTML is output in .body.html.
Bug: T88650
Change-Id: I5d614927256d59a3ab20b0bd6e882b5cb8fcda20
New changes:
23a9e11 Localisation updates from https://translatewiki.net.
9f1350f Update UnicodeJS to v0.1.3
f869803 Localisation updates from https://translatewiki.net.
ce11fb3 Use css class rather than jQuery show/hide
0d4584c Fix definition of ve.Range#containsRange
8a5c7d9 Fix rangeInsideOneLeafNode
8ce5f60 Localisation updates from https://translatewiki.net.
d2104aa Track originalHtml in internalItems
9823624 Localisation updates from https://translatewiki.net.
Local changes:
Update tests for internalItem originalHtml change
Bug: T88650
Change-Id: Ie7532cade7e3006e1bf39c12c97962da415ab993
I'm hoping the sleep() calls here are temporary. VE seems to be
loading an intermediate page before showing the diff view, or
sending an invalid onload event or some such.
Also updated the locator for the Basic text input
Change-Id: I73795f6b1ff0da42f8afd92598ab6786c9a0b88b
* Add margin-right: 0 to suppress OOUI's inline spacing feature. We
can't use margin on the widgets because of how draggable works (there
may not be "gaps" between draggable elements or funny things happen).
* Set our inline spacing to 0.5em (2 × 0.25em) rather than 0.75em, to
match OOUI styles.
* Space at bottom and right rather than at top and right.
Change-Id: I90f4f47dd0c55de18e5915e610a76d0140438cc3
The ready handler unconditionally focused the surface, even if
a different panel was shown. Prior to aa9eb9545 this didn't
actually break the search mode, because the search input was
focused after the image repo information came back, which
usually happened after ready. However, aa9eb9545 instead focused
the search input from the setup process, which is too early.
Also introduce this.currentPanel as a way to track
which panel is currently visible.
Bug: T88881
Change-Id: I0189fbeed73ee9103e45fec4a1bc8d4ee1b6ed40
Change the media search widget to work with resource queues and
providers. Create providers based on the user's filerepo settings
and aggregate their responses with the media queue. Stop asking
for more results from providers that are depleted.
Also fixes a rather nasty infinite-loop bug where the API returns
only very few images, and the UI keeps asking for more.
Bug: T78161
Bug: T88764
Change-Id: I65aed3446cd1f056476c56e6e04522c70e49e595
It conflicts with the #toggle method. This happened to work because we
never called .toggle() here, but 8a53b2cd introduced such a call.
Follow-up to 8a53b2cd.
Bug: T88831
Change-Id: I4dd955d015d2bda50e4146b0ae2ddff557dcd346
Replace instances of .show() and .hide() with ooui 'hidden' class
to make performance better.
Related ooui change: Ibf7c99aa4aad
Bug: T87420
Bug: T88736
Change-Id: I3af8a322e88b7ba3364f350819d6dbcdc8b13270
The class name of the formula image changed.
Follow up to
Ib50d0381f5743db1f6678609cd4eca5a56a8682b
Change-Id: Ic78b5be572c8757c4d8f35bd878adf4ecf7c8fb0
offset_element was used for iframes, and now there are no iframes,
so there is no reason to use it.
As for browser_zoom, it makes more sense to do it in a separate function
and not as a parameter to capture_screenshot.
Change-Id: Ibfce33b7a56d883cc1a6c92c19d40c499681fa47
* Restore the Formula editor screenshot scenario, which was disabled in
I3e892baa9cb2c8c1303fab232a2b1c64ebdd8f26
* Get the 'More' element clicked to show the formula item.
* Fix the definition of the formula editor textarea element.
Change-Id: Ib50d0381f5743db1f6678609cd4eca5a56a8682b
* Add classes to elements in the page settings dialog boxes
* Restore the scenario that was disabled in
Id41d1329d22679b6a61201ceafc81eafa222d909
Change-Id: I5636e744daec2adf013d399bfb019e4d47912083
The editable area sometimes didn't appear, so a .when_present
call is added to check that it's on the screen.
Bug: T88663
Change-Id: I0c5e29a9d7f9d0a22ca8392df9f7a5b857f20d7d