Objectives:
* Get rid of the border and ensure pixel-perfect positioning of the input.
* Always render the arrow on the top right of the category item
* Make the popup positioning based on the arrow div's position and size
Bug 49420
Change-Id: I3ad4ff1c41e6108161b5b7c8718c676eb850de68
Objectives:
* Make category popup show "Category" rather than missing message -
this is more similar to other popups like inspectors, which identify
what that thing is that you are working on
* Fix alignment of icon and label in category popup
Changes:
ve.ui.Widget.css
* Make popup title align properly with the remove button
ve.ui.MWCategoryPopupWidget.js
* Update message key
*.php
* Add new message
Change-Id: Ia8051125bbc9bde47ceb931e1ebf42b2955481ff
Was previously only set on form submission, but there was no button so
you had to press the Enter key
Bug: 48555
Change-Id: I256d2b21bc2306959f6d6a0373386054b21dadfe
Objective:
* Context popup would stop opening sometimes "mysteriously" which ended
up having to do with the automatic closing on blur functionality
added to popups for use in the category popup widget
* Mousedown event canceling was being applied a little too widely, and
was causing popup widgets to not allow child elements to be focused
(unless they contained an iframe, like an inspector)
Changes:
ve.ui.Context.js
* Make use of the popup's show and hide methods within the inspector
ve.ui.MWCategoryPopupWidget.js
* Override autoClose option for category popup widgets
ve.ui.PopupWidget.js
* Add autoClose option to popup widgets
* Move event handler to the top of the methods (convention)
* Only bind blur event if autoClose is enabled
* Inline the getFocusedChild method
Change-Id: I22aedb5fbd51b327ea7ce2ecdd6123e79cbebb9c
Objective:
* Add default sort key field to meta dialog
* Replace PagePanelLayout with a generic panel containing one or more FieldsetLayout elements
Changes:
*.php
* Added/removed file links
ve.dm.MWDefaultSortMetaItem.js
* Added getContent method
ve.dm.MetaItem.js
* Added replaceWith method
ve.dm.MetaList.js
* Allow insertion at the end by omitting offset and index
ve.dm.MWMetaDialog.js
* Added default sort key field
* Put category and default sort fields inside fieldsets
* Added loading/saving default sort key
ve.ui.PagedLayout.js
* Changed class used for pages to generic panel layout
ve.ui.PagePanelLayout
* Moved title/icon stuff to field set
ve.ui.FieldsetLayout.js
* New class, adds fieldset with legend
ve.ui.StackPanelLayout.js
* Moved up to the layouts directory
ve.ui.Dialog.css
* Moved style for paged panel from layout stylesheet
ve.ui.Layout.css
* Added styles for fieldsets
ve.ui.Widget.css
* Adjusted margins of input label widgets
ve.ui.MWCategoryWidget.js, ve.ui.MWCategoryPopupWidget.js
* Added setDefaultSortKey method
Change-Id: I979f5e3f08a688790c9f54086206ed1999af13ea
The EventEmitter API we inherited from Node.js and then bastardized was
getting awkward and cumbersome. The number of uses of ve.bind was getting
out of control, and removing events meant caching the bound method in a
property. Many of the "features" of EventEmitter wasn't even being used,
some causing overhead, others just causing bloat. This change cleans up
how EventEmitter is used throughout the codebase.
The new event emitter API includes:
* emit - identical to the previous API, no longer throws an error if you
emit error without a handler
* once - identical to the previous API, still introduces a wrapper* on -
compatible with the previous API but has some new features
* off - identical to removeListener in the previous API
* connect - very similar to addListenerMethods but doesn't wrap callbacks
in closures anymore
* disconnect - new, basically the opposite of addListenerMethods
Another change that is made in this commit is mixing in rather than
inheriting from EventEmitter.
Finally, there are changes throughout the codebase anywhere
connect/disconnect could be used.
Change-Id: Ic3085d39172a8a719ce7f036690f673e59848d3a
Modifications:
VisualEditor.php
* Added links to new widgets
VisualEditor.i18n.php
* Added placeholder text for category input
ve.ui.Widget.css
* Added styles for new widgets
New:
ve.ui.MWMetaDialog.js
* Create category widget with categories from dm.
* Listen to metaList for insert and remove events
** insert / remove bound methods to be improved upon additional meta groups
* Add listeners to mwCategoryWidget for new categories and updates
ve.ui.MWCategoryWidget.js
* Top-level category editing widget
ve.ui.MWCategoryItemWidget.js
* Items within a category widget
ve.ui.MWCategoryInputWidget.js
* Input for new categories, handles menu and API requests
ve.ui.MWCategoryPopupWidget.js
* Mini-inspector for a category item
Bug: 39597
Change-Id: I5eafaa484a1924a566d3a1ee1d869293089d0ecf