Drop beta-ness as users don't care and it confuses them. Leaving the preference
alone for now.
Bug: T99963
Bug: T112354
Change-Id: I0e039dec54d528fce24226e76b931b593dd13a9e
New changes:
de69c36 Fix typos in function names
fa80099 [BREAKING CHANGE] Split out linear context from context
db1d28c Only show alien context for focusable nodes
1191940 build: Bump grunt-jscs to 2.0.0 and make pass
Local changes:
* Update context inheritance
Change-Id: I284e2b30cd1903770482ee1c554687b676a2d626
Anything with type=checkbox is coverted, and its label is found,
either by for=id or by finding a wrapping label.
All other inputs are stored in $otherFields for form building.
Bug: T86617
Bug: T70572
Change-Id: I94376fef18d02d2058bb548c11ae17f3dec7268c
Depends on I1ba8978dd in core.
Bonus: remove not-allowed-cursor & highlight title (which was
broken) now that we can display this information properly.
Bug: T106810
Change-Id: I1800490ba1b8e10ff54b26372a8a78661c1c7d68
All link input/title input functionality has been moved to core, so
we can replace the link widget, redirect widget and template search
widget with it.
Depends on Ib463e60cad96 in MediaWiki core.
Change-Id: I452f3b86ead403307072cf904f0553c9771f4300
Previously, it failed in WCAG contrast ratio tests. To make
it pass, font size has been slightly increased and color
has been darkened.
Increased the line height to match increased font size
Bug: T100017
Change-Id: I073ca96c64d5e3af3c01936d34e9e83e9384b4b5
OOUI was effectively overriding this with it's own rule for labels in an option
widget.
Bug: T99267
Change-Id: I82ce2d5ec1a859075d7bf1010ca76cdea9ead1a0
Don't use the full IndexLayout for now as it doesn't
work easily in variable height situations.
Depends on this feature being preset in MW core.
Bug: T97878
Change-Id: I5d949bf69b0721b288c37c1f12210b0265658eb5
New changes:
68959f2 Localisation updates from https://translatewiki.net.
2c0224d [BREAKING CHANGE] Link widget refactor
f81eefa [BREAKING CHANGE] Rename LinkInspector to LinkAnnotationInspector
Local changes:
Adjust for link inspector refactor
Create separate widgets for internal and external link
annotations. Remove annotation specific logic from link
target input widget.
Change-Id: I054c3fe7ac9c61fbc3302471abd58cab89fed5a4
In wikitext editor these messages were in mw-body-content where they
inherited a sensible line height, so apply one manually.
Bonus:
* Make header bold
* Remove some duplication with inheritance
Change-Id: Ia7eaa556815ee6645a85162de03198e5a4dc7b03
* If the user switches to external links, clear the input
* If the user types something with a protocol, automatically switch
them to external links. If they manually switch back to internal,
remember that and don't auto switch them again.
* If the user inputs something without a protocol into the external
link box, prepend 'http://'
Bug: T93699
Bug: T93700
Change-Id: Ia0e3a04f34077e7bd56254112dafd86ad865cbe2
For each template result, ask for the templatedata description. If
that description exists, show it under the template result.
Bug: T53436
Change-Id: If28d1eb082edca6f50c6c15c933a0b7d014eaeaf
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
For the masonry view, the result widget resizes itself according to
the rows and other images in the row. Up until now the resize was
a bit buggy, occasionally missing height/width values. This is
mostly due to rounding errors, but also due to a small double
calculation that is now fixed with this code.
Change-Id: If18adc5280e4bdbb9174b7c7e6e4eadf3c1ab26d
* Add margin-right: 0 to suppress OOUI's inline spacing feature. We
can't use margin on the widgets because of how draggable works (there
may not be "gaps" between draggable elements or funny things happen).
* Set our inline spacing to 0.5em (2 × 0.25em) rather than 0.75em, to
match OOUI styles.
* Space at bottom and right rather than at top and right.
Change-Id: I90f4f47dd0c55de18e5915e610a76d0140438cc3
Previously was using a margin so the scrollbar floated 1.25em from the
edge of the dialog.
Remove Apex-specific hack.
Change-Id: Idc953c492a6527a9216b77256d406fc3435ec0a9
Instead of manually attaching a button to the input widget, use the
newly available ActionFieldLayout.
Change-Id: I3a39f476e6115f97f11ea49fac5bfcd93bd8f841
New changes:
4bb50c3 Localisation updates from https://translatewiki.net.
b7a5b87 dm.InternalList: Use DOM methods instead of jQuery .html()
5b09c9b Localisation updates from https://translatewiki.net.
b709d19 Add generic support of alignable nodes
a1f6c3d Localisation updates from https://translatewiki.net.
c29675a Add find next/previous to command help dialog
1e0b1ed Localisation updates from https://translatewiki.net.
7c76542 Don't render rowspan="1" colspan="1" for every table cell
99eb069 Show a message when an invalid regex is inputted in F&R
Local changes:
Bump command help height for new find next/prev commands
Change-Id: I0196775e499132262ba80acdbf1afc26ef4e8c77
The media dialog used a css hiding hack to make the panels work in
the stack layout. The ooui change in Ibf7c99aa makes this hack not
work and be unnecessary. This fix deletes it.
Depends on ooui change Ibf7c99aa
Change-Id: I57243f9e87c0fde90e069a311e22e96a5b207326
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
* 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
Make the spacing between the image title and the description
the same as the space between the description and the metadata.
Bug: T87451
Change-Id: I0d0051cd66072861019b904980c405fa05145b2b
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
Having MWCategoryInputWidget inherit from ButonWidget makes things a lot easier.
The mousedown behaviour and the positioning of the popup need work but
that is unrelated to this patch.
Bug: T78039
Change-Id: Ic43e64a6a74b8679a15aa8031207ab722e061ab4
* Remove rounded corners.
* Change which borders are used as they change colour on focus.
* Fix margins.
Change-Id: I44f725dfeec5c26f95ba5368ca3848272d66e5be
* Move styles that apply to all targets to ve.init.mw.Target.css
* Move styles for MWPopupTool subclasses to ve.ui.MWPopupTool.css
Change-Id: I34c8a6200ee337debf00c4e432948f1b86f1b60a
New changes:
5eb7294 Find and replace
123a6ad Find and replace tool
557f70f Go backwards through find and replace results on shift enter
4a4ed81 Allow language widget to filter on available languages
Local changes to adjust.
Change-Id: I15e14d6d3c7ee60e465baf3a4df7572851cbca3e
* Ensure surface widget font size matches main surface,
move vector-specific hack to vector css file and fix.
* Fix base font size in non-isolated monobook windows.
* Move monobook z-index hack to global overlay only.
Change-Id: I1607dc77f81ac9c522e09a3b502aeb38fee02178
We were setting the height to 2.25em which just happened
to be right, but it depended on the browser's default
line-height being a certain value. Now that that's changed
with unisolation, the alignment breaks.
Instead of using a magic value, use height: 100%; so it
takes the parent's height. We don't even have to make the
parent position: relative; because it already is.
Also change the width to 2em, which is a much more defensible
value than 2.25em. Previously 2.25em kind of made sense because
that was also the height (resulting in a square box), but
now we don't have that excuse any more.
Bug: 72962
Change-Id: Id617bfaafefd1fc1530fbee29be5d935ec486b92
It works both with and without in isolated dialogs,
but styling things this way breaks in non-isolated dialogs.
Change-Id: Ia498b48d8c199f50df326ddeb61d958cbe2c520d
Indiscriminately styling all .oo-ui-widget elements with a
descendant selector is very evil, use a child selector instead.
The use of a descendant selector broke inline dropdowns.
Change-Id: I25c5007ef1ffab9e59c46c3b11270b8f77610327
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
As of Ieb27c3fd1 apex uses solid black icons with opacity
set in CSS, so make VE icons consistent.
Change-Id: I4c38c497875686503d46a2376a7842f50bf7f2fd
New changes:
5d063a2 Don't use three different coordinate systems in getSelectionRect()
feeb1ae Only focus the paste target if focusedNode has changed
2c1bb97 Update OOjs UI to v0.1.0-pre (4cef83f702)
Local changes:
* Update references to renamed classes
* Update calling patterns element mixins
Change-Id: I330c0e308807597dec31dad8dbf713eb29fdc290
This color is chosen because it is already present as a warning color in
other mediawiki elements like remove button in Link Inspector. A font
weight of bold is also given to make it more prominent.
Things done for this commit:
* A new CSS file 've.ui.MWLinkTargetInputWidget.css' is added.
* Warning text style is added to the class
'.ve-ui-mwLinkTargetInputWidget-warning' in this file.
* The CSS file is included in the style resources in the
file 'VisualEditor.php'.
Tested in latest stable firefox, chrome in Ubuntu 14.04.
Bug: 62761
Change-Id: I89e96e0444f8505123f3c653cf2dd6b74fc83623
By searching for CSS classes that don't exist in the code.
In some cases the classes were used but had been renamed.
Change-Id: I76442a632c18d2133cdf78c4555da149c0a7888c
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
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
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
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
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
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
Add a message indicating to the user that no image results were
found in the media insert dialog in case no results are found.
Bug: 52463
Change-Id: I93aea897d864298bf891a90c2fb147f7d34df06d
* 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
Reorganize stylesheets in VE-MW to match JS directory structures,
and update VisualEditor.php for similar reorganization in VE core.
New changes:
c6ed962 Reorganize stylesheets
Change-Id: I4f1070643744fb2ee6726cb03e012e31a9a05c64
By default, MWTitleInputWidgets are now 30em wide, but this doesn't
work in the transclusion dialog where we want to put the "Add template"
button after an MWTitleInputWidget and have it not wrap to the next line.
So make the MWTitleInputWidget on the add template page 20em wide instead
(this is what they all were before the default was changed to 30em).
Change-Id: I2f33a87427657f4e27939c401436c4ce6441208c
* Truncate beyond 3 parameters
* Add a special option class that, when clicked, shows the remaining parameters
* Use a special option class for the no parameters item instead of hacking the normal one
* Simplify the design of the no parameters item: no icon, centered text
Change-Id: Ia8259e91b42a59c2b08019df36217d485208ad99
Objectives:
* Allow users on-wiki to create tools and dialogs for citation templates
of their choosing
* Allow editing of citation templates directly, without having to go
through the reference dialog
* Provide citation template tools within reference editing that use the
same titles and icons as the citation tools do, but don't wrap the
inserted content in a ref tag
Changes:
* Reference list was cloning the DOM element it was inserting into its
view before the generated content node could finish rendering, so it
never ended up showing the finished rendering in the reference list
* Documenting hack about use of reference list node's destroy method,
and how we are depending on destroy not canceling generated content
rendering
* Introduced reference model
* Added saving/updating method to transclusion model
* Added getPartsList method to dm transclusion node, which caches the
result and invalidates the cache on update
* Added citation dialog, which extends transclusion dialog
* Added cite group to toolbars, cite-template in reference dialog toolbar
* Factored out getting the node to edit and saving changes procedures in
transclusion dialog so they could be extended in citation dialog
* Updated uses of autoAdd as per changes in oojs-ui (Ic353f91)
* Renamed MWDialogTool file since there was only one tool in it
* Expanded TransclusionDialogTool file out since there is now more logic
to it
* Switched to using ve.dm.MWReferenceModel instead of plain objects in
reference search widget
Configuration:
If you add to MediaWiki:Visualeditor-cite-tool-definition.json the
following code you will magically be presented with a delightful array
of citation options:
[
{ "name": "web", "icon": "ref-cite-web", "template": "Cite web" },
{ "name": "book", "icon": "ref-cite-book", "template": "Cite book" },
{ "name": "news", "icon": "ref-cite-news", "template": "Cite news" },
{ "name": "journal", "icon": "ref-cite-journal", "template": "Cite journal" }
]
...or...
[
{
"name": "any-name",
"icon": "any-ooui-icon",
"template": "Any template",
"title": "Any title text"
}
]
The title text is derived either from the title property or from the name
property by pre-pending the string 'visualeditor-cite-tool-name-' to
generate a message key. Titles for 'web', 'book', 'news' and 'journal' are
provided. The icon is a normal oo-ui-icon name, and more icons can be
added, as usual, by adding a class called .oo-ui-icon-{icon name} to
MediaWiki:Common.css. 'ref-cite-web', 'ref-cite-book', 'ref-cite-news'
and 'ref-cite-journal' are provided. The template name is simply the name
of the template without its namespace prefix.
Depends on Ic353f91 in oojs-ui
Bug: 50110
Bug: 50768
Change-Id: Id401d973b8d5fe2faec481cc777c17a24fd19dd4
This patch increases the width of the defaultsort field, a problem
identified in bug 51012. It does this by adding a custom class in
/modules/ve-mw/ui/pages/ve.ui.MWCategoriesPage.js called
.ve-ui-mwCategoriesPage-defaultsort and then applying the style in
modules/ve-mw/ui/styles/ve.ui.Page.css.
The patch also increases the width of a field that was not addressed
in the bug report, the page redirect field in the page settings
page in the options dialog. This was done because, like the
defaultsort field, this field takes as input page titles, which
can sometimes be long. This was done by adding a style to
modules/ve-mw/ui/styles/ve.ui.MWWidget using the
.ve-ui-mwTitleInputWidget class, a class which had been added
to the input field but didn't have any styles associated with it
until this commit.
In both fields, the width has been set to 30em.
Bug: 51012
Change-Id: Ic24f0d20256a5d64075f9d2850215a03b8c8ae66
TOC Widget is created in the mw target view class.
Adding and removing a heading rebuilds the TOC Widget based
on the the order of the page heading nodes.
TOC Widget considers TOC page settings and displays in the default manor
unless forced or disabled.
TOC Widget still needs to be finalized by being placed in the surface.
This could be a problem until we have a CE node for it to live in or
have some DM work added. Roan and I have discussed how to go forward.
To enable the widget you must add the following to LocalSettings.php:
$wgVisualEditorEnableTocWidget = true;
Change-Id: I488cfbbdb060e50d81f51e0f757e67d0114b8936
Shown when there's no template data.
Someday in the future, we will support adding a description inline. Not
yet. Calm down.
Change-Id: I18c0a591b60de53bc124d82c688d71d30ad1d5dd
* Automatically select single mode when possible
* Allow dynamic switching when possible
* Hide most of the controls and information when in single mode
* Allow parameter model to be instantiated without name and value args
* Place add param buttons at the bottom of template and param pages
which are only visible when in single mode and on the last page
Change-Id: Iaffbf1863b808c8089dfcf09a976d165f28c8b74
* Show label, input and remove control on a single line
* Right align label to conserve vertical space without sacrificing
fill-out speed
* Show description in gray text below the input
* Show remove button only when page is active
* Make description lighter when page is innactive
Change-Id: Iaa09f3bf909ccd415de7af8f428495fef3046893
Because everything was broken.
Follows-up I6374854eaa1 which split up mwcore into smaller parts but
left MWDialogTool still as one file part of mwcore. Since the various
ve.dm classes are now part of the other modules that depend on mwcore,
the MWDialogTool classes were pointing at classes that don't exist yet
(e.g. ".modelClasses = [ ve.dm.MWBlockImageNode ];").
Change-Id: Ic05b173d730a8a0f6539fdcd818aaf674d2a4019
* Make them look like a single line input
* Automatically adjust the size as needed
Depends on I42593d6 and I52b2d6e
Bug: 61289
Change-Id: I41a3ce3312fc8d76335e1d96cd1bbd1415dfab12
As per changes in core:
* Use new #this.setAnnotationFromValues method.
* Inline 'initialize' in constructor.
* Bring over 'Change language' button.
* Rename 'Change language' button to 'Find language' and
move to top of form so that it's obvious it's not just a submit
button for the form.
* Properties -> local vairables.
Depends on If121603b5637 in core.
Change-Id: I059acea7258fc5097b747595e09fae394ab066ec
To begin just render the existing attributes as a form. Later
we may want the ability to add/remove attributes.
Change-Id: Ib443498bdae5d362b198c60f0c23d864dca1b6b6
Make sure alternate text input box is stretch to the full width of
the MWMediaEditDialog screen.
Bug: 61329
Change-Id: I22f7e4bc6a03e6349e3494291764d3bf531d70de
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
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
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
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
* 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
* Move and rename generic parts of ve.ui to OO.ui
* We now have a UI test suite because ve.Element (outside ve.ui)
is now part of oojs-ui, so it needs a test suite.
* Added to the MW test run (just like we do for unicodejs).
* Updated csslint config (also added ve-mw and syntaxhighlight
which were missing).
oojs-ui still depends on the TriggerRegistry in VE, this is addressed
in a follow-up commit.
Change-Id: Iec147155c1ddf20b73a4d15d87b8742207032312
Major changes:
* Create a MW specific save dialog class
* Widgetize save dialog elements
* Simplification of viewPageTarget
Minor changes:
* Added getWindow method to windowSet and setTitle methods to window class
* Add transition css properties to dialog styles
Bug: 48566
Bug: 50722
Bug: 51918
Bug: 52175
Bug: 53313
Change-Id: I8c0db01fb8477a9b3d3dfe2a6073ac67869ce40e
Objectives:
* Use widgets to render toolbar actions
* Remove labels next to help notices and edit notices buttons
* Add a close button to the help notices and edit notices
Overview:
* ve.ui.ButtonWidget is now abstract, use ve.ui.PushButtonWidget instead
* ve.ui.IconButtonWidget now inherits from ve.ui.ButtonWidget
* ve.ui.PopupWidget's display method no longer takes x and y arguments
* Fixup naming issues in MWCategoryPopupWidget
* Fixup naming issues with some ve-init-mw CSS classes
* Rename ve-mw/ui/styles/ve.ui.Widget.css to ve.ui.MWWidget.css
* Change uses of "callout" to "tail"
* Add hyperlink functionality to buttons
* Make buttons accessible through focusing, but make unfocusable by
clicking
* Add head option to popup for rendering a title and close button
Bug: 52386
Change-Id: Iea2c8df1be64d40f9c039873d89ee540cc56e687
Objectives:
* Scroll when needed to show highlighted (with keyboard) or selected (by
any means) options in select widgets
* Allow clipping and automatic scrolling for certain elements when they
are otherwise going to be rendered partially out of view
Changes:
*.php
* Add links to new file
ve.ui.Widget.css, ve.ui.Dialog.css
* Removed unneeded x-axis overflow rules
ve.ui.ClippableElement.js, ve.ui.Element.css
* New mixin, adds visible area clipping support to an element
ve.ui.PopupToolGroup.js, ve.ui.MenuWidget.js
* Mixin clippable element
ve.ui.OptionWidget.js, ve.ui.OutlineItemWidget.js
* Add scroll-into-view configuration for option widgets
ve.ui.SearchWidget.js
* Scroll items into view when highlighting with keyboard
ve.Element.js
* Add getBorders, getDimensions, getClosestScrollableContainer and
scrollIntoView static methods
* Add getClosestScrollableElementContainer and scrollElementIntoView
methods
Bug: 53610
Change-Id: Ie21faa973a68f517c7cfce8bd879b5317f536365
Objective:
* Make the welcome dialog work with smaller fonts by increasing its
size a bit, and also making its contents scroll vertically if needed
Changes:
ve.ui.MWBetaWelcomeDialog.js
* Move content into a scrollable and padded panel layout element
ve.ui.MWDialog.css
* Remove padding, now provided by panel layout
ve.ui.Dialog.css
* Remove min-height override, inherited value is fine
* Use max width and height instead of setting them directly
Bug: 52667
Change-Id: Ie35b041e13ef18ffcacef6d9e70439e4e1351e0a
Objectives:
* Got rid of mw prefixing in tools, inspectors and dialogs
* Simplify tool classes so they can be generically used as items in bars, lists and menus
* Add support for a catch-all toolbar group
* Simplify tool registration, leaning on tool classes' static name property
* Move default commands to command registry
* Move default triggers to trigger registry
* Get language tool working in standalone
Change-Id: Ic97a636f9a193374728629931b6702bee1b3416a
Objectives:
* Make it possible to add items to toolbars without having to have all
toolbars know about the items in advance
* Make it possible to specialize an existing tool and have it be used
instead of the base implementation
Approach:
* Tools are named using a path-style category/id/ext system, making them
selectable, the latter component being used to differentiate extended
tools from their base classes, but is ignored during selection
* Toolbars have ToolGroups, which include or exclude tools by category or
category/id, and order them by promoting and demoting selections of
tools by category or category/id
Future:
* Add a way to place available but not yet placed tools in an "overflow"
group
* Add a mode to ToolGroup to make the tools a multi-column drop-down style
list with labels so tools with less obvious icons are easier to identify
- and probably use this as the overflow group
Change-Id: I7625f861435a99ce3d7a2b1ece9731aaab1776f8
VisualEditor.i18n.php, VisualEditor.php
* Button title
* New experimental files
ve.*.MWAlienExtensionNode.js
* Very basic extension of ve.*.MWExtensionNode
ve.ui.MWAlienExtensionInspector.js
* Default to inline-block for wrapper. Should probably
get rid of styled wrappers for GeneratedContent eventually.
ve.ui.MWAlienExtensionInspector.js
* Basic extension of MWExtensionInspector. Override title to
use tag name e.g. '<easytimeline>'. Could be changed in future
to 'Extension: easytimeline' or similar.
*.png, *.svg, *Icons*.css, ve.ui.MWAlienExtensionButtonTool.js
* Angle bracket icon for button (open to suggestions)
ve.ui.MWInspector.css
* Make extension inspector text input tall by default.
Change-Id: I07f0686839192cad3cd8dfd3233ae907fe5cdf6a
Mostly as a demonstration of how easy this is with MWExtensionNode.
The icon was chosen with the following criteria:
1. Recognisable (the ankh is quite common in popular culture, right?)
2. Doesn't look idiotic to academics (I've consulted an Egyptology
PhD and they can confirm it's not the glyph for penis)
3. Renders well at <16x16
That said it does look a little like a stick man...
Bug: 43118
Change-Id: I9f9e8af501401866bfeecf0eec3690a705fbd4db
For configured wikis, show a dialog that welcomes the user to the
amazing and fantabulous world of VisualEditing, which is not only full of
wonderment and joy but also may lead to increased popularity and love.
The dialog only shows up once (uses a cookie).
Change-Id: I8e7c4dc2c63b36594378a543b9d66291395eebcf
VisualEditor.php
* Add CSS file
ve.ce.MWMathNode.js
* Wrap the image in a span, so GenerateContentNode doesn't
try to nest an image inside an image
* Remove unnecessary attribute setting
* Only pass unwrapped image to deferred.resolve
* Retrigger MathJax rendering
ve.ce.Node.css
* Use inline-block for image wrapper
ve.dm.MWMathNode.js
* Mixin GeneratedContentNode and implement getHash
* Copy over functionality of MWTransclusionNode:
+ Just store data-mw for attributes
+ Store orignal(DomElement|MW|Index) for selser
ve.init.mw.ViewPageTarget.js
* Add mwMath to the toolbar
ve.ui.MWMathInspector.js
* Remove static.InputWidget, not required in this architecture
* Use multiline TextInputWidget
* Only update mw attribute
* Allow creation of new math nodes
ve.ui.MWInspector.css
* Set height of TextInputWidget
Change-Id: I520f8ccc9f89a2ce70aa1d9e02ed0c6cacbecc2f
Objectives:
* Make use of the new ve.ui.SurfaceWidget.js for image caption editing
Changes:
ve.ui.MWDialog.css
* Remove styles that are no longer needed
** -body class isn't needed if you contain the content in a layout and
configure it to be padded
** Toolbar styles are now part of surface widget
ve.ui.MWMediaEditDialog.js
* Wrap caption fieldset in an editPanel (also nice because we may merge
this dialog with MediaInsert and use a stack panel layout in the future
* Replace surface and toolbar with surface widget which manages both
Change-Id: I1b7e0e2ec1cfa30879360a7ebde2b0f35d26aca5
Objectives:
* Merge reference insert and edit dialogs
* Change workflow to put editing/creating a new reference first
* Add secondary page in dialog for selecting an existing reference
Changes:
*.php
* Cleanup unused files/messages
ve.ui.Dialog.css
* In the footer; make primary, constructive and destructive buttons
appear on the right; all others on the left
ve.ui.MWReferenceSearchWidget.js
* Fix documentation
* Remove create option and reuse section header items
ve.ui.MWReferenceInsertButtonTool.js,
ve.ui.MWReferenceEditButtonTool.js,
ve.ui.MWReferenceButtonTool.js
* Merge reference button tools
ve.ui.MWDialog.css
* Remove body styles, use padded option of layout instead
* Update selectors as per merging of dialogs
ve.ui.MWReferenceInsertDialog.js
ve.ui.MWReferenceEditDialog.js
ve.ui.MWReferenceDialog.js
* Merge reference dialogs
* Add buttons to switch between edit and select mode
ve.init.mw.ViewPageTarget.js
* Update reference button name as per merging of tools
ve.ui.SurfaceWidget.js
* New widget!
* Encapsulates a "sub-surface"
Bug: 51152
Bug: 50458
Change-Id: I8265febf4fd8f64d2ac40470ff033bac68b24d99
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
Objective:
* Cut off really long parameter names with ellipsis
Changes:
ve.ui.Widget.css
* Use ellipsis when option labels get too long
ve-mw/ve.ui.Widget.css
* Limit the size of a parameter result widget label - this is a hack, but
since there are strange bugs with using ellipsis together with % based
width, it's the best we can do for now
Bug: 50800
Change-Id: Idbfa336d2bba376b0d078fdd0ece65926d610d81
Objectives:
* Make option widget icons correctly placed in RTL
* Make embedded context toolbar correctly placed in RTL
Approach:
Use separate elements for icons within option widgets which have more
flexibility when rendering in either LTR or RTL when compared to CSS
background position. The simpler approach, using CSS background
position offsets, isn't cross-browser compatible at this time.
Changes:
ve.ui.OutlineItemWidget.js
* Remove custom icon implementation, using parent class implementation
instead
ve.ui.OptionWidget.js
* Add icon option, which adds an icon element only if an icon was
specified
ve.ui.MenuItemWidget.js, ve-mw/ve.ui.MWParameterResultWidget.js
* Add override for icon config option
* Document icon config as private
ve.ui.Context.js
* Add detection and special handling for positioning embedded context
toolbar when rendering in RTL
ve.ui.Widget.css
* Add styles for option widget's new icon option
* Add styles to make indentation still work for outline item widgets
* Adjust styles for menu item widget as per changes in option widget
ve-mw/ve.ui.Widget.css
* Adjust styles for parameter result widget as per changes in option
widget
Change-Id: Ibfa4b613e0fd7902f8a2c78b5717de402c5f82b8
We previously manually loaded CSS into these frames, which is flawed
because it completely bypasses ResourceLoader (so CSSJanus didn't flip
them, necessitating a bunch of hacks for RTL), and doesn't pull in
MediaWiki styles (so templates inside references don't render correctly).
Instead, this commit copies all styles from the main document into each
frame's document, inlining what it can.
Loading all styles in dialogs and inspectors caused some problems,
initially. We didn't namespace our styles for dialogs vs. inspectors
at all; the only reason inspector styles weren't being applied to dialogs
and vice versa was because we controlled which files were being loaded
in which context. This commit namespaces the inspector and dialog styles
where needed so they don't conflict and try to override each other.
Tested in Vector and Monobook, but not in Apex and not in RTL.
ve.init.mw.ViewPageTarget*.css:
* Namespace styles that are only intended for the main document
* Undo Monobook's font-size: x-small; in frames
*Dialog.js:
* Remove addLocalStylesheet() calls, we don't need those any more
** ve.ui.MWDialog seems to be unneeded now, we may want to remove it
*.css:
* Remove @noflip-ped RTL rules where they were just flipped versions of
their LTR counterparts
ve.ui.Dialog.css, ve.ui.Inspector.css:
* Namespace styles with .ve-ui-dialog-content / .ve-ui-inspector-content
ve.ui.Frame.css:
* Move the margin:0 and padding:0 here (were in the frame <body>'s style
attribute) and add background:none to prevent frames from getting
the skin's background (grey in Vector, a book in Monobook)
ve.ui.Dialog.js, ve.ui.Inspector.js:
* Add ve-ui-dialog-content / ve-ui-inspector-content class to the
frame's content <div> so we can restrict styles to only apply in
dialogs / inspectors
ve.ui.Frame.js:
* Replace infrastructure for @import-ing stylesheets with transplantation
* Remove code polling to see when the stylesheets were loaded
** We can't do this in the new approach AFAIK, since all styles in the
frame are either inlined or inaccessible due to the same-origin policy
** We also shouldn't need it because the browser should have cached the
styles when it loaded the main document
* Apply ve-ui-frame-body class to the frame's <body> so we can style it
** Move inline padding:0;margin:0; into ve.ui.Frame.css
** Move the ve-ltr/ve-rtl class up to the <body>
ve.ui.Window.js:
* Remove infrastructure registering stylesheet URLs to load
Change-Id: I4a37115301811ad860f4578344a04873ea8c2b69
This re-fixes the fix to the frame fix. fix fix.
Two things changed: Background position flipped to the right properly
(was somewhat off before) and text-alignment flipped as well.
Bug: 49613
Change-Id: I0aa317ef674537d20d7ed64e74eaa3cfe8030c8c
Move all MW-specific files into the ve-mw directory, in preparation
for moving them out into a separate repo.
All MW-specific files were moved into a parallel directory structure
in modules/ve-mw . Files with both generic and MW-specific things were
split up. Files in ve/init/mw/ were moved to ve-mw/init/ rather than
ve-mw/init/mw ; they're still named ve.init.mw.* but we should change
that. Some of the test files for core classes had MW-specific test cases,
so those were split up and the test runner was duplicated; we should
refactor our tests to use data providers so we can add cases more easily.
Split files:
* ve.ce.Node.css
* ve.ce.ContentBranchNode.test.js (MWEntityNode)
* ve.ce.Document.test.js (some core test cases genericized)
* ve.dm.InternalList.test.js (uses mwReference test document)
* ve.dm.SurfaceFragment.test.js, ve.ui.FormatAction.test.js
** Made core tests use heading instead of mwHeading
** Updated core tests because normal headings don't break out of lists
** Moved test runners into ve.test.utils.js
* ve.ui.Icons-*.css
* ve.ui.Dialog.css (MW parts into ve.ui.MWDialog.css)
* ve.ui.Tool.css
* ve.ui.Widget.css (move ve-ui-rtl and ve-ui-ltr to ve.ui.css)
ve.dm.Converter.test.js: Moved runner functions into ve.test.utils.js
ve.dm.example.js:
* Refactored createExampleDocument so mwExample can use it
* Removed wgExtensionAssetsPath detection, moved into mw-preload.js
* Genericized withMeta example document (original version copied to mwExample)
* Moved references example document to mwExample
ve.dm.mwExample.js:
* Move withMeta and references example documents from ve.dm.example.js
* Add createExampleDocument function
ve-mw/test/index.php: Runner for MW-specific tests only
ve-mw/test/mw-preload.js: Sets VE_TESTDIR for Special:JavaScriptTest only
ve.ui.Window.js:
* Remove magic path interpolation in addLocalStyleSheets()
* Pass full(er) paths to addLocalStyleSheets(), here and in subclasses
ve.ui.MWDialog.js: Subclass of Dialog that adds MW versions of stylesheets
ve.ui.MW*Dialog.js:
* Subclass MWDialog rather than Dialog
* Load both core and MW versions of stylesheets that have both
ve.ui.PagedDialog.js: Converted to a mixin rather than an abstract base class
* Don't inherit ve.ui.Dialog
* Rather than overriding initialize(), provide initializePages() which the
host class is supposed to call from its initialize()
* Rename onOutlineSelect to onPageOutlineSelect
ve.ui.MWMetaDialog.js, ve.ui.MWTransclusionDialog.js:
* Use PagedDialog as a mixin rather than a base class, inherit MWDialog
bullet-icon.png: Unused, deleted
Stuff we should do later:
* Refactor tests to use data providers
* Write utility function for SVG compat check
* Separate omnibus CSS files such as ve.ui.Widget.css
* Separate omnibus RL modules
* Use icon classes in ViewPageTarget
Change-Id: I1b28f8ba7f2d2513e5c634927a854686fb9dd5a5