If you changed the name to one of its own aliases, then went into the
alias field to remove that alias, the "Done" button would remain
disabled for no obvious reason. As such, rerun the name change handler.
Also, the input error-highlight was too low specificity for current OOUI
CSS, and so we weren't showing which field had an issue.
Bug: T222543
Change-Id: I49ac0587c4b5e58ce1fc3c42e3dffeae8f986672
Three-braces-and-a-bang can be a table starting construct in templates.
This also fixes an overlooked bug in which the test wasn't checking
array element key names.
Bug: T157029
Change-Id: I69ed4fc9fe3bb126b7b39abea0f58ad56adf3885
VisualEditorPluginModules loads whenever VE loads, so create a minimal
loader page to check if we are in the template namespace before loading
the rest of the TemplateData init code.
Bug: T208765
Change-Id: Id127eb4a2472a6ce9da7672f9237b182cf6be2eb
Parameter names can be constructed with parser functions, so
we should not include these as raw parameter names. There
might be more characters to add here.
Bug: T203605
Change-Id: If57a9ed7edf1e881cd121d9a1bcb2e7455c04ec9
The editor is displayed on 'Sanitized CSS' pages (template pages
ending with .css), it should not because it is not interpreted as
wikitext and tags are not recognised.
Change-Id: I58195de1ae54252d57e1cd912ee52801a093729e
When extracting raw parameters from wikitext, ignore those that
only differ from already-found ones by spaces, underscores, or
hyphens.
Bug: T193265
Change-Id: I012e06bf4353eaaf0613124d7d6b88f3444d248a
Set viewBox to "2 2 20 20" to trim 2px off each side of our
existing 24px icons, therefore aligning them to the new 20px
grid. All of them had been drawn with large margins, so none
of the graphic is lost.
Bug: T177432
Change-Id: I5c49e976750a79e2e0fee389d1c8571faddfdf0e
Removing `0.8em`/`12.8px` VE special base `font-size` for UI as we're unifying
OOUI interfaces to `14px` equals to `0.875em` at user agent default size.
Bug: T189920
Depends-on: I693d168d2ccf2babbcfe8952af3e1c262aa97773
Change-Id: Idf64b077d8e5ab5b1352052b72ac198816dcc07a
Previous behavior was to silently append a number to the name, which was hard
to notice. New parameters with duplicate names were already blocked.
Also, fix the disabling of the done button when there are errors.
Bug: T166520
Change-Id: I1d0c51a2aa8b8158874c98ac48fe257baeb1aee1
* Remove use of undocumented 'this' inside promise callback,
use the promise variable instead.
* Remove needless expectCount.
Change-Id: I3a698207440d8085a502fa54da8bb5feddfa1dcb
Create target classes with get/setWikitext methods.
Also refactor some of the window manager code.
Bug: T152230
Change-Id: I7dcc137d79e029b69467ca282d8c52683e022598
Thanks to Thiemo Mättig for the suggestion and specification at
Wikimania 2016 in Esino Lario.
This is an extended version of Thiemo's original specification. This
version also allows specification of "own line" properties for
templates; that is, whether the template should be preceded/followed
by a newline, as requested by James Forrester.
Bug: T138492
Bug: T135667
Change-Id: Idc6b2680330e6bf5caec2bf6fc86a705d25bc649
This gives it more visual indicators that it'll take you somewhere. Its
previous frameless-button appearance made it non-obvious that it was behaving
as a link.
Bug: T142484
Change-Id: I7732bf6db7ac63121d6ed1377c654ae8700895d1
If the user tried to rename a parameter to "asd", but "asd" already existed,
we'd append "asd0", and the user would get "asdasd0". But what we actually
wanted to do was change it to "asd0".
Change-Id: I7fa05ed6fca54bc941e1843ebe6872a87383effb
Otherwise the second keystroke made while changing parameter names will cause
an error. I think this code previously assumed the change only happened once,
rather than on-keystroke.
Bug: T142889
Change-Id: I0e9c096a053667c51bbce74ee3ce1bd573ae7d49
Also make getNewValidParameterKey actually return (probably not necessary for
this commit but I discovered it in the process).
Bug: T138800
Change-Id: I94ec6729b98c126b609b747fe4ce04a5fc02f616
Reuses some messages, renaming them in the process.
Changes undefined on the client to unknown.
Bug: T61745
Change-Id: I2cf5c25acbe1c854c33b2eb3f23dc74393a456d4
Don't enforce 'inline' as the default format if none is specified.
Instead preserve the unspecified value as 'null'. This allows
third-party tools to provide a better default experience when changing
existing content (e.g. by using smart detection to follow the format
already used).
Bug: T128337
Change-Id: I911c7999e3731c0125fc058118f8d7287d8f88f4
It looks like this is how the code was originally intended,
but 'name' and 'key' are the same thing.
Move the key to the 'alias' list where CSS already exists to
colour it differently.
Change-Id: Ieade122633cec14203f7959121e9cd7250bb9f7a
Not having two lists of all the parameters seems like a good idea.
Depends-On: I30d1f7f56230d73eb47ccbf9881c0b952b15bd89
Change-Id: I5b2ba39fb7b98fc50816f63bc4fbfc9fe25e02a5
The current way surprisingly mostly works, but you're supposed to use
the matching class. This fixes some styling inconsistencies.
Change-Id: I3f8ce19b1f96cc051b7ac987fa211d1b5ee9cc71
Depends on Ieaf19fe4485b679e0ee21d16f8f2e0693808f386 to take effect with the
escape key. Otherwise only handles the visible 'Cancel' button.
Bug: T106382
Change-Id: Ibc55727fd6a5becfe10b4e74cae5e573d110575d
Adding format data, which defines the preferred source format
to use when using templates.
Possible formats:
* Inline - all parameters in a single line
* Block - each parameter is in its own line
Bug: T64147
Change-Id: Id856c4a38890526060d0619432f06174d66f7792