Page MenuHomePhabricator

Create a new checkbox list view for the VisualEditor template dialog
Closed, ResolvedPublic1 Estimated Story Points

Description

  • 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.

Related Objects

StatusSubtypeAssignedTask
ResolvedWMDE-Fisch
ResolvedLena_WMDE
ResolvedLena_WMDE
ResolvedWMDE-Fisch
ResolvedWMDE-Fisch
ResolvedECohen_WMDE
ResolvedNone
InvalidNone
Resolvedthiemowmde
ResolvedAndrew-WMDE
ResolvedNone
ResolvedNone
Resolvedthiemowmde
ResolvedAndrew-WMDE
ResolvedWMDE-Fisch
Resolvedawight
ResolvedAndrew-WMDE
ResolvedECohen_WMDE
InvalidNone

Event Timeline

awight set the point value for this task to 3.Mar 3 2021, 1:52 PM

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

https://gerrit.wikimedia.org/r/692347

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.

Screenshot from 2021-05-25 11-28-30.png (904×931 px, 138 KB)

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.

Screenshot from 2021-05-25 11-28-30.png (904×931 px, 138 KB)

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.

Lena_WMDE changed the point value for this task from 3 to 1.May 26 2021, 8:14 AM

Change 697036 had a related patch set uploaded (by Awight; author: Awight):

[mediawiki/extensions/VisualEditor@master] [WIP] Reuse OOUI checkbox list widget

https://gerrit.wikimedia.org/r/697036

@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:

https://gerrit.wikimedia.org/r/697036

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

https://gerrit.wikimedia.org/r/692347

awight claimed this task.
awight moved this task from Doing to Done on the WMDE-TechWish-Sprint-2021-05-12 board.

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

https://gerrit.wikimedia.org/r/710991

Change 710991 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Remove duplicate class property from checkbox layout

https://gerrit.wikimedia.org/r/710991