This is to help differentiate between <input type="text" /> and
<textarea> fields. We need this for UploadWizard in particular because
we intend to build a form for the Information template on Commons, and
it has both small fields (for which we'll use <input>) and big ones
like description (for which we need <textarea>).
Change-Id: Ib9b381816d18f2723a9f715c54f6a64ff4b69847
Follows-up 2c89726 which removed support for null values
in InterfaceText. The uses of InterfaceText that allow null
says so explicitly in their signature (e.g. Root.description
can be InterfaceText or null, whereas Set.label must be
InterfaceText and never null).
Change-Id: Ied1dbadd6b65d8b21244617d31a9fdd64edf8e2a
Previously we only compared output, we now evaluate
status as well.
For example test {} => {} was misleading since the reason
it roundtripped was because it is *invalid* and we replace
invalid blobs with an empty object in blob storage.
But in the API this'll never get used because getStatus
will have a fatal error in it. Which overrides the data.
The tests were previously looking in the data whilst ignoring
the return status.
Change-Id: I9809f126c1615c9bc9c28ce2d8bb7953058cbf6e
Since we now have an occurance of InterfaceText that isn't
optional (namely Set#label, which must not be null) move the
"null" value type to all other uses of InterfaceText instead
of in InterfaceText itself.
Change-Id: I92786492a37d907aad446655704ea1b52938ab21
* Inside a Set object, label is no longer optional
* The "sets" container (Root.sets) will be an array instead
of an object. They don't need to have an internal key.
Contrary to Root.params where the key relates to the
parameter key in wikitext.
Change-Id: Iede29d25cd6ecbcf43970e1e45e60e5aac206a95
For invalid keys, pass property path, not just the latest
child.
Changes error:
- Invalid value for "typo"
+ Invalid value for "params.date.typo"
Also cleaned up the concatenation logic for the others to
be more readable (PHP dots vs. string dots):
- 'params.' . $paramName . '.key'
+ "params.{$paramName}.key"
Change-Id: I666e0b22f4b7bacc5b89b0761c74138732f94d73
InterfaceText now defaults to null instead of {en:""} which
was awkward to deal with in the frontend.
As specified:
- label is InterfaceText
- type is a string and must be a one of the recognized types
Updated example for the hypothetical variant of Template:Unsigned
and removed other no longer needed example.
HTML output has been revised per conversation with Trevor,
James and Timo:
- Not sortable.
- Add label to html output.
- Aliases in the main parameter column (one per line),
but muted in styling.
- Add type to html output.
The css module styles content from the server, not content
generated by javascript. Moved module to position => top to
fix flash of unstyled content.
Change-Id: I16d3f9e460c5513935b9b55fe4cec0092b38e6c2
I ran into countless random exceptions and errors locally due to
cache I built up over time that was no longer valid. Though in
approved commits in the repository there is only 1 version as of
now, I'm sure we will make changes in the future that require a
cache invalidation since getHtml needs to be able to make
assumptions about what properties exist.
Also fixed a bug in the parse() method where the 'deprecated'
property is asserted the wrong way around. Added a test for it.
Change-Id: I5f61d6030578a711909435c8b996373e9aaa5178