Catrope has submitted this change and it was merged.

Change subject: The great inspector and context rewrite of 2012
......................................................................


The great inspector and context rewrite of 2012

ve.AnnotationAction
* Added filter to the clearAll method to allow clearing all matching 
annotations only

ve.dm.Document
* Some variable renaming for consistency

ve.dm.SurfaceFragment
* Added truncateRange method
* Added annotation scope to expandRange method
* Added support for passing an annotation object into annotateContent method
* Switched to using name instead of type in annotateContent method to match the 
ve.dm.Annotation class
* Fixed logic in annotation mode of expandSelection so that expansion only 
takes place if the annotation is found

ve.ui.LinkInspector
* Moved most of the functionality elsewhere
* General reorganization
* Changed setOverlayPosition to accept 2 arguments instead of an object with 2 
properties and renamed it to positionOverlayBelow
* Check for annotation object before extracting target information from it
* Initialize default target as empty string to avoid undefined being cast to a 
string and the default target becoming 'undefined'

icons.ai, inspector.png, inspector.svg
* Added generic inspector icon which will be used when a custom icon is not 
specified in future inspector subclasses

ve.ui.Inspector.Icons
* Added inspector icon
* Renamed clear icon to remove to match it's actual image

ve.ui.Context
* Greatly simplified the interface, reducing the number of methods by inlining 
a few things and combining others
* Now always listening to resize events on the window rather than only while 
document is focused
* Not listening to scroll events anymore, they used to affect the top/bottom 
positioning of the menu which we don't do anymore
* Lots of cleanup and reorganization
* No need to fallback to empty array since getInspectorsForAnnotations does so 
already
* Only consider fully-covered annotations for inspectors

ve.ui.Frame
* Simplified the constructor by introducing the createFrame method
* General cleanup
* Typo fixes

ve.ui.Inspector
* Generalized lots of functionality previously located in the link inspector 
class which will be useful to all inspectors (such as title, clear button, 
saving changes, etc.)
* Added setDisabled and isDisabled methods to manage CSS changes and avoid 
needing to check the CSS to determine the state of the inspector (storing state 
in the view is evil)
* Added getMatchingAnnotations method for convenience
* Added prepareSelection stub
* Lots of cleanup and documentation
* Type pattern is now defined in base class
* Added stubs for onOpen and onClose with documentation so that subclass 
authors know what these methods do
* Removed checks for onOpen or onClose methods since they are now noop stubs 
and are always there
* Added stub and removed checks for onRemove
* Made esc key close and accept - the illusion is supposed to be that the link 
changes are applied instantly, even though they are only updated when you 
close, so all closing except for when removing should apply changes - i.e. esc 
is now equal to back rather than being a special function that doesn't have an 
associated affordance
* Only consider fully-covered annotations when getting matching annotations

ve.ui.InspectorFactory
* Depending on type pattern now since it's always there
* Added getInspectorsForAnnotations method
* Return empty array if annotation set is empty

VisualEditor, VisualEditor.i18n
* Added default inspector message

Change-Id: I1cc008445bcbc8cba6754ca4b6ac0397575980d5
---
M VisualEditor.i18n.php
M VisualEditor.php
M modules/ve/actions/ve.AnnotationAction.js
M modules/ve/dm/ve.dm.Document.js
M modules/ve/dm/ve.dm.SurfaceFragment.js
M modules/ve/ui/inspectors/ve.ui.LinkInspector.js
M modules/ve/ui/styles/images/icons.ai
A modules/ve/ui/styles/images/icons/inspector.png
A modules/ve/ui/styles/images/icons/inspector.svg
M modules/ve/ui/styles/ve.ui.Inspector.Icons-raster.css
M modules/ve/ui/styles/ve.ui.Inspector.Icons-vector.css
M modules/ve/ui/styles/ve.ui.Inspector.css
M modules/ve/ui/ve.ui.Context.js
M modules/ve/ui/ve.ui.Frame.js
M modules/ve/ui/ve.ui.Inspector.js
M modules/ve/ui/ve.ui.InspectorFactory.js
16 files changed, 2,656 insertions(+), 1,187 deletions(-)

Approvals:
  Catrope: Verified; Looks good to me, approved


--
To view, visit https://gerrit.wikimedia.org/r/33796
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I1cc008445bcbc8cba6754ca4b6ac0397575980d5
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Trevor Parscal <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: Trevor Parscal <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to