Objective:
* Allow fieldsets to not have labels
* Remove label from reference edit dialog field set
Changes:
ve.ui.Layout.css
* Only apply negative top margin if fieldset label is being used
ve.ui.FieldsetLayout.js
* Only add label element to DOM if icon or label are used
ve.ui.MWReferenceEditDialog.js
* Remove label from reference edit dialog's first fieldset
*.php
* Remove unused message
Change-Id: I4a36e819ec6ef73aad80d3fb2f06000cb35ec109
Objectives:
* Reduce the number of clicks and mouse maneuvers required to insert
media, references or template parameters
* Make use of highlighting with mouse movement or arrow key presses,
similar to menus, to suggest action when clicked
* Improve the way media search results look and feel
Changes:
ve.ui.SelectWidget.js
* Add mouseleave handler to un-highlight when the mouse exits the widget
* Document highlight events (already being emitted)
ve.ui.SearchWidget.js
* Propagate both select and highlight events from results widget
* Make arrow keys change highlight instead of selection
* Get rid of enter event, make enter key select highlighted item instead
* Provide direct access to results widget through getResults method
ve.ui.MenuWidget.js
* Use the selected item as a starting point if nothing is currently
highlighted when adjusting the highlight position
ve.ui.Dialog.js
* Add footless option to hide the foot element and make the body extend
all the way down to the bottom
* Remove applyButton, which only some dialogs need, and should be creating
themselves, along with other buttons as needed
ve.ui.Widget.css
* Change highlight and selected colors of option widgets to match other
selection colors used elsewhere
* Leave selected and highlighted widget looking selected
ve.ui.Frame.css
* Add background color to combat any color that might have been applied to
the frame body in the imported CSS from the parent frame
ve.ui.Dialog.css
* Add rules for footless mode
ve.ui.MWReferenceResultWidget.js,
ve.ui.MWParameterResultWidget.js,
ve.ui.MWMediaResultWidget.js
* Allow highlighting
ve.ui.MWParamterSearchWidget.js
* Switch from selecting the first item when filtering to highlighting
ve-mw/ve.ui.Widget.js
* Adjust media result widget styling to better match other elements
ve.ui.MWTransclusionDialog.js,
ve.ui.MWReferenceListDialog.js,
ve.ui.MWReferenceEditDialog.js,
ve.ui.MWMetaDialog.js
ve.ui.MWMediaEditDialog.js
* Add apply button, as per it being removed from parent class
ve.ui.MWTransclusionDialog.js,
ve.ui.MWReferenceInsertDialog.js,
ve.ui.MWMediaInsertDialog.js
* Insert parameter/reference/media on select, instead of clicking an
insert button
* Use 'insert' instead of 'apply' as argument for close method
Bug: 50774
Bug: 51143
Change-Id: Ia18e79f1f8df2540f465468edb01f5ce989bf843
Otherwise links don't get removed as an empty link is not
comparable to a real link with an href.
Bug: 50461
Change-Id: Id8b421bd44cd5c427d0e5cd738c380bc2b1ea719
Previously we only looked at error info/code from the root of
the API response, not the ones from the root of the response
that action=visualeditoredit forwards from action=edit.
This changes the message for e.g. AbuseFilter from:
> Error: Invalid error code
to:
> Error: Hit AbuseFilter: [name of triggered filter]
Also changed default error for other reasons (e.g. hooks of other
extensions that we don't yet have specific support for) to "Unknown error"
instead of "Invalid error code".
Bug: 50472
Change-Id: I3b32eddafd8fff83f323606f9922ac60b5d3b58e
* Rephrased visualeditor-savedialog-error-badtoken to emphasise
that it is the old session that become invalid, not the one
the user started browsing with since in a different window.
* If the session changed, the user will be asked whether they
agree to save with this new session instead.
* We explictly update mw.config so that future save attempts
in the same window compare against the correct environment.
Without this there are two problems when saving and then
making a second edit in the same window and saving that:
- It will bring up the same question again (user A -> user B),
which is annoying.
- If the user logged back in again (new session, but for
user A again) it would silently try with that new token
without asking, thus saving as user A when the user still
thinks it switched to user B. It switching back automatically
is not obvious since we asked them from A->B, so we should
also ask the other way around.
This can be reproduced by opending ve-edit logged-in, then
logging out in a new window, save, confirm anon, save,
open edit again, log back in in a new window, save open edit
in the old window, confirm new logged-in, save.
Bug: 50424
Change-Id: Id055eca1886f85aeaf615f645de29898afc0373c
Per bug 51330, cs (Czech), he (Hebrew) and pl (Polish) should use the same icons
as English (B for bold, I for italics), rather than the generic As; da (Danish),
no (Norwegian Bokmål), nn (Norwegian Nynorsk) and sv (Swedish) should use those
that German (F for bold, K for italics).
Bug: 51330
Change-Id: I1d5937bed658d45ba6a18d8eb77e9e20d55a16cc
An empty document is one which contains no 'real' data, so
we should check for meta-only documents when deciding whether
to add in a wrapper paragraph.
Bug: 50289
Change-Id: Ib3ebf0717aa0c6c51fd1d0b14e95de50b2842647
Some methods apply to all types of LinearData. Also moved to
static so they can be used by the converter on raw data.
Change-Id: I79066d6d3ccde48aea7c0848d56ef86bc70f6656
Without making the code much more complex (and possibly create
performance issues) the warning will fire on pages which already
contain escaped wikitext (when that text is edited). I think this
should be a small enough minority that it won't be an major annoyance.
Bug: 49820
Change-Id: I0f67ec04b890f4add9247be6126bdc086b6ae72f
Adjacent annotations should not be merged if they both
originate from Parsoid. This is a hack because this logic
should be in Parsoid, not VE.
Bug: 49873
Change-Id: If1e23e3039178300d72b1c0c585931417bb603b5
It was being used correctly in the textual replace case, but it was
omitted in the structural replace case. This caused rare, insidious
metadata placement bugs that I haven't been able to reproduce outside
of newFromDocumentInsertion testing, but this might explain some of
the odd category bugs that have been reported.
Change-Id: I1424e482303853f285e4516a93c9609076648eff
Objective:
* Make the majority of link inspector, which is generic to any annotation,
usable for other annotation inspectors
This was merged earlier (f7107fa20d) but broke master, so it was
reverted (092fa74dee). This commit also incorporates 5dcf5d1c49.
Change-Id: Ib9190dee66ce064d69962f9c4c5b3a710be8ad07
Problem:
Adding or moving templates or content resulted in the incorrect item
being selected.
Diagnosis:
Although recently we solved a few issues by making addPart async, it
caused some other issues where callers of addPart were assuming
otherwise
Solution:
Return a promise from addPart which is resolved after the part is
actually added and setup callers to use the promise when needed
Changes:
ve.ui.MWTransclusionDialog.js
* Use promises to auto-select new or moved parts
ve.dm.MWTranclusionModel.js
* Make addPart return a promise
* Resolve promise when queue is processed
* Automatically remove existing items before adding them in different
locations at the time of processing the queue we don't yield between
removing and adding
Change-Id: Ie43c5b89ca4ed34d5f797714e19c9a7e1824cdec
Problem:
Parsoid has a property called "i" which we don't use, but they need for
round-tripping purposes. Since we were generating a structure from
Parsoid data and then generating data from the structure without
preserving properties we didn't use, it was getting lost.
Solution:
Abstract creating a template from data vs. creating it from name. Make
only templates have an origin argument in their constructors, so and
set it within a set of static constructors that create a template for
either data or a template name. Store the original data in the former
case, and use it as a base when serializing.
Changes:
ve.ui.MWTranslcusionDialog.js
* Remove no-longer-needed mw global declaration
* Move most of the addTemplate function to a static constructor in the
template model class
ve.dm.MWTransclusionPartModel.js,
ve.dm.MWTransclusionContentModel.js,
ve.dm.MWTemplatePlaceholder
* Remove unused origin argument/property/getter
* Add serialize method (if needed)
ve.dm.MWTranclusionModel.js
* Move template/parameter generation from data into static constructor
of template model
* Move serialization to part classes
ve.dm.MWTemplateModel.js
* Add mw global declaration
* Stop passing origin to parent constructor, store it locally instead
* Add original data property/setter for preserving unused properties
when round tripping
* Add static constructors for generating a template from data or by name
* Add serialize method
Bug: 51150
Change-Id: Ide596a0ca0ae8f93ffce6e79b7234a1db7e0586c
Previously all it did was surface api response error.info,
which surfaced underneath the edit summary form as mere:
"Error: Invalid token".
Bug: 50424
Change-Id: I60169b42701ae3b88e54626c4ff7050549e6ef55
This allows us to make the token no longer a requirement
for non-save actions while still using the built-in system
for token verification.
Update documentation for "oldid" since it is not required even
outside (paction=save). In fact, if we require it VE loading
fails because it doesn't pass oldid unless it has to when
restoring a specific version.
Bug: 50424
Change-Id: I7b1b50a43648b1cc40a984340846efdb0ba2ecc9