- Implement our new UI elements in the VE code base, and only “upstream” to OOUI.js at the end of our project. e.g. Create a OOUI checkbox with label
- Optionally wire into the layout, but with literal content, don't wire data.
- Truncate parameter names that are too long for the sidebar (maintain current behaviour).
- Not in scope: styling shouldn't be finalized here, it's going to change when we have multiple transclusions.
Description
Details
Event Timeline
I might make some changes to the requirements as I understand more: the checklist will probably appear embedded within another container which we haven't specified yet, per-template. It will probably need some API to maintain ordering, though this could be postponed until T274550.
Change 692347 had a related patch set uploaded (by Awight; author: Awight):
[mediawiki/extensions/VisualEditor@master] [WIP] Checkbox list widget
So far, I've found that:
- The checkbox list (general part) (specialized part) don't have much going on. The logic is in the checkbox item itself, and in the template-level container.
- The checkbox items are more exciting, and I don't think they are appropriate for generalization. For example, we have a special behavior that clicking on the label will enable but does not disable. Another is that the hover title is customized when the checkbox is disabled due to being a required parameter. An attempt at generalizing and still supporting these quirks would end up with a lot of very specific configurability or extension points, and it doesn't seem like it's worth the extra complexity. Nobody is asking to reuse the general thing we would create.
- I took the liberty of also stubbing a template-outline template widget and a multi-transclusion container, so that the next wiring steps happen through the appropriate hierarchy.
This patch is up for grabs. It feels nearly complete, except for a stray linebreak between the checkbox and <label> for long parameter names.
I tried the patch locally and there is something strange happening with the transclusion menu at the bottom of the sidebar. It moves along when scrolling the list. I guess we should make it stick to the bottom.
Thanks for noting this! I was rather liberally sweeping this under the "styling shouldn't be finalized here" exception, but you're right to point this out as a bug. This should be fixed before closing the task.
Change 697036 had a related patch set uploaded (by Awight; author: Awight):
[mediawiki/extensions/VisualEditor@master] [WIP] Reuse OOUI checkbox list widget
@Lena_WMDE @ECohen_WMDE I'm investigating reuse of a high-level OOUI widget, and wondering if we would want any of the following default behaviors, or would end up suppressing them:
When a parameter is focused in the sidebar, the <space> key checks and unchecks the parameter.<up> and <down> arrow keys navigate to the previous and next focusable (non-required) sidebar items.
Update: no longer relevant, we can't reuse the widgets that provide this behavior.
Change 697036 abandoned by Awight:
[mediawiki/extensions/VisualEditor@master] [WIP] Reuse OOUI checkbox list widget
Reason:
Let's merge this without the text-overflow ellipsis. The basic functionality is fine, this task blocks almost all the others, and we've already agreed to defer the final styling.
Change 692347 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Template dialog checkbox list
Change 710991 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/VisualEditor@master] Remove duplicate class property from checkbox layout
Change 710991 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Remove duplicate class property from checkbox layout