Switch to using FieldLayout for laying out forms.
New changes:
64650c6 Update OOjs UI to v0.1.0-pre (424b40373e)
Change-Id: I757aecf3485673f54aa9e7f38e88c079dda4451d
Also update use of OO.ui.PageLayout to work with changes in OOUI.
See: I58a279dd949a867a4698a791103d5a6f2bd4b67f
New changes:
8b545f4 Update OOjs UI to v0.1.0-pre (3a9a4c1da8)
Change-Id: Ib5063db055a63082d08b2858bffb9f854d76c01b
This escaped the icon -> indicator migration because it was rolling
its own class (!).
Now using IndicatedElement to render the indicator.
Also, cleaned up some incorrectly named CSS classes.
Change-Id: I7f3369f2ffd3c34f0d29c0a235d1a15ddd68d1e3
When a new search is performed in the MWMediaSearchWidget,
image thumbnail details are extracted from the API's imageinfo.
In some cases, this parameter does not exist. MWMediaResultWidget
relies on that parameter to get image details like 'src' and
width/height. Without it the search fails.
This fix makes sure that the thumbnail result is only displayed
if there are 'imageinfo' details at all. Otherwise, the image
result is ignored.
Bug: 61392
Change-Id: I5261059bb42d3a57441514eafaa0bffa3a3c3ba4
Adds setting and unsetting the #REDIRECT status of the page from the page
settings pane of the meta dialog, and toggle whether this is a static
redirect (i.e., it is not automatically changed when its target is moved).
If the page has a redirect set, the meta dialog will be shown on opening
the page so that users can adjust the redirect more swiftly.
Bug: 47328
Bug: 50878
Bug: 57173
Change-Id: Ibd89cf04486799f292b9fd045dae5bc23fcf6fd4
When an image with default size has a size change, the defaultSize
attribute in the data model must be set to 'false' so the new size
can be updated in parsoid.
Bug: 61270
Change-Id: I84388aec62674a3e3c6773f29bda7156254b5f4a
Update VE core submodule to master (84ced37) and update calling code
for changes in OOUI.
Depends on Ic967b88d55daf48d365487e17f76488b3f02c60f and Ib599b9bd5028e2df084fcc3da657aeb7f1569d2a
New changes:
94f03c3 Undefined variables first in selectNodes
62b5648 Localisation updates from https://translatewiki.net.
10c5a18 Don't descend into handlesOwnChildren nodes in selectNodes
4ed2432 Update jquery.client to MW's master (45192156d7)
d7e24b8 Localisation updates from https://translatewiki.net.
babb9da Localisation updates from https://translatewiki.net.
4639d18 Localisation updates from https://translatewiki.net.
a561537 Localisation updates from https://translatewiki.net.
8f7053a Localisation updates from https://translatewiki.net.
7112cc2 Update OOjs UI to v0.1.0-pre (a290673bbd)
Change-Id: Ie7d58472619509782f23a7dedc1ec27c3dcc7543
This is a bit of a workaround for scalable image nodes to update the
current size rather than only the original one. This is done so the
MediaSizeWidget in the media edit dialog is fed the current dimensions
of the image even without the image being saved.
Ideally, the node's 'currentDimensions' property should be constantly
updated to current dimensions. This workaround fixes the given bug, in
which all images show the original wikitext/default size even after
being resized.
Bug: 61052
Change-Id: I902d1f51b1389f2f9b2b5c871b578ee2244a946f
For wikis that are installed in root directory, the API parameter
'scriptDirUrl' is an empty string. This change makes sure it is not
ignored.
Change-Id: Ib58adf76c184c32c0cdbb9dba31db1e4028fa383
Adding a type change to the media edit dialog. Also changing SelectWidgets
to ButtonSelectWidgets for consistency.
Bug: 38129
Change-Id: I9c855e6381d970b5f08460822366f6333af24f82
Symptoms:
* When adding a template with required parameters, the last parameter
is initially focused
* Parameters and parts appear out of order, and adding/remove/moving
them shows them in almost random placement
Diagnoses:
* Parameters are auto-focused when added, and parameters are auto-added
in forward order
* TransclusionModel's process method had a bug in which the code to
derive an offset from the item being removed would not be reachable
due to an inverted logic statement
Prognosis:
* Fatal, with a 10% chance of survival
Treatment:
* Set focus on the first parameter after auto-adding required
parameters to a template
* Invert the logic in TransclusionModel's process method, so that if
the index IS undefined we will proceed to define it
Change-Id: I299053b63045ec933747831f1b4aa63493760f8b
Implement new logic in ve.Scalable from I5b4f0f91b.
Also update VE core submodule to master (57ed8d3).
New changes:
59a0afe The great image scaling rewrite of 2014
Change-Id: I24a2976036310d3814cc7d1853a68745e0499bd5
As other widgets may be interested in the image info, this should
be part of the DM node, which the media edit dialog then fetches
and uses to populate the MediaSizeWidget.
Other fixes:
* Remove spinner, not really necessary as the orignal size button is
disabled if the orignal dimensions aren't set.
* Don't wait until image info call to resolve to initialise size
widget values. These should always be available instantly from the
attributes.
Depends on I9530ed4257e88b in core.
Change-Id: I394f49941b621059bc08c8a8f79471b2fe16c7d8
Technically these are possible to render (although there's currently
a Parsoid bug preventing it) but really references should just contain
one single paragraph.
Change-Id: I405d75a0935d3f4610e10b942b48fa0fa2679a20
Extend default paste rules to prevent lists/tables/references/headings
as applicable.
Also update submodule to master (76ff210).
New changes:
f1a927f Internal paste rules and type conversions
Bug: 59603
Change-Id: I952f98477219a55d25a2bd817344bde58a4862d4
When $wgDebugToolbar is enabled, a debuginfo key is always returned from the
API.
Unfortunately that broke the ve.isArray check on the result, breaking the
opensearch calls by the linker.
Change-Id: I907ef6fc2589581cf7333af3968b63b483af65a9
The setup method just assumed this.node was of the right type, and
would just crash if it wasn't. You could select an image, open the
gallery inspector, and it would happily try to inspect it until
crashing because there was no .mw.extsrc attribute.
Bug: 60502
Change-Id: Idf0e9cf7ccaa37e607374ced150db732926a19f8
getAnnotationFromText was renamed to getAnnotationFromFragment,
update MWLinkInspector for this.
Bug: 60374
Bug: 60378
Change-Id: I202a2777f0202dcf42c5968daf8bdf5583b0a11b
* Remove the this.mediaSize custom store object and replace
with a hash function and the document's IV store.
* Remove this.inputs/this.fieldsets namespaces.
* Calculate this.filename as soon as this.mediaNode is set.
* Rename getMediaSize to getOriginalDimensions
Change-Id: I2030aade5d96555451f6a390d0aa3d44b860841f
Adding the ability to edit image size in the media edit dialog.
The size is now a separate widget.
The following changes were made:
* The dialog was changed to a booklet with 'general settings' and
'advanced settings', in preparation for other edit features.
* The original image maximum size is fetched from the API and cached.
* Maximum size is limited to the image's original maximum size.
* Aspect ratio is kept when changing height or width, using original
image size to preserve a sane ratio through the MediaSizeWidget.
* If an error is found in the size, the image will retain its previously
set dimensions.
Depends on MediaSizeWidget: I3d0f9348a52
Bug: 38129
Change-Id: I2946fb21c46ce05583b219f665ef68928188899e
Also update for indicator changes in Iaf7726150
New changes:
f981943 Fix toolbar indicators in demo
e849941 Update OOjs UI to v0.1.0-pre (11632fcada)
Change-Id: I16c38259ccedbfba8260f8a508b572cee6389517
* Add ULS, which was removed from VE core
* Add experimental mwlanguage module which adds ULS integration
* Hook in ULS to the existing language widget
Also update VE core submodule with changes:
* 1e92abe Generic language inspector
Bug: 47759
Change-Id: I325a4dcc316d0334fadfcaa46ad3acd45c6bf84b
New changes:
* e7e2833 - Update uses of Push/IconButtonWidget to ButtonWidget
* d9d9eb5 - Update OOjs UI to v0.1.0-pre (d9bab13)
* d9bab13 - The Great Button Refactor of 2014
* 22b93ef - Update OOjs UI build (88b2871)
* 88b2871 - Fix png transparency on required.png
* 670c468 - Add i18n
Also:
* Update uses of Push/IconButtonWidget to ButtonWidget as there
is a breaking change in new OOjs UI version.
This was separated from commit I325a4dcc316d0.
Change-Id: I82220d15221c52be03feafcfc85c2bd6c12ba462
The down arrow is no longer default, so it needs to be specified
explicitly.
Updates submodule to include indicator changes
(see I0a1faef11a1e7e6ea3e44275c85f2efafae4dc9a)
Change-Id: I32aef3ea2e66fd823aeb07dac06cfefba9954270
Adds a checkbox to the page settings pane of the meta dialog that lets
users set or unset the __NOEDITSECTION__ flag on the page.
Change-Id: If1eca58e28d214021f5f5582856e595d4d0fbc43
This creates a new panel in the meta dialog, "Page settings", where page-
level settings will be, err, set. For now, this exposes just the
behavioural switches for the presence/absence of the Table Of Contents –
__NOTOC__ and __FORCETOC__.
As part of this change, the meta dialog is renamed to "Options" to be
less confusing, and the icon for the meta dialog is changed to the
generic one for dialogs, which was previously unused. The page settings
pane is provided first in this list, given that the categories pane
(amongst others) is now directly accessible through the toolbar menu.
Bug: 56866
Bug: 56867
Change-Id: I33ce05c19d2e19b249e1cefd26fd0e3697d0085d
This commit switches from using hard-coded media source urls to utilizing
MediaWiki's API call for meta=filerepoinfo. The API call is done only if
needed when the media insertion dialog is loading, and is done only once
per session.
Bug: 50673
Change-Id: Ia5ad9a8c00cca6cbbbc890359dc529e29e1a6be7
getDirectionFromRange returns the direction property of the ce nodes under
that range. That method is mostly useful to recognize the overall block
direction of a selection or fragment.
The method is currently used in the following locations:
* ve.ui.Toolbar onContextChange - as a means to recognize the current context's
block direction for the icon directionality.
* ve.ui.MWExtensionInspector - if the selection is text and not an existing node
the input directionality adjusts to the context direction.
Bug: 57421
Change-Id: Ifc01b8e5dc0a2fe39d221e59e452c5cfad709a2d
With blocks comment out where they're not wanted.
Bonus: Actually make the pasteSpecial command available in these
contexts.
Bug: 58404
Change-Id: Ic77c252ddc9ae54019b2d86ee5f8a6f4febf4292
This introduces a small reorginization of how commands are registered so
that they are associated with their corresponding symbolic names.
This change is mainly to aid with event tracking, but it might be
generally useful for other things as well.
Change-Id: I2ccf4522f786a54c1f5395008b7b0333a1fa6072
Bonus: give both the language name and page name
lang and dir attributes.
Further bonus: reintroduce message that was deleted
earlier with all of its original translations.
Change-Id: Id137ff9a069799b6c09574b72f450eac6665d144
It used to be that when you closed a dialog, the thing that the dialog
inspected or inserted would be selected. For insertions, the selection
will now be collapsed immediately after the inserted node.
For modifications, the original behavior was kept, as it makes sense to
keep selecting the node that the user had to select in order to access
the dialog. For removals (only possible in the transclusion dialog),
the selection ends up as a collapsed selection at the location where
the removed node used to be; this was already behaving correctly,
as we get this behavior for free with offset translation.
Bug: 54957
Change-Id: Ibd14e8084d67a9ee85e3bac075c3fb50f27b05b2
Also...
* Update OOjs UI to v0.1.0-pre (5ffe63d088)
* Make template parameter text boxes shorter (3em down from 10em)
* Reorder extendObject calls to not modify incoming config objects
* Allow level option to default to 0, rather than specifically defining it
* Use icon button widgets with remove icons for parameter, placeholder,
template and content removal buttons
Change-Id: I29db9d814fab5cf4debd0fc7bab6f51475cb0f94
Let's experiment with this via our local Gruntfile. If it works
fine we can install it in Jenkins (similar to node-csslint).
Verify through $ npm install && npm test;
Fixed all outstanding violations.
Also:
* Added syntaxhighight to ignore.
* Added imetests (which contain unformatted JSON) to ignore.
* In ve.dm.ModelRegistry#matchTypeRegExps, removed redundant
!! cast from the [+!!withFunc] statement which was hitting
a bug in node-jscs. All callers to this local private function
pass a literal boolean true/false so no need to cast it.
* Removed "/* key .. , value */" from ve.setProp, though this
wasn't caught by node-jscs, found it when searching for " , ".
* Made npm.devDependencies fixed instead of using tilde-ranges.
This too often leads to strange bugs or sudden changes. Fixed
them at the version they were currently ranging to.
Bug: 54218
Change-Id: Ib2630806f3946874c8b01e58cf171df83a28da29
The CategoryPopupWidget's popupClose() method was checking for the
category having changed by comparing its sort key value to the existing
one, but it failed to account that null !== ''.
Change-Id: Idb6a84dc32706d90dea70dceb0b9b3a26ed70110
Use OOJS-UI's newly-extended paged dialogs (in e08eb2a03b) to refactor
how the Transclusion and Meta dialogs work, splitting out the code for
each of the panels into its own file and simplifying extensibility.
The Meta dialog (ve.ui.MWMetaDialog) now has two self-managing panels:
* ve.ui.MWCategoriesPage for categories and the default sort key
* ve.ui.MWLanguagesPage for language links
The Transclusion dialog (ve.ui.MWTransclusionDialog) now has four:
* ve.ui.MWTemplatePage for a template's primary panel
* ve.ui.MWTemplateParameterPage for each parameter of a template
* ve.ui.MWTemplatePlaceholderPage for a placeholder to insert a template
* ve.ui.MWTransclusionContentPage for non-template transclusion
Additionally, the Transclusion dialog has been slightly cleaned up:
* Replace add/remove events with replace events in transclusion model
* Actually return and resolve a promise (as documented)
* Get rid of "origin" info in template models
* Add method for adding required parts
TODO:
* Decide how and when we will choose between advanced transclusion and
template dialogs
* Work out design issues with how template descriptions will be visible
and how adding parameters will work if only showing parameters in
outline
* Add preview to template dialog
* Consider ways to further improve pages for use in continuous mode
WARNING:
* Right now the template dialog gets overridden by the advanced
transclusion dialog because they have the same symbolic name and the
latter is registered later than the former. To test the template
dialog, just change the symbolic name of the advanced transclusion
dialog.
Change-Id: I51e74b322aec9a4c3918e6f792bdb3d318060979
Still broken, this time because PagedOutlineLayout / BookletLayout
usage wasn't updated.
This reverts commit c6cfe763bb.
Change-Id: If0d37d396ecf3bb09f026d4432c5d7e30f040085
Also, as OOjs UI's StackPanelLayout was renamed to StackLayout, and the
showItem() function to setItem(), fix uses in VisualEditor.
Change-Id: If153e5e7c3a7c60e3d62e20aac8fabd4eaaa73c2
ve.ui.MWReferenceDialog.prototype.teardown:
* Pass ranges rather than nodes to transaction builders
* Don't do a removal in insertion mode, we know the removal range
will be empty
ve.dm.Transaction.newFromDocumentInsertion:
* Correctly splice the edited internalItem into listData in the case
that newDoc isn't a document slice of doc
* Rename range to spliceItemRange for clarity
* Introduce spliceListNodeRange and set it to either newDoc's
listNodeRange or doc's depending on whether newDoc is a slice of doc
Bug: 57683
Change-Id: Iae7de7701ae86bed89b707038407243d82249e1a
When the target of an autonumbered link is changed to a URL, it's kept
as an autonumbered link and its target is updated. When the target is
changed to a MediaWiki page, the autonumbered link is removed and
replaced with an internal link with the text set to the target.
So for instance, if you inspect [http://www.example.com] and change
its target to "Foo", the result will be [[Foo]].
The core of this commit adds support for inspecting nodes to
ve.ui.LinkInspector. This support should probably move into a
class in between AnnotationInspector and LinkInspector, perhaps
called HybridInspector or something, but I'm deferring that for now.
LinkInspector allows changes to inspected nodes to be reflected either
as attribute changes on the node, or by replacing the node with something
else. MWLinkInspector uses this feature to replace the autonumbered
external link node with an internal link annotation when the target is
set to an external link.
Bug: 53505
Change-Id: Icb404af84c24574438e4de3ef05bbd1993b593f7
* changes:
Plain text paste with paste special
Use rare unicode characters for paste placeholders
Rich paste
Add fixUpInsertion to newFromDocumentReplace
* Don't use setTimeout() within a change event, because change fires
after the text has already changed
* Don't use .$input.val(), use .getValue() instead
* Don't use .placeholder()
** Reaching into .$input is bad
** Any use of .placeholder() is TextInputWidget's responsibility
** All browsers we support also support placeholder natively
* Remove .editSummaryByteLimit from ViewPageTarget, unused
* Remove ve.bind() wrapping, we already have var saveDialog = this;
Change-Id: I380575fec8d02d1191bfc1f3f235b94c64cd23b6
It looks like it also came from there originally, because it uses
this.pageExists which doesn't even exist in MWSaveDialog. This caused
all pages, even existing pages, to be watched when 'watchcreations'
was set.
This logic really belongs server-side, though.
Bug: 56206
Change-Id: Idf500383b27a93136dc0cfdd60a2e7b2607af95c
* parameter.svg had no opacity set
* replace.svg had a document opacity of 80% in addition to the normal 75%
* re-rendered parameter.png (syntaxhighlight doesn't have png's yet)
Change-Id: I9c990fefaf4f5a7536b884b92523408146d7b2c7
initialize() is currently called synchronously, but once the CSS
transplantation code is fixed and it goes back to being async, that'll
cause problems.
* Add this.setupDeferred and use it to defer setupCheckboxes() until
after initialization
* Move code populating the edit summary from ViewPageTarget into
MWSaveDialog and use .setValue() rather than manipulating the
TextInputWidget's DOM. Defer this until after init as well
* Move clearing of the diff from ViewPageTarget into MWSaveDialog,
and don't connect it to the transact event at startup, only when
we've actually shown a diff
* Remove swapPanel( 'save' ) from ViewPageTarget, instead do this
on setup in the dialog itself
Bonus:
* Document events
* Get rid of onFooButtonClick handlers in favor of array syntax
Change-Id: Idcdae5e013340f4519db4387bab507e714d47941