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
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
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
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
* 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
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
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
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
Some parts of this are heavily based on how the existing defaultsort stuff works.
Relies on I9bb80b01 and Iba2fff95
Bug: 56868
Change-Id: I5f0ce2ec36e82b04d9e1357b14046867c1dd3b60
Frame images are not resizable; disable the media size widget when
the frame type is selected.
Depends on the change in ve-core:
Id1010798d30e2928358acb5694c429b9ab68ad57
Bug: 66353
Change-Id: I8c8da8933c51ba709a834731425d19445009673f
New changes:
a53f101 Update OOjs UI to v0.1.0
1fa518b Update OOjs UI to v0.1.0-pre (15f4156bac)
257af53 Use ContextWidget instead of toolbar inside context menu
5f10e73 Follow-up Ia2076a42: Mark getDescription() as @inheritable for Annotation, Node
Local changes to adjust for the ContextWidget changes.
Change-Id: I47f68f5cf1b9583dab9bd0109fa6504481bdfc67
MWBlockExtensionNodes would duplicate their children in the output DOM:
they would appear once as restored from originalDomElements, and again
because the contents then got converted to linear model data and
that got converted back to DOM as well.
Bug: 66396
Change-Id: I4513ffc1cf3eb8726ac94252fe1526fac6d8bdf3
Make sure that image model and media edit dialog initialize the
default size properties according to the scalable correctly.
Also make sure that on creation of a new node or edit of existing
node's properties follow on whether the image is set to default
size or custom size.
Depends on the ve-core change:
Ia6bb041bfc050a48d8c40bbff4b73ed2893085e2
Bug: 66149
Change-Id: I6f60fba28e11a111bb40a100148ed1f12d518890
Previously they were always inline.
MWExtensionNode is now a mixin and classes which inherit it should
now inherit MWBlockExtensionNode or MWInlineExtensionNode.
Change-Id: I0ddcabeb63acdf852e252c41add5233c00723f4c
Update DM node constructors for I81c60d4a in VE core.
New changes:
2587549 [BREAKING CHANGE] Fix Node construction arguments
Change-Id: I8d4f37b631fe85a78c72407937477963ac49f87a
Fixing the behavior of alignment select and checkbox in the edit
dialog. Adding a check on all UI events to make sure they update
the model only if the model value is different than the UI value.
Also adding the ability to check the default direction of a
specific node type, to predict default alignment values.
Bug: 65916
Change-Id: I82f624fa788383dec0a12afb473aef01593e670e
Make sure that if the image has default dimensions set up in the
media edit dialog, the scalable (and image CE rendering) receives
the correct dimensions.
Bug: 65886
Change-Id: I6bd2d1681a3d780554767fe77b2640795170184f
Make sure svg drawings on block images have the default size as
the wiki default, no matter their original set size.
Also took the opportunity to clarify the synchronization method
for scalable and image type in ve.dm.MWImageNode and call it when
the image model is loaded to make sure the details are always
synchronized before edit.
Followup to I682d832e456a501836f33ed1dfc7dbd78a4edf53
Bug: 62893
Change-Id: Ic47016d171634c532092067957cc2c3d431e9746
Once more with feeling; default alignment when switching between
inline to block and vise versa. This time, the problem was mainly
that the checkbox for position cannot be updated without triggering
its update event. It was triggered, however, before setting up the
positioning, which caused the model to run positioning twice and
get things wrong.
Another smaller fix in this commit was done to make sure that
the image model remembers the previous alignment, so when image
type changes from inline to block and vise versa, and the alignment
was default, it can recalculate default value for the new node.
Bug: 65564
Change-Id: I6c16a7855ad7e3ce302fa3d042d0a402251b31f0
This time in the installment: Allow the model to predict the type
and default alignment based on parameters rather than just the
current status. This is important for initializing images, especially
inline images whose 'align' attribute is null or undefined, but must
be examined for default alignment.
Also changed:
* Make sure that model operations change each other, rather than
let the editor change 'unrelated' model parameters.
* Use selectItem rather than chooseItem to avoid emiting the 'choose'
event on edit dialog initialization.
Bug: 65564
Change-Id: I8c23fc53e7738d59565294d8b98fe7351bebbc67
In getFilename(), decode URL encoding and replace the search
for 'File:' with a more standard ./ stripping regex.
The ./ regex came from generateContents) in the CE class;
made that code use getFilename() instead.
Also apply decodeURIComponent() to the result; but protect against
exceptions because it's a useless piece of garbage.
Bug: 65611
Change-Id: I7e81a8dc26d1c636c6571d96f43a394a53490587
Make default alignment a computed value, and make sure the GUI listens
to 'choose' instead of 'select' events for SelectWidgets so to prevent
recursive calls and make sure the GUI is updated properly.
Also added a default alignment check on type change so the user can
visually have an indication that the new image will have a different
alignment. The user can then change the value manually.
Bug: 65564
Bug: 65596
Bug: 62852
Bug: 65617
Change-Id: I55e16775d18e0a4bf7f1fa73bbb3aa5e0aa51a79
Relies on If6fb5856 to do anything useful, but degrades gracefully to current
behaviour.
Bug: 50964
Change-Id: Ia35c2f433a1a604d7794f367fd10dbccac102b89
When inserting a new node, get the proper fragment range and ask
for the node from within the search loop. Also added a fallback
for the case that the node wasn't found, and a caption cannot
be added.
Change-Id: Ic19d9b1cd2739435137f633de09a13b25a11a0cb
* Fixing a typo in the getImageNodeType() method ('frame' was supposed
to be 'frameless').
* Adding a check for type 'mwBlockImage' before editing/adding captions
* Using the node's getType() method instead of the model's where possible.
* Adjusting default alignment, so that when we check if it is set, it gives
us the actual answer, which is always useful.
Bug: 65568
Change-Id: I1687d8c7430c723b52448a9e24641e2c30d85d6a
Creating an MWImageModel that handles all image edit operations.
If the new attributes mean a change of image types from inline
to block or vice versa, the model will handle the creation and
insertion of the new node.
Change-Id: Ibe71bc8bd74e4ba5a024ac722432ccf0b8f65e71
Greatly enhance the functionality of ve.dm.MWTransclusionNode#isSingleTemplate
and actually use it places.
Use mw.Title to normalize titles, accounting for case differences and
spaces vs underscores. Also allow an array of template names to
be specified.
Use isSingleTemplate() in the transclusion and citation dialog tools,
which were duplicating this logic. Also document the .static.template
properties.
Without this, the citation tool will appear for a reference using
{{Cite news}}, but not for one using {{cite news}} or {{Cite_news}}.
Change-Id: I18d2bb1b22a5ab269694ad0818b1bb326ef8d1fd
Make sure that each API request per file is delivered once. If the
file appears more than once on the page, the API request for
scalable details will be sent once and cached so there aren't
multiple API requests per image.
Change-Id: I68507a8ceb31b77dbf33d1074939ce6219cf076e
* Move description to a popup behind a little info icon button
* Make required indicator generic status indicator (required/deprecated)
and move to left of the field
* Move param name and actions to above the field
* Show deprecated status and description
Bonus:
* Use auto-focus on CitationDialog (whoops!)
* Make pages that aren't meant to scroll not scroll (whoops again!?)
Depends on I59211b2 in OOUI
Bug: 53612
Change-Id: I3b968ad14aa6c43b6484e2565a9367d2ebc72fc5
Also fixes some errors in I752705f6
And while we're there, clean up some mostly duplicate functions
Bug: 57169
Bug: 57170
Bug: 57171
Bug: 57172
Change-Id: I1e3dca3868a267e91bccb0ae277012c26ca82174
These were being used indirectly in the MW*Model's. Use surface
fragments instead.
Fixes I0fae3e5ff2bd.
Change-Id: I1d6aa5e00a9315cf7088f87f9e9d828833feec64
ve.dm.Scalable is now a computational model for image scaling and
size manipulation. This commit adjusts the nodes and the edit and
insertion dialog to handle the new scalable model, and by that
use a centralized computational engine for all scaling and size
changes.
New changes:
3ec19fb8 Refactor Scalable functionality
Change-Id: I017a017924f544cc8bc9b7d8245335759ae0e890