Make sure all surface widgets have documents that are initialized
with the direction of the parent document, so the alignment is set up
correctly.
Bug: T71969
Change-Id: I6e5f003e18a9c5808d9a4b148eddf0d0f7e29e67
* 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
Aside from the confusion and differences between substr() and
substring() and IE8 bugs with substr(), substr() was removed from
the spec as of ECMAScript 5. It's been standardised in the
optional Annex B section of ES5.
Change-Id: I221ef6ae6956ce20dd9bb74510500f747d04c3b1
New changes:
5e60f12 Ensure clipboard key is removed from paste target
32397d8 Update OOjs UI to v0.4.0
Local changes to compensate for new OOUI version, and updated wfUseMW call.
Change-Id: I005f7b23a36e04f1305d4aa037c19a5c7db9a699
canonicalQueryValue can be null at this point, so let's not insert it
into an array that contains strings.
Bug: T76868
Change-Id: I8096a9c1017e883d28124bf807d2d375ae98452a
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
Only change the panels (and focus the caption surface) after the
surface is actually appended and initialized.
Bug: T76074
Change-Id: I3d514f38b5fd9f794c4ff8c44a64f5f3475a84bd
Because a lot of toolbar customization was removed, use an evil
hack to get this in there for now. Should be cleaned up later.
Bug: T76082
Change-Id: I0fd5ddc6fa11162deb615f0b387d6d59c5cc4a3a
Make sure the dialog is listening to the correct event for when
caption surface changes.
Bug: T76074
Change-Id: I214947a440e4f78adf1541d8008599fe65ac8b2c
Also push it into correct place in the toolbar, and disable it from media and
reference dialogs' toolbars.
Change-Id: Icc3bf056860e35def13e03e77ffc6782acc4196a
To do things like strip off invalid invisible characters from the end of names.
(see bug)
Also rename that function because it covers more than just hidden status now
Bug: T74080
Change-Id: I8374695a991c4d3e397992ad9277b99d9288eec4
Uses the generic sequence detection now available in core instead
of a custom hack that had to been manually bound and unbound to
every surface and surface widget.
As the sequence detection looks at just-typed characters the behaviour
has reverted to showing a auto-hide message. This resolves an issue
with the previous system whereby typing in the same paragraph as existing
wikitext patterns triggered the warning.
Depends on I6a4d71d in core.
Bug: T53751
Change-Id: I7d914b1b60a1cf8c79a724e5f634e1e666c9562d
Empty this.$element in notices when there are no elements to display
as just hiding with CSS makes other items in the group no the last
child and therefore breaks any CSS rounded corners rules.
As notices are only ever generated at load, destroying the tool
is not a problem.
Bug: T63575
Change-Id: I63a044ca63f61b976f57e34ce9537034e68a2614
Local changes:
* Rename paste rules to import rules (also used by drag and drop)
New changes:
f5d83f8 Remove data-parsoid removal hack
99f938f Create 'preserveGenerated' mode for cloneElements and use in copy
938b44d [BREAKING CHANGE] Rename paste rules to import rules
c51288c ve.ce.Surface: Move insert HTML path to DM
10ce4cf Provide a FileDropHandler for HTML files
701bb9c Provide a FileDropHandler for CSV and TSV files
ca6b444 build: Update update-oojs.sh and update-oojs-ui.sh scripts
Change-Id: I5cfa15ab3efd03e2c64c2f9f725cb3098f53b32a
Also remove toolbar definitions as they can now be derived from
command availability.
Depends on If32d514a in core.
Change-Id: I2313f3cc2531686b27f96dc1110b28bb4b295f89
* 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
New changes:
ff237d4 Fix z-indexes in core
e88d43e Localisation updates from https://translatewiki.net.
cf61803 Consistently use ve.ui.WindowManager everywhere
f9dfdb8 Update OOjs UI to v0.1.0-pre (23565e7519)
f79f7e3 Update OOjs UI to v0.1.0-pre (8f8896196f)
c8201dd Update OOjs UI to v0.1.0-pre (9ed4cf2557)
Local changes for the breaking change to OptionWidget and sub-classes.
Change-Id: Ife6abd312d4dc97be67cb84eea4cb9c6a0a31b1d
New changes:
6ec286e Support for generic file drop handlers
4f2ab66 Generic progress dialog for drag and drop uploads
742e0fe Fix pasteSpecial command
87ea9e9 Fix up/down arrowing off a focusable node
643ea34 spinner.gif: Update with new version from Trevor
ffd8b1e Position the table context relative to the first section node
393776a Fix logic for ignoring (col|row)span=1
f94b10e Don't unmerge spanned cells when spanned cell is removed
3416764 TableContext: Simplify row/column overlays styles
e6c0038 Localisation updates from https://translatewiki.net.
fb1a922 Register select all as a command and perform programmatically
3c1ce93 Make caption tool available when caption selected
dd0ac7d Move disabling logic from tools to commands
8bf33a5 Bold & italic icons for Armenian
058b32c Update OOjs UI to v0.1.0-pre (05f0fefc3f)
c01d115 Create filedrophandlers folder for implementations
Local changes:
* Register new files
* Move disabling logic from tools to commands
onUpdateState should only ever call setActive. setDisabled should
already be determined by the command so that it can prevent itself
being called by triggers.
Change-Id: Icdeaa4c152a0dcd839c8e7cc4e64b2215eb2de1e
setMode() is called multiple times, but it didn't
check whether the mode being set was already set.
Because it's a setter, make it idempotent.
This fixes the problem where the first input will
be focused first, then blurred later, but it
introduces a new problem because the label for
the 'mode' ActionWidget is set from setMode().
To solve that, factor the setting of this label
out into its own function and call it on setup.
Bug: 73138
Change-Id: I9bb127f22f6c0b745b393c523ec42f320fc85cf3
* A subclass of MenuItemWidget from OOUI, MWLinkMenuItemWidget, is introduced that, when used in MWLinkTargetInputWidget for both
external and internal links, returns actual page links.
* MWInternalLinkMenuItemWidget is extended from MWLinkMenuItemWidget to support the internal links.
* LinkCache is being used in MWInternalLinkMenuItemWidet to stylize the links. Thus, getting rid of some old css classes.
Bug: 51205
Change-Id: I3ac18dabd514ca539fff1db3c67ae97931c3d4fc
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
New changes:
2cc219a Update OOjs UI to v0.1.0-pre (571f26d0ab)
3543cb7 Protect against offset=-1 in insertContent()
7a3d456 [BREAKING CHANGE] Move selection restrictions from tools to commands
3d847bb Disable desktop context on table selections
41282dd Missed function rename from RangeFix change
dd6c8b8 Support toDomElements returning an empty array
9be6464 Placholder -> placeholder
9bdd0a8 Restore basic styling to toolbar in core target (only)
Local changes:
Move selection restrictions from tools to commands
Change-Id: I88f3d04946bd1d03ed001d747475a8b495a0f64c
This code was somehow broken by Ia47bc897 (wtf, how?)
Actually removing it seems to do no harm (wtf?), as far as I've been able to tell...
Bug: 72906
Change-Id: If7eb34a20cc8060b594a567278241b02a8ee327a
Now that we have .getTitle() as a method in MWTitleInputWidget, replacing the callers
of MWTitleInputWidget.getValue() with .getTitle(). This fixes a bug in the .getTitle()
method in MWTitleInputWidget which was not taking the namespaces into account before.
Also fixes: the error when entering "Talk:" as a template title. The button to add template
remains disabled when "Talk:" is given as an input to the title here.
Bug: 71998
Change-Id: I1e629a61ec8b035d93a4b7acfecab81934019166
This was needed to make the ComboBoxWidget initialize
its selection, but Idcbf38c53 makes that happen automatically.
Depends on Idcbf38c53 in oojs-ui.
Bug: 72783
Change-Id: I8d3a014f862ece7f4f201af205a8a7ca6c365eaa
Now that the toolbar hides extra features by default, we don't need to
use autoAddToGroup and autoAddToCatchall over-rides.
Change-Id: I493f7d46a3f77e7c62af05f8e05ae4dde7147e4b
MWCategoryInputWidget:
* Use @inheritdoc
* Don't modify data parameter in getLookupCacheItemFromData()
MWLinkTargetInputWidget:
* Remove this.choosing in favor of setLookupsDisabled()
* Explicitly close menu on choose
* Remove manual emission of change events
** This looks ridiculous, it doesn't seem to be necessary,
and it causes infinite event loops. But I'm very curious
why this was added in the first place.
* Remove onLookupInputChange override that is now unnecessary
* Use {} rather than [] for fake empty result
* Prevent programmatic focus from opening the menu
MWTitleInputWidget:
* On choose, close menu and disable lookups while changing value
* Use @inheritdoc
* Remove mentions of "template" from getTitle() documentation
Bug fixed:
* When choosing a suggestion in MWTitleInputWidget,
new suggestions would be loaded and the menu would reopen
Depends on Iecae9b582 in oojs-ui.
Change-Id: I716f99bb464a5cebd4f17701197f768e4e0e02a9
When show/hide options is clicked, the inputs in the main pane
move as the outline transitions in or out. This causes any dropdowns
below these inputs to become mispositioned: they don't move
because they're in an overlay.
To work around this problem, blur the active input when show/hide
options is clicked, so any dropdown attached to it is closed.
I tried blurring and immediately refocusing the active input to
force the dropdown to reposition itself, but that looks awkward
because of the transition (we'd have to wait for the transition
to complete before repositioning it, and during the transition
it'll stay open in the wrong place).
Bug: 72789
Change-Id: Ibd963690573af905066839f7276077089fa893c6
A method isValid() is added to MWTitleInputWidget which would validate the titles given as inputs
Bug: 71249
Change-Id: I7749165652bd3c0bb08ca42289a425fe8e25483d
A method for getTitle() is added which can return the valid title,
or, it can return null, in case the value isn't a valid title
Bug: 72468
Change-Id: I8a13afc9a66c167fe25010743c0d9e1424133d96
These disappeared when DecoratedOptionWidget was split
out of OptionWidget in I508c1555 in oojs-ui back in July,
and apparently no one noticed.
Make MWParameterResultWidget and MWMoreParameterResultWidget
inherit DecoratedOptionWidget instead of OptionWidget so
the icon config parameter is recognized again.
Change-Id: I08d8a0466c211a29eb62043131725073dece4eb5
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
Also change this.$overlay (which doesn't even exist) to
config.$overlay in MWTemplatePlaceholderPage and document it.
Compensates for I39df86373ea in oojs-ui.
Change-Id: I4a233c058439d6cfb38d80ece890c8fe57d58f49
Would put this code in onBookletLayoutSet, but that doesn't appear to be
getting called in this case.
Have to detect whether or not we should be changing the disabled status, rather
than just setting it straight away, which would break every other case where
onBookletLayoutSet is called.
Bug: 63158
Change-Id: I6f62479291424d9b2ee0e42481dec9d085169c63
Rather than make a new function to determine whether it should be apply-able or
not (and run some checks again), move the enable/disable call into a new
function to do these checks and set the result.
Bug: 72191
Change-Id: I133afa1784e1afd44054f93ed84018894f7c6400
The autoValue was displayed in the UI but was never
actually written into the template model, unless you
changed the text input and then undid your change.
Bug: 71157
Change-Id: I08e2ba88c24fdee030104c6fb9baafb558ce8a80
* Introduced MWLinkAction which opens the right link inspector
based on what is selected.
* Added MWLinkInspectorTool overriding core's 'link' tool that
executes MWLinkAction
* Removed MWLinkNodeInspectorTool and linkNode command,
they're unneeded now
Bug: 72150
Change-Id: I03bd6ab1f67f31a6e6cb717cf4298e80e64637b7
The correct parameter is &redirects=. Which we really don't want
to use anyway, because if Foo->Bar, using &redirects=1 would
cause a search for "Fo" to return "Bar" as a search suggestion
with no explanation why (and "Foo" wouldn't be visible).
This isn't unsurmountable, we could put in handling similar to
how the category widget handles redirects, but what this code
is trying to do by passing this parameter is definitely wrong.
Change-Id: Idd12c03aaef897d7c1dc70b2a7692e7d71980efe
This was broken when requiresRange was renamed to requiresSelection
and MWUseExistingReferenceDialogTool wasn't updated.
Change-Id: Ia1018520fc253e2f09755d5e85a94a325df80005
On initialization, the image model has an initial scalable that has
the given currentDimensions from Parsoid; these are usually correct.
However, in cases where the wiki settings do not fit the user settings
and the images appear smaller or bigger in practice than the values
of the wiki-defaults, the initial hash will store the wrong values.
We will only know what the real values for the comparison will be
after we get them from the API and the calculation; only at that
point we can update the image model initial hash.
This is important so that later the dialog can properly understand
whether to enable the "apply" button if a user changed an image
to custom size and then back to default.
Change-Id: If17b50cc4a39993f98a20a3fec3ddf5d8cb400b3
OOjs UI killed the 'hide' event that was running this code in the dialog refactor
back in July (Id121fc3a), but left it documented (along with 'show').
Just use the 'toggle' event instead.
Bug: 72168
Change-Id: I172fac81c4cbb89505522011aed57db57ccbc52f
New changes:
69ecc8e Remove MW-specific mobile hack from core
e556440 doc: Use wildcards for Desktop/Mobile …Context and …Surface for simplicity of extension
Local change:
Bring in MobileContext hack to filter out all tools except links and citations from core where
it didn't belong.
Change-Id: Ica837abd45f0ff02b49a44da617bc1fd8e9872d4
New changes:
e251898 [BREAKING CHANGE] Allow tools to specify which selection types they support
Local changes:
New requiresSelection api for tools
Change-Id: Idc3f62d60bfb5710f786734c342f71b1c73fd4c0
* Use .oo-ui-tool-title-text selector rather than .oo-ui-tool-title
to avoid styling accelerator keys.
* Divide all sizes by 0.8, as we no longer need to match the font-size
rule on .oo-ui-tool-title.
* Add CSS for heading1 (which differs between Vector and core VE)
and heading2 (because it looks silly if it's missing).
Change-Id: I12226f0a674037f904149cc10893f5c154767bfc
Instead of putting these popups in an overlay, put them
in the category widget. This makes scrolling work more
nicely, and makes things easier to deal with in general.
This requires that the popup position itself using
getRelativePosition(), because it's no longer in an
overlay. This also means these popups should now position
themselves correctly no matter where they are.
Change-Id: I09a1e5891a897d634c41d386a2307fe3df2a9157
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
We really shouldn't need the inner overlay for this,
we should be able to deal with popups being in
oo-ui-window-overlay. But for now, we're not, and
this fixes the current problems.
Depends on If16d16d2b in oojs-ui.
Bug: 72052
Change-Id: Ie06056b96db19ac4caf1f9c0e3a1c49cfddc6682
The previous check for RTL did not properly recognize
when the UI was in RTL, since the element in question has no explicit
'dir' attribute. The test now uses $element.css( 'direction' ) which
is inherited, and produces a correct result.
Change-Id: Ie30c2038428b10709dc30cb8320bdc94d76a5a18
As of Ieb27c3fd1 apex uses solid black icons with opacity
set in CSS, so make VE icons consistent.
Change-Id: I4c38c497875686503d46a2376a7842f50bf7f2fd
Wikia has done some work on the template user experience, including
automatically showing all available parameters without the use of
TemplateData. In order to make our changes, we had to make some changes
to VE-MW.
ve.dm.MWTransclusionModel.js
* this.specCache is created so subclasses can reference it.
* Promise handlers in the fetch() method have been broken out as class
methods so they can be overridden in subclasses.
ve.ui.MWTemplateDialog.js
* addPromptedParameters() has been moved to the
initializeNewTemplateParameters() class method so subclasses can
overwrite. In Wikia's implementation, we have a method of getting
all parameters and a dialog that shows all of the parameters, so the
request to addPromptedParameters is overwritten.
* Added a done() handler to the transclusionModel promise for Wikia
extensibility.
Change-Id: I073c5850420e7719e82957f879423c2717af674a
The TextInputWidget class inherited by MWCategoryInputWidget,
already has a keypress listener that emits an "enter" event on
the OO.ui.Element object for us to listen to. No need to duplicate
that logic again.
Change-Id: Ia47bc8976f22dfe7e3a6fb6068dc4b6e03a3357b
The title attribute for byte counter in MWSaveDialog is replaced with the mixin TitledElement from label widget in OOUI
Change-Id: Ic4b37fac9e16b6db9091a16376e06d55bbb3d649
New changes:
6bbcd6a Localisation updates from https://translatewiki.net.
b8d8a5b [BREAKING CHANGE] The Great Selection Rewrite of 2014
Local changes:
Update to use new selection/range API
Change-Id: I5480d5c77d599c93c2d374fac88bb2fdb68b0024
Now that we use staging in the meta dialog, the following
sequence is possible:
* Add Category:Foo in UI (adds to DM and adds a widget)
* Remove Category:Foo in UI (removes from DM, removes widget)
* Click Cancel to leave meta dialog
** popStaging()
*** Undo removal of Foo (adds to DM, does not add a widget)
*** Undo addition of Foo (removes from DM, tries to remove nonexistent widget)
Add a check so trying to remove an already-removed widget
doesn't cause a JS error.
Bug: 71471
Change-Id: I34690364ce302b858e2a4429dbb97b57d39aae5f
Fixes Icb62b9b2. I have no idea how I managed to screw this up.
Was also causing an error in console when one of the categories was a redirect
Change-Id: I0321c8be1386cb010c3babb33e08fae0fcaf75ce
New changes:
c06fa64 Account for isValid() becoming async
12e4840 Account for WhitespacePreservingTextInputWidget#getValue being called early
Local changes:
* Make MWLinkTargetInputWidget#isValid asynchronous
Bug: 71237
Bug: 71246
Change-Id: Iab83e743f99973f01a54b23fd5ddf1081f7effd6
New changes:
8d5ec7a [BREAKING CHANGE] Rename ve.Document.getNodeFromOffset to getBranchNodeFromOffset
Local changes:
* Update calls for rename of getNodeFromOffset to getBranchNodeFromOffset
Change-Id: Ibc69f5a5deeed5698368bb19b30f14497c579e90
Allow for an auto-value for parameters in TemplateData, and make sure
this autovalue is inserted as text when parameter is loaded. This is
mostly useful for referencing date or other dynamic templates inside
parameters.
Bug: 52029
Change-Id: I6203530798ffaa62cb26190c70f7ce391bddf123
Relies on I5d894f8a in MW core. We'll need to update our wfUseMW when that gets merged.
Bug: 50747
Change-Id: I35e55658a3990121afe4d996ef4ee06547d2aa0c
In the Media Dialog, make sure the size widget is valid before
applying or disabling the apply/save buttons.
Bug: 70861
Change-Id: I6ec9eb69fe6576f1c668270b12157de9910f0214
If there is no range selected, disable regardless of whether there are references in the document or not.
Bug: 70870
Change-Id: I2c281fefe7915345fafb735b3788166ab8118049
Instead of doing a blocking overlay, we're simply keeping the dialog open,
which is necessary for the pending status of the action buttons anyway.
Requires Ib2c8f336 in OOUI
Bug: 65012
Change-Id: I65b5de4a1666a81b157a71f6fec490007689eb44
Category redirect stuff is currently broken because of I5c536697, but no one seems to have noticed.
Fix bug 69886 while we're here
Bug: 69886
Change-Id: I62cf23d0e86bc43d739bb4c4610a5a852146fa3f
Inserting a new external link from the link inspector when nothing is
selected (collapsed selection) will now produce an autonumbered external
link ('link/mwNumberedExternal' node, corresponding to wikitext
"[http://example.com]"). It used to produce annotated link text
('link/mwExternal' annotation, corresponding to wikitext
"[http://example.comhttp://example.com]" or "http://example.com").
Depends on two commits in VisualEditor/VisualEditor:
* Icc2e368a to insert unannotated content from the inspector.
* I40cd4d5a to insert non-text content from the inspector.
Bug: 51309
Change-Id: Ie4a633ed42907551337a62d96d0abd59e208d49d
Before sending new searches to the API, abort the previous ones if
they were not resolved. This will assure that the result presented
on the screen is valid to the latest search that was done even if
the user types quickly and sends many async requests simultaneously.
Bug: 67438
Change-Id: If88123019bfa972520e9db7c627a7f4cd8fc2526
setChanged() was renamed to checkChanged(), but one call wasn't
updated. This was causing JS errors in a documentUpdate event
handler, which caused pawn nastiness.
Bug: 70450
Change-Id: I71e576638f9e2fde450f4412229cf980e6ba7e10
After resolving the search queries to the API, make sure to display
or hide (!) the "no results" message.
Bug: 67438
Change-Id: I518fbf5ae18bb2265710600516d556c60e2b4924
Create an image model hash and check for changes to the image every
time the dialog is changed, so we can activate and deactivate the
apply button properly.
Bug: 68058
Change-Id: I94b7e4879c6e752432c6f937a8cf1b9f15d1b56d
Causing the label of each parameter to be missing ($label actually gets sent to the outline item
widget, for some reason). Looks like it was caused by I1abecd8a.
Bug: 70406
Change-Id: I598ffe5066d0ae8267324d4125d05514449064d5
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
That function needs to return the result immediately, not wait for module loading (via mw.notify).
This was breaking us being able to keep track of what wikitextWarning object was in use (but only
the first time we used the module), and therefore fail to close the warning when the wikitext
disappeared.
Bug: 70168
Change-Id: I0f1427423a5fe82ec8e70e2f0462a3044ca7ace8
New changes:
7a2e989 Update OOjs UI to v0.1.0-pre (43f379c884)
Local changes:
Eliminate all references to Agora, now Minerva
Change-Id: I497e122a35090a909b1fbb00d0a9487d97e09da1
Make sure the image model can switch parameters when the image
source is switched, rather than having to instantiate a new
image model.
Also, when the image is changed, retain aspect ratio but make sure
to preserve the width of the previous image (unless the new image
is smaller)
Added 'resizeToBoundingBox' and 'scaleToThumbnailSize' static methods
in MWImageNode that return scaled dimensions based on the image
dimensions and the bounding box detals.
Depends on core change Idbb8b29db8e
Bug: 69450
Bug: 68000
Change-Id: I4327c86a9127f46da5522dc1197411fda757d5a4
If you got an edit conflict, the save dialog would
dead-end: there was no way for you to actually get to
the edit conflict resolution page because we were
hiding the resolve button.
Bug: 69150
Change-Id: Iaccb7d0ec25d8f15398e437d614184433c33e6eb
The categories table holds all categories that exist OR have at one
point existed. This means it also contains a lot of vandalism and
other inappropriate names that happily come up in the suggestions.
This is undesirable. This changes the query to only list categories
with at least 1 entry.
Though technically it can be argued that an empty category with an
existing page might 'exist' and should thus be listed, with this
change they won't be. I don't think that is terribly incorrect to
say that such would be a 'new category', but we could also consider
renaming the label in the suggestion list to say:
'Currently unused category' or something similar.
As far as I can tell there is no way to test for page existance OR
generate a list based on allcategories with one API query.
Bug: 70025
Change-Id: I0e195d3ce26e69d4710d6a505b9da7d1b7678d92
The solution to this problem was two-fold:
* Initialize the menu selection based on current annotation data
* Don't re-open the LinkTargetInput suggestions menu after choosing
It unfortunately involves assuming that setAnnotation will always synchronously emit 'change' events.
Bug: 65343
Change-Id: Ia92751add5ee59ba581141a31c8433c5e7e521a5