To avoid triggering state thrashing in Sizzle
( https://github.com/jquery/sizzle/issues/311 )
Also account for the fact that missing attributes are returned
as undefined by jQuery but null by .getAttribute().
Bug: T87416
Change-Id: Ib3bc7971920c084568abb6ea0bd822d763b276f2
Focus the page in the booklet layout so the add template
input is also focused at the opening of the template dialog.
Bug: T85484
Change-Id: Id9ae4653dc2a2e1d1dc16c83c540e22e30f4ea55
ce.InternalItem used to .hide() its .$element, but it doesn't
do this any more, so we don't need to counteract this with
.show() any more either.
Bug: T87160
Change-Id: Ic367508d821cc5c65678d4c878edc84911fd8178
Make the spacing between the image title and the description
the same as the space between the description and the metadata.
Bug: T87451
Change-Id: I0d0051cd66072861019b904980c405fa05145b2b
OO.ui.CheckboxInputWidget#getValue was returning strings "true" or "false"
We want to use isSelected (and setSelected to set things instead of setValue,
I guess.)
Bug: T86827
Change-Id: I0b4b8dca00a4aeae4498a30d73e5eaa7c804115f
Show the currently used filename at the top of the media dialog so
it can be copied and used in other pages if needed.
Bug: T54459
Change-Id: Ib1844c997189f7ead0656c5a811d3cab70030f89
Add an info panel to the MediaDialog to show the user information
about the chosen file from the new extmetadata API.
Also, change the way results are viewed:
* Present the search results with their proper ratio.
* Use masonry fit for the search results.
* Change the resizeToBoundingBox method in ve.dm.MWImageNode to accept
a specific side constraint, either 'width' or 'height'. This is also
going to be useful for adding and calculating 'scale' considerations
that affects the image height.
* Add info panel with details from extmetadata including author, license,
date of upload and creation, etc.
* Get descriptions and data according to wiki language.
Bug: T78161
Bug: T74061
Change-Id: I7b4d019825aa89dd178665bd9492a07af15954ac
Also moved around some code from MWCategoryInputWidget to
MWCategoryWidget to be a bit less evilly interdependent.
Change-Id: I0b8a58fb669e232a990b19c4b7f872a320bfab58
Test checks for 'Required parameter missing' message, 'Go back'
and 'Continue anyway'.
Paired with Rummana writing this
Change-Id: I9c3aab7f7af9ccde8f0dadd2839a7a698f7341ee
I think somebody somewhere pointed to this as the reason why VE
wouldn't load when user's common.js has syntax errors, but I actually
can't reproduce that. Not sure if this is needed, but looks like a
good idea anyway.
(Once more, with feeling. Reverted broken attempt: aa531488.)
Change-Id: I252c5c20f75b3bbea51200560408dc4cfc7174f6
This element used the English label. It should just use
the class to be language independent.
I tested by running VisualEditor_save_dialog scenario
in language screenshots for the Persian language. It fails
on master because of the English label and passes with this commit.
Change-Id: I77955b3dfabbf6a15885c085e3fbdd447b04b4db
It will be fixed later. It needs better element definition
to run successfully, and until it's properly fixed
it should be disabled to let other jobs pass.
Bug: T86634
Change-Id: Id41d1329d22679b6a61201ceafc81eafa222d909
The history event reflects actual changes, rather than the transact
event that masks staged changes done to the document.
Bug: T85845
Change-Id: I1faeb97677540f08c512b48b47fafe28b1072579
I think somebody somewhere pointed to this as the reason why VE
wouldn't load when user's common.js has syntax errors, but I actually
can't reproduce that. Not sure if this is needed, but looks like a
good idea anyway.
Change-Id: I3abecacf083c1c9dfb2ea30207a9911eeea54b50
Having MWCategoryInputWidget inherit from ButonWidget makes things a lot easier.
The mousedown behaviour and the positioning of the popup need work but
that is unrelated to this patch.
Bug: T78039
Change-Id: Ic43e64a6a74b8679a15aa8031207ab722e061ab4
$.parseHTML() always returns an array, except in this one case,
so checking .length of the return value almost always works except
when it blows up in your face.
Filed upsteam as https://github.com/jquery/jquery/issues/1997
Bug: T86056
Change-Id: If133a9df4d573b41b0ecb5bde47b3e6ada053921
Breaking change: Introduces new dependency on php5-curl package.
Relies on Id658d925 which introduces this class into core.
Bug: T1218
Change-Id: I2342fa5b0a185f3e8d46d1ba8fa08278970cafb0
* Remove rounded corners.
* Change which borders are used as they change colour on focus.
* Fix margins.
Change-Id: I44f725dfeec5c26f95ba5368ca3848272d66e5be
Local teardown process was jumping to the front of the queue
resulting in the attributeInputs being emptied before they
were read in updateMwData.
Bug: T85818
Change-Id: I24cb490996048e514895c359dedf5945acdecb0a
This cleans up the selectors for the elements on the toolbar
so that they can be tested.
Class names in the form of ve-test-* are added to elements
that have words for labels: 'Paragraph', 'Cite', 'Insert'.
There is no other way to look up these elements in the DOM
except using the UI text, but it is different in different languages,
so this is unusable for the language_screenshots job,
which is multilingual by its nature.
Bug: T76143
Change-Id: Ib0cb67151d893a5d2efccf798d6b25d197ed34d2
The issue is that when running automatically, upon loading the
page to be edited a second and third time, the cursor ends up
in a random place within the existing text of the article.
The test expects the cursor to always be at the start of the
article text, and this happens in Firefox.
I did a cursory check and I could not reproduce the issue of random
cursor placement upon multiple edits to the same article. There
may be a bug here, but it is not trivial to reproduce.
So let's take this test out of the Jenkins builds in the service
of more reliable green tests.
Change-Id: Ie3dd76c5b40f3035d43e6f0a06327adb70900f60
MobileViewTarget.
Due to this being missed, pageName was getting set to a jQuery object,
which eventually got passed as a data value in a $.ajax call, causing
jQuery to emit a TypeError: Illegal invocation.
I guess this needs a MobileFrontend commit as well. Don't think it fixes
all the issues with loading VE mobile though.
Bug: T78710
Change-Id: I431a902563f608a7a33028cd60112f39c57000a4
Local changes:
* Call bindHandlers()/unbindHandlers() in activate/deactivate
* Extend onDocumentKeyDown rather than overwriting it
Change-Id: I0739e71781c5140c54512ab421bdcb6d1df5fbbe
Follows-up b0e8900, 447e8de, d3f26e65.
Contrary to binding a reference, this-overiddes for inline
functions gets messy and fragile. There's also a minor
performance overhead that can be avoided. No separation of
concerns, eiter, as the object is held by the closure.
Also:
* Remove left-over instances of @method.
* Remove redundant '0' argument to setTimeout.
* Use null instead of $ for apply() on static methods like $.when.
* Use .empty().append() instead of .html(). Does the same but
without additional overhead and without confusion association
with "html" which isn't used (it doesn't serialise and re-parse
or clone, it just appends when given one or more nodes).
Change-Id: I797a3667c67d52568150be9be5d043d149f22077
New changes:
fd433fa Add getter for toolbarDialogs in ve.ui.Surface
00c3eb7 Add 'done' button to find and replace dialog
3642dc8 Localisation updates from https://translatewiki.net.
fe2d908 Update OOjs UI to v0.6.0
Local changes to ve.ui.MWFormatTool.css for OOjs UI breaking change.
Change-Id: I6bf98ea988b3e1deb4824189ef8e6d59387b6ffc
Various VE elements use escape to perform tasks. Particularly
difficult are OOUI dialogs which listen to the document and thus
fire after this target's listener, so defer and check if the
event was previously stopped.
Bug: T78201
Change-Id: Ie335f199766923833588202626c3af8e4cbcb9b5
New changes:
96d0936 Mark primary buttons as progressive as well
68f184c Localisation updates from https://translatewiki.net.
b96c9dc [BREAKING CHANGE] Rename method cmpOffsetPaths to compareOffsetPaths
862f31d Convenience compareDocumentOrder method
b5e2b87 Update OOjs UI to v0.5.0
Local fixes to correct for breaking change I32608c7f in OOjs UI.
Change-Id: I64f5e2f6ccc0056bfa9eda5e65e87789b97b8ad5
Make the image results align to the full width of the dialog. This
fix uses dynamic values of the width of the container rather than
a hard-coded value so it should work properly on all themes.
Bug: T78050
Change-Id: I05bb0d8a8b13c246840382b12e098d0579180016
New changes:
9929b6d [BREAKING CHANGE] Make ve.init.target an OO.ui.Element
Local changes:
* Fix target constructors now they generate this.$element
Change-Id: Ia6bf604c67305834a3f73863a10336cfbb83fa77
New changes:
776e801 Delimit text nodes in debug observations
72643bc Remove debug bar hiding now it is handled by the surface
cf1e167 [BREAKING CHANGE] Multiple surface support and demo
Local changes:
Account for detachable toolbars in core being setup in a different order.
Change-Id: I29156948711d55ba5f6dd4f6c35ca0e4cca32373
This doesn't quite tell us about the user's first interaction with
VE (if they open a dialog, for instance, it could be minutes before
that results in a transaction), but it's a good start.
Bug: T76524
Change-Id: I6bac987332802d7363ed65a471b2b1ece67086d8
New changes:
fc4af20 Fix filibuster expansion bug
3feadb2 [BREAKING CHANGE] Refactor for multiple surfaces
Local changes:
* Use target.getSurface now that targets can have multiple surfaces
* Remove debug bar code now surfaces manage their own
* Remove import rules code now implemented in base target
Change-Id: I18d6f9f2f36431959d31347b4c1952a1aca1350e
Make sure all surface widgets have documents that are initialized
with the direction of the parent document, so the alignment is set up
correctly.
Bug: T71969
Change-Id: I6e5f003e18a9c5808d9a4b148eddf0d0f7e29e67
This API doesn't have the ability to track any other data
in addition to a name and a duration in milliseconds, so
we add the target name ('mwTarget' or 'mobile') to the
event name and discard all other data.
Change-Id: I25ae0243f8983142d7755b65b05c18d5df36a253
Move reference style hack to MWReferenceNode.css, and move
heading style hack to ve.init.mw.Target.css
Change-Id: Icbd53f8df998c9f7bcc701b7c29dc226dfc5c05f