Remove ProtectedNode mixins for new FocusableNode.
New changes:
e1b0e33 [BREAKING CHANGE] Merge ProtectedNode into FocusableNode
Change-Id: Ie515704163c24317739fd34d35094b9ada6bfa66
New changes:
84a2e6f Reorganize initialization of default size in MediaSizeWidget
e8d0e8c Update OOjs UI to v0.1.0-pre (99068355d6)
f0e9ad9 Allow for the disabling of the MediaSizeWidget
25c4fce Tighten up context menu items
Change-Id: Id6c97cc3713d22490c7afd806eb9eee282fefd85
The user probably wants to edit the exact title they requested, rather than
following redirects. This matches the behaviour of the source editor and
action=edit.
Bug: 65926
Change-Id: If2183008b5acaaaf495f35e21ee61c3da1ba3110
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
Mobile VisualEditor needs to have images properly formatted in the
surface even though we treat them as alien nodes in mobile.
Change-Id: I3f193f73a783c6e0474a52c058d542646c3bfa93
In mobile we define images as alien nodes, but still need for them to
be properly styled. This will allow us to give them proper HTML/CSS,
but without loading all the inspector code that we don't need.
Change-Id: I801340bd9c40270b8e77bde3d18f721866f753e6
This inspector isn't designed for insertion mode yet; attempting to use
it in insertion mode causes nasty JS errors.
Bonus:
* Make its tool title "Simple link" rather than "Link", for when
we do reintroduce it.
* Make double-clicking / pressing enter while selecting a link node
open the link node inspector rather than the link annotation inspector.
* Make link nodes render with MW's external link arrow icon
* Move the link node inspector's messages to the right RL module
Bug: 66047
Change-Id: Ib94da7ed3a2a88297dbdd1529f20cd8dab7c8421
Switch to processes for windows (dialogs/inspectors)
This conversion also required the splitting of MWLinkInspector into
MWLinkNodeInspector and MWLinkAnnotationInspector.
New changes:
88fe25f [BREAKING CHANGE] Update OOjs UI to v0.1.0-pre (dd888aba5c)
Change-Id: I662d8985463c9fc881775f70aef87ebeb454a73f
New changes:
3ecd488 Add check icon for Apply button in ActionDialog
3dccb7d .unbind() -> .off()
Local change:
Add new CSS file to VisualEditor.php.
Change-Id: I443f9f4514ae2a61c688549107e7f2e5de700b62
Using the new mediawiki.skinning.content.parsoid module instead of the clunky
ext.parsoid.styles (which added an unhelpful dependency).
Change-Id: I87e93777ece75ebf035df29490a80daf9fa7c45a
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
Per TTO on bug 51655, the implementation of confirm() in most browsers is crappy and we
shouldn't use it.
Change-Id: I755085a253c05958e4b50af57b19dab90f2f0fb6
Now unused. Also should have been a subclass of the (also unused)
CommandHelpDialogTool in VE core.
Change-Id: I865317aa41dbf93c98620c0f89b6d7ac92499022
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
Relies on:
* I292fb34d in OOjs UI to add the confirmation dialog
** I67329820 in MediaWiki core to use the messages added in OOjs UI
** I38f5bb63 in VisualEditor core to register the confirmation dialog
Bug: 50955
Change-Id: I98f9a03d780556b360b57c018c05a27cc1b3862e
New changes:
3fb1060 Remove ve.ce.Surface#getClickCount
fc52c6c Remove IE nbsp hack
cd2e2c8 Add HTML conversion button to SA demo
e04df70 Fix missing i18n for 'auto' language label
Local change:
* Add auto message to i18n.
Change-Id: I534e27d3578cf9b42b755c91aa1b17122835fb83
For logged-in users, we can a preference instead of a cookie. This way it is
also preserved between browsers and when cookies are cleared.
Keep using cookies for logged-out users, except if the beta welcome dialog
has been suppressed using the one-off GET parameter 'vehidebetadialog'.
Bug: 55551
Change-Id: Ica9e5a92841fec003ce4a21d740a9bc6ff3da9c7
New changes:
b69a7f3 Update OOjs UI to v0.1.0-pre (7d2507b267)
94fd162 Localisation updates from https://translatewiki.net.
f631a8f Fix Dialog support on mobile
Change-Id: Ifcc88c95e65994c2047b01fe7485d4b9a4c4b52c
* 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
At some point getTitle was changed to updateTitle but the caller was still
assuming it would return a string. Also, we removed the transclusion
dialog title message, but were still trying to use it.
Changes:
* Change the logic so we use the parent method for updateTItle correctly
* Bring the transclusion title message back
Bug: 64671
Change-Id: I3beb8b1d4304ba73c428868b9ac2d0f6a1cc9944
Based on I70e88f6 in VE core
* Cleanup dialogs by using node dialog and action dialog
* Move "Loading..." text from label of dialog apply button to dialog title
(repurpose identical message)
Save dialog will be converted in a follow up.
Change-Id: I6a290f4bdc29e577c7c89b4babdab5853c4c10e5
Also remove CSS hack from MWTransclusionNode now that
we have properly styled Parsoid references.
Bug: 63983
Change-Id: I5e8dc4c618809f6dd923fe4676d57acd1094f93d
MathCaptcha just extends SimpleCaptcha, so its output is fine to show as
text. Doing that because I'm not sure how to render TeX and this is a
reasonable fallback
Also tidy up the order of some message entries in my last commit.
Bug: 64328
Change-Id: I98312f61471667e7c4dcf715295f85642c31a688
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
Update dialogs and inspectors for breaking change in VE core
New changes:
a553012 [BREAKING CHANGE] Merge dialog and inspector actions into window actions
f9a0419 Localisation updates from https://translatewiki.net.
cbe81a0 Fix path to spinner in ve.ui.SpecialCharacterInspector.css
Change-Id: Icf90ace6442364283b66b234e3c78fc65212f070
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
Most of the code stolen from MWMathInspector and genericised.
Also fix issues with fragment not wrapping the new node correctly.
Bug: 58286
Bug: 58045
Change-Id: I708c4cb012becf8c493d5b65a051c0b13f7a11ac
We used to have two dialogs; a complex one, and a subclass that dumbed it
down - this was rubbish.
Then we merged them together - this was a'ight.
Now we have two dialogs again; a simple one, and a subclass that fancies
it up a bit - this is wicked keen broham.
Change-Id: I4b2ba31bed5c4f80940623702d635cacd19e0a66
Add reference to DimensionsWidget.css
New changes:
2d96306 [BREAKING CHANGE] Separate Widget styles properly
Change-Id: I84c1a3576b8eca74d483e26a4affd21f790040ad
Move various bits of code from initialize to setup as required.
MWDialog is now useless so use ve.ui.Dialog directly.
New changes:
0b2d03f [BREAKING CHANGE] Pass fragments, not surfaces, to windows (reprise)
0101ac4 Update OOjs UI to v0.1.0-pre (ac6848398c)
Change-Id: I0fae3e5ff2bd0da5b74c244af226b07b1f5883bd
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
* 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
Also update tools for changes in VE core.
New changes:
e4de14b Make tools use commands
e029817 Make getToolsForNode place primary commands first
Change-Id: I66575ee6d49e6b2f5a5f789978da98bb55e6dc5e
New changes:
b045c0c Localisation updates from https://translatewiki.net.
3221c45 Introduce ve.ui.Tool
c3a2a85 Detect document focus properly and allow null selection in model
03fed20 Localisation updates from https://translatewiki.net.
07dfc7d Actually use getRelative[Content|Structural]Offset wrappers
8fced5f Show VE demo error in VE
547e3d2 Localisation updates from https://translatewiki.net.
d6316f5 Fix handlesOwnChildren check in getRelativeOffset
e23f1ab Style link inspector on mobile
5968559 Localisation updates from https://translatewiki.net.
4bce90c Bump jscs to 0.4.1
7e39f49 Disable certain tools when surface has no range
edde8ca Emit event when insertion annotations change
2a89173 Update OOjs UI to v0.1.0-pre (8986c46d35)
103c4b9 Support null ranges in the demo debug bar
9eb3810 Adjust loop counters in word break detection when removing item
914e002 Skip over handlesOwnChildren nodes in newFromAnnotation
ef6096a Improve hasFocus check to compare the anchorNode to the parent
18171bf Revert "Improve hasFocus check to compare the anchorNode to the parent"
3950cef Revert "Detect document focus properly and allow null selection in model"
1c4cac4 Revert "Fix handlesOwnChildren check in getRelativeOffset"
Change-Id: Ic3054c668866307a5cfbb74f23efd82ceb2f0ee3
* Create a method to produce the correct label
* Override that method in the citation dialog subclass
Change-Id: Ic74a23dcf30aae201f3d6c312b760cf058aadf11
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
New changes:
e02cb87 Fix left-over autoAdd property that didn't get fixed with Idaf3041
74037b0 Split up omnibus CSS files into per-item ones
1adc9f5 Localisation updates from https://translatewiki.net.
Change-Id: I71498cd0b990aebd85dabb68afb3485350b8ac36
* Add ve.init.mw.LinkCache to track page existence and
transparently query it
* Populate it with initial data from the parser cache
if available, obtained in the VE API module
* Use linkCache data in link annotation rendering
This doesn't yet integrate the LinkCache with other
components like the link inspector. That should be
done so we can deduplicate the existence checks.
Additionally, we should generalize LinkCache and use
it for the category existence/status checks as well.
Bug: 37901
Change-Id: I9fd43e8c3864dd375cf6dadfdeedd05e4fe9cf3b
Also, we warn the user that Here Be Dragons™ when they're editing a Page
Translation /source/ page.
Bug: 50284
Change-Id: I841ccb8461d31358640a16301a6a78750a660d36
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
New changes:
dd15f23 Split ve.ui.Surface into DesktopSurface and MobileSurface
16283f4 Add OOjs UI's sco.json i18n file
ef94038 Split ve.ui.Context into DesktopContext and MobileContext
Minor adjustments to point to desktop and mobile Surface or Context.
Change-Id: I7cf6f99a5a1216a28a7146afcd4deb68c7eac38e
Add meta items for the four remaining mwPageProp behavioural flags from Parsoid
that are added by MediaWiki core. These are each waiting for UX implementation,
based on the lack of context information in MWMetaDialog about the page, or
about the wiki:
* __NOGALLERY__
* __HIDDENCAT__
— These only make sense in a Category: page.
* __NOTITLECONVERT__ // __NOTC__
* __NOCONTENTCONVERT__ // __NOCC__
— These only make sense on wikis that have content or title conversion.
Change-Id: I752705f65cfbd79c7f3f71270659793996868aff