Because the mode label is set after measurements of the foot are made,
the body of a ProcessDialog was set to overlap the foot.
At some point T93290 will be fixed, but in the mean time we can solve
this problem by setting an initially.
Bug: T92986
Change-Id: I995d5ecd81b86ee188cf237f74487ec70480e297
If a references list node is selected, open the dialog to edit it.
Otherwise just insert the references list for the default group, since
this is what the user wants to do in 99% of cases.
* Replaced the simple 'referencesList' command (which opened the dialog)
with a custom implementation in ve.ui.MWReferencesListCommand, which
inserts the references list or opens the dialog like before.
* Removed the ability to insert a references list from
ve.ui.MWReferencesListDialog, since it should now never open without
a references list selected. If it does, throw an error.
I considered the behavior of always showing the dialog if there is at
least one references list already in the document, but I think it would
be confusing if the tool behaved differently depending on the state of
the document (rather than merely current selection).
Bug: T71727
Change-Id: Ifbbfa28548de9c0435c5174fb7762079f59bac54
Add a dialog to group the possible citation types and allow the
user to choose the right citation dialog for them.
Depends on Ibf29417 in VE-core; useless without I3d9caef in VE-core.
Bug: T62768
Change-Id: I22a64265475b1b4c94b46c5af196bd08331a05e7
When calculating whether to show the 'read more' button on fields
that are configured 'descriptions', use a threshold to check if
the height is enough to be shown.
Bug: T87265
Change-Id: I0601e4fa92cb58903641a146500cf560bc029425
Again. Originally done in I5a664f86, the crucial part of which was reversed
in I1500f480.
Bug: T89913
Change-Id: I39b0cdcdb5f76fa75f506c874ef6223d8d8d53e6
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
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
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
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
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
Prevent another api call for image sizing by caching the chosen
image in the media dialog with the imageInfoCache.
Bug: T88187
Change-Id: If2d905eeb5907f29b6839692509dfc07a06c230e
Previously was using a margin so the scrollbar floated 1.25em from the
edge of the dialog.
Remove Apex-specific hack.
Change-Id: Idc953c492a6527a9216b77256d406fc3435ec0a9
Use a queue for the method that lays out the result images in
the rows; this queue will only run if the widget is visible,
to make sure that the calculations of the masonry view work
as they should.
In better words: Only cue the queue if the widget is visible.
Bug: T86802
Change-Id: Ia8a30a6a5cccd98a1201443d672e4a6ab4aa946f
When the user changes an image to another in the media dialog, we
already have API info that includes the original dimensions, media
type and other information that is required for the Scalable object
to compute the new current dimensions. We can use this info if it
exists instead of asking for another API call. Also make sure to
update the filename when we change an image in the dialog.
Bug: T87267
Change-Id: I9d86959b99b3f3dfed92255a9dba9a8fdd352dcb
* Set the src attribute only when the image is actually
visible in the search results.
* Display the thumbnail image we have from the search
results and then update with a larger one from the API.
* Request for more media results on a higher threshhold,
when the user views 2 rows above the last available
result.
* Correct the resizeToBoundingBox and simplify it to work
properly for a non-square bounding box regardless of
constraints.
Change-Id: If024b0335ce6a5d2d0eafdbfdfe1030dcaac3a75
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
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
The history event reflects actual changes, rather than the transact
event that masks staged changes done to the document.
Bug: T85845
Change-Id: I1faeb97677540f08c512b48b47fafe28b1072579
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:
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
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
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
Aside from the confusion and differences between substr() and
substring() and IE8 bugs with substr(), substr() was removed from
the spec as of ECMAScript 5. It's been standardised in the
optional Annex B section of ES5.
Change-Id: I221ef6ae6956ce20dd9bb74510500f747d04c3b1
Only change the panels (and focus the caption surface) after the
surface is actually appended and initialized.
Bug: T76074
Change-Id: I3d514f38b5fd9f794c4ff8c44a64f5f3475a84bd
Because a lot of toolbar customization was removed, use an evil
hack to get this in there for now. Should be cleaned up later.
Bug: T76082
Change-Id: I0fd5ddc6fa11162deb615f0b387d6d59c5cc4a3a
Make sure the dialog is listening to the correct event for when
caption surface changes.
Bug: T76074
Change-Id: I214947a440e4f78adf1541d8008599fe65ac8b2c
Also push it into correct place in the toolbar, and disable it from media and
reference dialogs' toolbars.
Change-Id: Icc3bf056860e35def13e03e77ffc6782acc4196a
Uses the generic sequence detection now available in core instead
of a custom hack that had to been manually bound and unbound to
every surface and surface widget.
As the sequence detection looks at just-typed characters the behaviour
has reverted to showing a auto-hide message. This resolves an issue
with the previous system whereby typing in the same paragraph as existing
wikitext patterns triggered the warning.
Depends on I6a4d71d in core.
Bug: T53751
Change-Id: I7d914b1b60a1cf8c79a724e5f634e1e666c9562d
Local changes:
* Rename paste rules to import rules (also used by drag and drop)
New changes:
f5d83f8 Remove data-parsoid removal hack
99f938f Create 'preserveGenerated' mode for cloneElements and use in copy
938b44d [BREAKING CHANGE] Rename paste rules to import rules
c51288c ve.ce.Surface: Move insert HTML path to DM
10ce4cf Provide a FileDropHandler for HTML files
701bb9c Provide a FileDropHandler for CSV and TSV files
ca6b444 build: Update update-oojs.sh and update-oojs-ui.sh scripts
Change-Id: I5cfa15ab3efd03e2c64c2f9f725cb3098f53b32a
Also remove toolbar definitions as they can now be derived from
command availability.
Depends on If32d514a in core.
Change-Id: I2313f3cc2531686b27f96dc1110b28bb4b295f89
New changes:
ff237d4 Fix z-indexes in core
e88d43e Localisation updates from https://translatewiki.net.
cf61803 Consistently use ve.ui.WindowManager everywhere
f9dfdb8 Update OOjs UI to v0.1.0-pre (23565e7519)
f79f7e3 Update OOjs UI to v0.1.0-pre (8f8896196f)
c8201dd Update OOjs UI to v0.1.0-pre (9ed4cf2557)
Local changes for the breaking change to OptionWidget and sub-classes.
Change-Id: Ife6abd312d4dc97be67cb84eea4cb9c6a0a31b1d
setMode() is called multiple times, but it didn't
check whether the mode being set was already set.
Because it's a setter, make it idempotent.
This fixes the problem where the first input will
be focused first, then blurred later, but it
introduces a new problem because the label for
the 'mode' ActionWidget is set from setMode().
To solve that, factor the setting of this label
out into its own function and call it on setup.
Bug: 73138
Change-Id: I9bb127f22f6c0b745b393c523ec42f320fc85cf3
When show/hide options is clicked, the inputs in the main pane
move as the outline transitions in or out. This causes any dropdowns
below these inputs to become mispositioned: they don't move
because they're in an overlay.
To work around this problem, blur the active input when show/hide
options is clicked, so any dropdown attached to it is closed.
I tried blurring and immediately refocusing the active input to
force the dropdown to reposition itself, but that looks awkward
because of the transition (we'd have to wait for the transition
to complete before repositioning it, and during the transition
it'll stay open in the wrong place).
Bug: 72789
Change-Id: Ibd963690573af905066839f7276077089fa893c6
Also change this.$overlay (which doesn't even exist) to
config.$overlay in MWTemplatePlaceholderPage and document it.
Compensates for I39df86373ea in oojs-ui.
Change-Id: I4a233c058439d6cfb38d80ece890c8fe57d58f49
Would put this code in onBookletLayoutSet, but that doesn't appear to be
getting called in this case.
Have to detect whether or not we should be changing the disabled status, rather
than just setting it straight away, which would break every other case where
onBookletLayoutSet is called.
Bug: 63158
Change-Id: I6f62479291424d9b2ee0e42481dec9d085169c63
Rather than make a new function to determine whether it should be apply-able or
not (and run some checks again), move the enable/disable call into a new
function to do these checks and set the result.
Bug: 72191
Change-Id: I133afa1784e1afd44054f93ed84018894f7c6400
On initialization, the image model has an initial scalable that has
the given currentDimensions from Parsoid; these are usually correct.
However, in cases where the wiki settings do not fit the user settings
and the images appear smaller or bigger in practice than the values
of the wiki-defaults, the initial hash will store the wrong values.
We will only know what the real values for the comparison will be
after we get them from the API and the calculation; only at that
point we can update the image model initial hash.
This is important so that later the dialog can properly understand
whether to enable the "apply" button if a user changed an image
to custom size and then back to default.
Change-Id: If17b50cc4a39993f98a20a3fec3ddf5d8cb400b3
Changes:
* Override ve.ui.SurfaceWidget for use in MW
* Add mw-body-content class to surface view container
* Assert 1em sizing for surface view container to prevent
mw-body-content from applying its own sizing
* Add new scripts and styles to RL config
Bug: 71652
Change-Id: Iac86facdc0c7a0e48c0f3617e2f6c2e7f001525e
We really shouldn't need the inner overlay for this,
we should be able to deal with popups being in
oo-ui-window-overlay. But for now, we're not, and
this fixes the current problems.
Depends on If16d16d2b in oojs-ui.
Bug: 72052
Change-Id: Ie06056b96db19ac4caf1f9c0e3a1c49cfddc6682
Wikia has done some work on the template user experience, including
automatically showing all available parameters without the use of
TemplateData. In order to make our changes, we had to make some changes
to VE-MW.
ve.dm.MWTransclusionModel.js
* this.specCache is created so subclasses can reference it.
* Promise handlers in the fetch() method have been broken out as class
methods so they can be overridden in subclasses.
ve.ui.MWTemplateDialog.js
* addPromptedParameters() has been moved to the
initializeNewTemplateParameters() class method so subclasses can
overwrite. In Wikia's implementation, we have a method of getting
all parameters and a dialog that shows all of the parameters, so the
request to addPromptedParameters is overwritten.
* Added a done() handler to the transclusionModel promise for Wikia
extensibility.
Change-Id: I073c5850420e7719e82957f879423c2717af674a
The title attribute for byte counter in MWSaveDialog is replaced with the mixin TitledElement from label widget in OOUI
Change-Id: Ic4b37fac9e16b6db9091a16376e06d55bbb3d649