The bottom margin makes refs with name noticeably taller than
others, however a small margin is required to stop the second
line of text wrapping too tightly.
Change-Id: Iae7e1e6ee29d9090e54aa05feda1854828a03d9d
Instead of using ve-ce-noHighlight we can just set and maintain
this.$focusable using getFocusableNode.
Change-Id: I0a6b2d6444df531b7c235ac9ff08a3ed8a0e99b3
We normalize underscores to spaces in sortkeys in toDataElement,
but when toDomElements recomputes the normalization to decide
if the sortkey really changed, it doesn't normalize underscores.
This is broken, both code paths need to use the same normalization;
we do this correctly for the category name.
This bug appears to date back to the introduction of category
support in March 2013 :(
Spotted in https://it.wikipedia.org/?diff=67220927
Change-Id: Ie3257fa335f3bd24a36c8654f3f5a24e89d7a9b9
Trevor promised to do this in Iafe64a6f but never did.
This needs styling changes to look right. It also means that
VE mobile standalone doesn't have a context at all right now,
which is horrible, but at least this makes MW mostly work.
Bug: 68546
Change-Id: Id8cc4b07905f777f667f36cbcc65e821847142d5
The window refactor removed the 'teardown' event from windows,
but ViewPageTarget was still listening to this event on the save dialog.
Instead, use the opening promise to be notified when the save dialog
closes and call onSaveDialogClose() at that time.
Change-Id: I31a9a359eb14a56b214a1240db08632bda6bc8b9
Because this breaks other subtitles such as subpage breadcrumbs
Instead, deal with the #redirectsub (added in I780c965) directly.
Bug: 68432
Change-Id: I646868916a4480404f6d466fd89f84798d0e9df5
Per the comment above, dm doc direction will be a better
estimate of wiki direction than CSS, which is very slow.
Change-Id: I231738d660b429df1598eaaadf7397b47d35ea0c
When I05f11246ca90a1ce3f741fd93194a827528cd597 gets merged, we will need
this to be able to scroll to a section on iOS (where the content will be
scrolled within a div, not as a whole page).
Change-Id: I6e47edfa8c3a3a46fd7a4f11e4a54955f3694b9b
The image model should go by image attributes (whether it comes from
an existing node or a new one) and not a node.
Bug: 68242
Bug: 68000
Change-Id: I4cabd678157619331b3c47d3b44bc16a28fd7bd7
Update tests and VisualEditor.php for comment node.
New changes:
5885b6a Update OOjs to v1.0.11
ab2d4cb [BREAKING CHANGE] Show comments inline to the user
Change-Id: Ie2787c3e29951cb7940f65bf104e7c9cccdbebd1
It can be very slow on pages with lots of references and
isn't required until you click 'Use existing reference'.
What is required is knowing if the list will be empty for
greying out the button, but that can be precomputed very cheaply.
Change-Id: I56909801a5685bb04e0c83cfb95463f705b8dfae
* Each item builds an MWReferenceModel which creates a document
slice clone. This is very expensive and we only use the model
for getting basic attributes, so defer the evaluation of the
document.
* $.show is expensive and, in this case, unnecessary.
Change-Id: I99abc4c1b17f05559a9cae68b15121a8be6d23fb
It's unnecessary, big and ugly, way too close to an actually useful button, and
adds oodles of complexity to the mire that is VPT without significant user benefit
whilst taking up an unjustifiably huge amount of the already-over-burdened space.
This means that the minimum browser width for English on default Vector to show
the toolbar correctly is now 945px, down from 1029px.
Bonuses: fix MWCancelConfirmDialog's cancel button to be destructive (it is) and
remove a now-recently-fixed comment asking for the save button to be styled using
a generic class (provided by the constructive flag).
Change-Id: I30dc7020121f0dd6907b61ef674a7cb14eb00652
Closing a dialog with specific data means closing it again with
potentially different data, while the dialog is already closing, means
someone wins and someone looses. Silently failing in this case is bad,
because if the first close call was a cancel, producing no side effects,
but the second close call would have produced some side effect, the side
effect would never occur.
The problem here really was that the save dialog needs to be closed
before we can destroy the surface so we can uphold the assumption that
hold and teardown processes are operating on an attached DOM.
The solution is to automatically close the save dialog on teardown,
rather than on save. Since save triggers teardown, this has and identical
user experience.
Bug: 68048
Change-Id: I669448739f168737d4eddd6496189a819ce894b1
New changes:
8bb3848 Bring back global/local specific CSS classes
Local changes:
Use global overlay class to target the z-index hack for the Vector skin.
Bug: 68066
Change-Id: If1b6ba0c9035ff32b61d34ee779a95554883a2ec
Attach event listener to the alternate text and the media size widget
in the MediaDialog, so that when either of those are changed the
'Apply Changes' button is enabled.
Related to I88c3f3dcc7667b3ffdd2a8a8433cb47b82ba1531
Bug: 67684
Change-Id: I03efbed2f9b2909b055d96b9ae1e27b6d5e2bdbf
New changes:
65042de Fix alien test data
83dccbe Add toolbar menu labels to each group for consistency
2e40ef9 Move 'language' tool from the insert to the styling menu, like in VE-MW
6fb21b2 Add toolbar action section to SA demo with keyboard shortcuts tool
f3eb000 ve.ui.Toolbar: Optimise onSurfaceViewKeyUp performance
eb4e9eb Make sure the document is focused when setting a selection
48584d3 Fixes to getRelativeOffset and getRelativeRange
fcc427f [BREAKING CHANGE] Remove generatedContents argument from afterRender
825e4be Documentation fixes in test utils
dbbbe0b Unit tests for showSelection
1ba9234 Don't handle up/down on focusableNodes even if backwards
a667b87 Remove label from 'insert' menu, and instead use a large plus icon
88885b1 Localisation updates from https://translatewiki.net.
1f3b79f Initialize data first
18369b1 Add 'clone' and make 'getDimensionsFromValue' static in ve.dm.Scalable
92e6b7b Switch to 'custom' when MediaSizeWidget updates
d0cd87e Localisation updates from https://translatewiki.net.
1ee21ff Remove lies from documentation
164f07f Safely ignore requests to open unrecognized windows
Local changes:
Work on a cloned scalable when editing images
Make sure the image model handles a cloned copy of the node's
scalable object, which is then shared with the media size widget.
Bug: 67687
Change-Id: Ie3676b715f5bae3d83da03d667cef3a6a847e212
Otherwise you get "Uncaught TypeError: Cannot read property 'messages' of null"
if you press the save button late enough in the saving process. The bug refers
to a different error which I have not been able to reproduce.
Bug: 68073
Change-Id: Ia8fa325f1450329b6e0e4ee9af5302aa4857d637
Confirm dialog was replaced in refactor, so until this is merged the 'Cancel'
button is broken.
Bug: 68068
Change-Id: I77d1c82bf0d68013eef361174a134860a197cd44
This was implemented, but didn't work because the node was removed
before its annotations were copied.
Also fixed:
* Don't do an unnecessary transaction to change attributes of a node
we're going to remove anyway.
* Apply the same link href fixups when converting as when not
(previously, changing the href to 'example.com' and clicking "Add
label" would break the link in interesting ways).
* Do a single transaction from replacement instead of removal+insertion
when possible.
Bug: 67377
Change-Id: I0318ae62c799300fb7696506a9736b839e2c8578
LinkNodeInspector was broken when you clicked away/pressed escape, because data was not set.
Normalizing on data being initialized at the top of get*Process methods if used.
Change-Id: I89728ac558545a6f2c325014b6f457ec6bef17b8
New changes:
56de6f5 Localisation updates from https://translatewiki.net.
f8bda64 Widgetise demo menu
6ac48d8 Localisation updates from https://translatewiki.net.
365e131 builderloader: Omit value for boolean "disabled" attribute per HTML5
706e4b3 Prevent double counting of DM nodes in getNodeAndOffset
b141a7d Update OOjs UI to v0.1.0-pre (d2451ac748)
c5b3921 Localisation updates from https://translatewiki.net.
1606983 Update reference to ConfirmationDialog to use MessageDialog
Deletions:
* Styles for ve.ui.MWBetaWelcomeDialog - not needed anymore because
OO.ui.MessageDialog provides them
* Styles for ve.ui.MWGalleryInspector - not needed anymore because
ve.ui.MWExtensionInspector provides part of them and the rest are being
replaced by programatic sizing
Modifications:
* ve.ui.MWLinkTargetInputWidget - Added support for validation and href
getter
* Split message between tool and dialog title for ve.ui.MWEditModeTool
and ve.ui.MWWikitextSwitchConfirmDialog
General changes:
* Updated inheritance.
* Added manager param to constructors of dialogs and inspectors.
* Updated use of show/hide with toggle.
* Added meaningful descriptions of dialog and inspector classes.
* Configured dialog and inspector sizes statically.
* Configured dialog action buttons statically.
* Interfaced with OO.ui.ActionSet to control action buttons.
* Moved applyChanges code into getActionProcess methods.
* Always using .next in setup/ready process getters and .first in
hold/teardown process getters.
Change-Id: Ia74732e6e32c0808eee021f0a26225b9e6c3f971
I1a7fc7f2 broke cite/template dialog - onDescriptionClick is not defined.
I can't find it anywhere in the VE-MW or OOUI source.
Before my change, it was simply a no-op. But now we try to bind it in a way
that breaks everything. This commit just removes that line since it was
apparently not doing anything.
Bug: 67814
Change-Id: I0b9c3318b3de8530e0ba9e355cd73eb7f70a6b5a
Example:
* Transclusion with html comment in target
{{ Unsigned <!-- ignored --> |Example}}.
* Transclusion with wikitext expression as target
{{ {{echo|Unsigned}} <!-- ignored --> |Example}}.
The first case was handled already (Parsoid strips the comment
when it normalises the target title). The second case, however,
is not handled and ends in template.title being null.
This was already documented (MWTemplateModel#getTitle returns
{string|null}), but not used correctly.
The title of the dialog is unaffected as it fallsback to
displaying target.wt instead of target.title.
Bug: 66724
Change-Id: Ib6696ac3538f6cb9e93da2f6f8666f373247eeb4
To use this script:
*Create an environment variable MEDIAWIKI_API_UPLOAD_URL having API URL
of the site where the images are to be uploaded. (Eg: http://commons.wikimedia.beta.wmflabs.org/wiki/api.php)
*LANGUAGE_SCREENSHOT_CODE environment variable should be set.
Run the upload script by: bundle exec ruby upload.rb
Bug: 62737
Change-Id: I1937aa5f02e3bf587ac65d8d11c3ebbb8b1d0528
XML-like tags in wikitext are not actually XML and don't expect their
contents to be escaped. The contents are usually not parsed as
HTML/XML anyway.
It means that it is not possible for a tag '<foo>…</foo>' to contain
the string '</foo>', but that is prevented by change Ia566452a.
Bug: 57429
Change-Id: I2516a897c85b4a3b79a34ff6cad5d124fbc30170
XML-like tags in wikitext are not actually XML and don't expect
their contents to be escaped. This means that (usually) it is not
possible for a tag '<foo>…</foo>' to contain the string '</foo>'
(see bug 57429 comment 4 for details).
Prevent the user from doing that by escaping the first angle bracket
'<' to '<' in such inputs when the inspector closes.
Bug: 57429
Change-Id: Ia566452ae0ffc9caa3ea48a52e5b8032c33fc9c8
The stylesheet contains workarounds for highlights on references
being drawn in the wrong place, resize handles appearing on headings,
and highlights being opaque.
Change-Id: I78da4d6a751429cd160b693b4a524fc7ea1ef76f
Also implement isInternetExplorer() in mw.Platform using jquery.client.
New changes:
9b2102f Skip over nested handlesOwnChildren nodes in getRelativeOffset
30a9835 Localisation updates from https://translatewiki.net.
5d142a0 Restrict get relative offset to movements of +/-1
7a2c984 Check that the surface has a selection after focus
851a63d Remove jquery.client
8786e53 Add evil detection functionality for IE
96f19ad Disable triple-click handling in IE
d746d42 Revert "Restrict get relative offset to movements of +/-1"
859d578 Revert "Skip over nested handlesOwnChildren nodes in getRelativeOffset"
Change-Id: Ib2e6568a862336e2516e4c519468218ec2a84834
The code previously appeared to add 'reference' (no "s"), but was
failing to do so due to passing variadic arguments to a method
that only takes one arguments (jQuery#addClass).
See also Ifae04e48.
Change-Id: Id59673c8033c82e51577f681221dbfd312da7b8d
Right now our system is so horrible that we need three separate
CSS rules to make the icons appear in three separate places:
1. Toolbar (with contextual directionality)
2. Context menu
3. Top-left corner of dialogs
Also, the icons in the context menu should use contextual directionality
but are using the document directionality because the context doesn't
compute and set a class for the context directionality. This is only
done by the toolbar. It used to work because the context menu *was*
a toolbar, but that changed recently.
Change-Id: I3ebc1ba7dfcd384a2a62664e55a4a77c8dedd513
Looks like I messed up in Ia67f9054 and got a setting backwards
Also prefix titles in a couple more places
Bug: 67384
Bug: 66893
Change-Id: Id6d5841ee1645be62a024308da48ddc6769c78b6
"Go back" should only be shown if there's something to go back to.
So it should be visible if you came from "Change image", but not
if you came from "Insert media".
If the "Go back" button is hidden, the footer is empty, so hide it
completely in that case. Hiding the footer is tricky due to how
dialogs position things, so I hacked around OO.ui.Dialog's lack
of an API for toggling the visibility of the footer.
Change-Id: Ic97c4a2bf7beaa240e5a4dfda1e605752e1f4189
In this fix:
* Adding 'go back' button to appear in the search panel.
* Hiding/showing the correct buttons within each panel.
* Disable the 'apply' button, and only enable when changes are done.
* Load the search query API and send API requests only when the
search panel is up.
* Make sure the search query is updated with the page name every
time the search page is loaded
Bug: 67443
Change-Id: I635986f30579c6358e0cc6fe54fbf97f49c83465
The parameter icons are not toolbar-contextual, so don't style them that way.
Instead, have them take their directionality from the .oo-ui-{ltr,rtl} classes.
Change-Id: Ic94b1e854b36542f7bcde97ead60eddcd56ccbea
Merge the media edit and media insert dialogs. Allow editing
of media properties when inserting a new image, and also
allow the user to replace the image on edit.
Bug: 67170
Change-Id: I35bd95503565dbf95090ee8110284db5a8fbba83
Mobile doesn't want the tool+dialog functionality for those yet,
so move them to a separate module and only load the bare bones
for mobile. We did the same with mwimage/mwimage.core.
Change-Id: I9185ce62f458b3de08cbd28f2a41370d2301de9d
Now that we don't wrap generated content nodes
UL.gallery is likely to be the root, so use an
appropriate jQuery selector.
Change-Id: Ic9d9f4c0fc12daae6cf8252e4d6562366b3d2df2
This puts reference insertion and editing tools into the same menu (yay) and
applying-annotations-to-text tools into the same menu, too.
As part of this, I'm re-labelling the generic reference tool to "Basic" (now
that it has some context for users).
Change-Id: I8b8196d3c2e40237d61c8491ab30e737b82597d6
New changes:
d02cf3d Fix simulation of .prepend() in ve.ce.BranchNode#onSplice
c19fa38 [BREAKING CHANGE] Remove generated content node wrappers
Local changes to remove classes attached to GC nodes
Change-Id: Ide82c96db4803ef59d398788b46fa5d7fb9a2476
Fix failing test in handleDelete. New functionality
moves cursor to content offset.
New changes:
fb595ea Also annotate metadata in TransactionProcessor
028e442 maintenance: Simpler OOjs UI pullthrough-script
fdd5e17 Follow-up I81663929: Use grunt git-build to ensure we get the hash
58db9a8 Update OOjs UI to v0.1.0-pre (a63f03882e)
c790488 Use more standard format for displaying keyboard shortcuts
c15a6f1 Add a ve direction class to all surfaces
5c3a914 Remove old ce-surface classes
2f565b6 Fix up selection after deletion if at non-content offset
7b39328 Correct various things in rangy-position to make it work in IE
Change-Id: Ia46f4c7ded52911574b6c1104682335aaaac08d5
Icons were set to 100% #575757 instead of 75% black.
Also tidy up XML, removing unused transparent shapes and
labelling used ones.
Change-Id: I74b775cbf02686e78004a7e254c1f23b10ae62ed
This will mean it will be more obvious if making a change to the SD or HD version
that an equivalent adjustment may be needed.
Change-Id: I6129220839ef55017fe69d723524ecdf6cf0234f
1. It's a bad check, it tells you if the device supports mobile
events, not if it's mobile (e.g. a touch screen laptop has such events)
2. It's no longer used
Change-Id: Ic46bc5b8fdc33b7c2b2bd67e75d65a5e564dbeca
I don't know why they were top: 0.125em; before, but they were
too far down. Changing this to top: 0; fixes this.
Change-Id: I29645de31f9146e9687f556ec012cd65b517f991
Stop prefixing all requested titles with 'Template:', and don't try to use
colon prefixes when transcluding except when deliberately transcluding from the
main namespace.
(A title prefixed with a colon on MediaWiki is used to create a link to
something that would normally be included as a File/Category)
Bug: 52609
Change-Id: Ia67f9054a56e71153339f961bbbcadb565115748
Our coding style has been upstreamed and first released
in node-jscs v1.5.0 (grunt-jscs-checker v0.6.0).
Change-Id: Ifc0cfc7177946b9d11407f60e38b0177883724c5
This is an illustration of how one can get a screenshot of
the Headings pull-down menu and formatting pull-down menu for the Visual Editor User guide[1].
To see how it works:
* Set environment variable LANGUAGE_SCREENSHOT_CODE to which ever
language you are planning to run browser test for.
(Eg: de for German/en for English)
* Set environment variable LANGUAGE_SCREENSHOT_PATH (optional)
to store the screenshot in that path. If not provided the ./screenshots folder will be used.
* Run the browser test as usual using cucumber or you can use @language_screenshot tag while executing
(bundle exec cucumber --tags @language_screenshot)
[1]: https://www.mediawiki.org/wiki/Help:VisualEditor/User_guide
Bug: 62737
Change-Id: I0f27aec482458b6f04aa913426042f78695d451d
For {{echo}} we would show "echo", but for {{Echo}} we would
show "Echo". Same for {{cite web}} vs {{cite_web}}. Normalize
these template names before displaying them in the context menu.
Reported by Matma Rex on IRC.
Bug: 66893
Change-Id: I84945aab13e53cd0aba529c298b5cc0b2e7eff1e
The issue with the test user getting logged out unexpectedly
causes 'minor edit' to not appear. The test still covers useful
features without this check.
Change-Id: If570d537824025100670e1195794efde17d5063f
* Return the fragment as it may have been cloned in the process
* Do away with DM node tree traversal, we can do everything
with offsets.
Bug: 65706
Bug: 65716
Change-Id: I9a44d562d9365d72adac199725b52555cf0a8009
This reverts commit b7401f838b.
Didn't break everything, but we should probably avoid this getting deployed until I can work out wtf is going wrong with it.
Change-Id: I048143239e998b30aba79fa395a0af1cb06c6a9b
If a block image is inserted in the middle of a paragraph, insert
the image at its beginning so the paragraph isn't broken.
Bug: 65883
Change-Id: I7b82c647d259a6712a771bb4243b269ecbb73c9c
This reverts commit 5565ccca54.
I have no idea what is going wrong on deployment-prep to cause
the error in bug 66792. Let's try to find out.
Bug: 50341
Change-Id: I5041de838128bb55c57baddae01cdcb263626537
Some surface fragment methods return a clone, so make sure
that is written back to this.fragment in dialogs, as this.fragment.select()
is called on teardown.
Functionally depends on If26cc0a2d in core.
Bug: 65706
Bug: 65716
Change-Id: Ia552b2a4c4c59ffc308a4acdecac78a7803a1c1f
Fix tests to include new insertion operation properties.
New changes:
afbd97e Localisation updates from https://translatewiki.net.
d90c212 [BREAKING CHANGE (ish)] Track original data position in insertion operations
Change-Id: Iac86f212bdb78f47f49c6984affe88feaf786765
Causing HTTP 500 errors in ApiVisualEditorEdit.php (calling
getDisplayTitle() on a non-object).
This reverts commit dedc89b5ff.
Bug: 66792
Change-Id: Iaf438660f0623dc05f76294ad847b2fc5e25bed6
Per bug 59604. The TypeError isn't coming from calling ".abort". That
method is always there and part of every jqXHR object, always.
This reverts commit c5dbc13c65.
Change-Id: I43bb53d8c98ca83688020c029d9a3db2c34d54ee
Fix ContentBranchNode tests for getClientRects change.
New changes:
9bbd259 Create highlight elements on demand
a711c6d Indent demo HTML
b1b6562 Use cached surfaceView
d4b48b1 Replace <cite> with <span rel="ve:Alien">
ee5b697 Shields are dead, long live getClientRects
4c599b0 Remove repositionOnly argument from update
Change-Id: Ifa65c46d09864f214ece9349b990f7d8c07d416b
Depends on I468d4eb4 in core.
Uses various hacks to trick the test runner into thinking
an MW target is in use, when in fact we still use SA targets.
Change-Id: If4611307d5d7aaee4af84f86ef82faf9078043b6
Sometimes we have to load images in a way that we can't abort.
In that case, don't bother trying to abort, it just creates annoying console
messages.
Bug: 59604
Change-Id: Idb675f57284d9ffa1fe69c87806009a31711dabe
Use new setupToolbar and setupDebugbar methods in base target.
New changes:
7ff523d Localisation updates from https://translatewiki.net.
3815224 [BREAKING CHANGE] Debug bar refactor
155f4ab Edit HTML mode in demo
Change-Id: I554ce51eae872ab0f741a913bf10394c2a8c3e52
When converting from block to inline image inside a list, insert
the image into the existing paragraph instead of wrapping it in
a new paragraph.
Bug: 65924
Change-Id: Iefbb2a9ae536f51987bdd1aa8b7269bf6245d2b0
This is to pick up the latest mediawiki-selenium gem. We have
removed the HTTP:Persistent gem, which should make builds
slightly slower but also more reliable.
Change-Id: I8d6bfb32e2ed4196186db563838bc025d4c378f6
Implement new language platform functions.
Also remove unused MWLanguageSearchDialog and MWLanguageSearchWidget.
New changes:
4d919d2 [BREAKING CHANGE] Move language functions to the platform
Change-Id: I54c0a8e5816a3c81851f95f1d3062a6091a9f4a3