Page MenuHomePhabricator

Page titles selector control
Closed, ResolvedPublic

Description

The Special:EditGrowthConfig contains a control for selecting one or more page titles (restricted to Template namespace) from the local wiki. The exisiting version uses HTMLTitlesMultiselectField from HTML form on its OOUI display. We need a new control implemented in Vue as a replacement

Config property: GEInfoboxTemplates

Data schema

"GEInfoboxTemplates": {
  "type": "array",
    "items": {
      "type": "number"
      }
  },

Existing implementation:

Screenshot 2024-02-15 at 19.08.02.png (1×1 px, 180 KB)

Figma design: TBD

Event Timeline

KStoller-WMF moved this task from Backlog to Up Next on the Growth-Team board.
Sgs lowered the priority of this task from High to Medium.Mar 14 2024, 6:31 PM

Change #1015020 had a related patch set uploaded (by Sergio Gimeno; author: Sergio Gimeno):

[mediawiki/extensions/CommunityConfiguration@master] Editor: add PageTitles selector control

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

hi @Sgs I had a quick chat about this with Derek and Volker. the form guidelines have introduced a 'multi-selections' approach that may be useful for this use case. what do you think?

multi-selections (1).png (230×752 px, 18 KB)

The control is been implemented using the ChipInput component from Codex which in a way also provides full management. Maybe we should restrict the "multi-selections" pattern to complex selections?

Screenshot 2024-04-15 at 15.40.09.png (1×1 px, 161 KB)

Gotcha, yes that makes sense, let's make use of it in complex cases.

Change #1015020 merged by jenkins-bot:

[mediawiki/extensions/CommunityConfiguration@master] Editor: add PageTitles selector control

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

Thx, @Urbanecm_WMF!

Tested on beta Especial:CommunityConfiguration/GrowthSuggestedEdits.
(1) The list of suggestions displays the titles in black, not in blue (as links) as they are displayed in produciton:

eswiki betaproduction
Screen Shot 2024-04-22 at 5.31.01 PM.png (1×3 px, 212 KB)
Screen Shot 2024-04-22 at 5.47.59 PM.png (1×1 px, 173 KB)

(2) the text field doesn't have the input text placeholder

(3) the invalid input (no matching pages) has no indication that it's invalid

eswiki betaproduction
Screen Shot 2024-04-22 at 5.43.57 PM.png (766×1 px, 101 KB)
Screen Shot 2024-04-22 at 4.45.42 PM.png (838×2 px, 129 KB)
Screen Shot 2024-04-22 at 5.53.22 PM.png (520×2 px, 97 KB)
Screen Shot 2024-04-22 at 4.45.25 PM.png (566×2 px, 97 KB)

DONE (4) The behavior of discarding the drop-down suggestions is different from production:

  • on eswiki beta start typing 'Info' - a list of suggestions appears
  • click outside the suggestions and outside the input text field - Info gets added, but the suggestion list is not discarded.

Screen Shot 2024-04-22 at 12.33.26 PM.png (644×1 px, 83 KB)

DONE (5) the input text field is selected after a user deleted typed text

  • a user types 'Info'
  • then, a user manually deletes the input and clicks outside
  • the input text field field is still selected

Screen Shot 2024-04-22 at 12.30.13 PM.png (706×3 px, 109 KB)


Additional Notes:

As it's implemented now on `eswiki beta
(1) The text is not present on a page: "Some types of suggested edits are surfaced through ..."

(2) The text "These templates are needed for the image suggestions newcomer task feature. Articles containing these templates will not be listed as image suggestion tasks." doesn't have a link for image suggestions .

Change #1023408 had a related patch set uploaded (by Sergio Gimeno; author: Sergio Gimeno):

[mediawiki/extensions/CommunityConfiguration@master] PageTitlesControl: close menu when there is no input

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

Thx, @Urbanecm_WMF!

Tested on beta Especial:CommunityConfiguration/GrowthSuggestedEdits.
(1) The list of suggestions displays the titles in black, not in blue (as links) as they are displayed in produciton:

eswiki betaproduction
Screen Shot 2024-04-22 at 5.31.01 PM.png (1×3 px, 212 KB)
Screen Shot 2024-04-22 at 5.47.59 PM.png (1×1 px, 173 KB)

Same as commented in T357712#9735052, once we have design clarifications from @JFernandez-WMF we can apply same behavior here I think.

(2) the text field doesn't have the input text placeholder

Indeed, we're missing placeholder support in general, captured in T363051.

(3) the invalid input (no matching pages) has no indication that it's invalid

eswiki betaproduction
Screen Shot 2024-04-22 at 5.43.57 PM.png (766×1 px, 101 KB)
Screen Shot 2024-04-22 at 4.45.42 PM.png (838×2 px, 129 KB)
Screen Shot 2024-04-22 at 5.53.22 PM.png (520×2 px, 97 KB)
Screen Shot 2024-04-22 at 4.45.25 PM.png (566×2 px, 97 KB)

Not sure what definition of "invalid" are we using here, in practice it is possible (so valid?) to input a non-existing page in both controls. I think the expectation here depends on the UI/UX design from (1).

(4) The behavior of discarding the drop-down suggestions is different from production:

  • on eswiki beta start typing 'Info' - a list of suggestions appears
  • click outside the suggestions and outside the input text field - Info gets added, but the suggestion list is not discarded.

Screen Shot 2024-04-22 at 12.33.26 PM.png (644×1 px, 83 KB)

Good catch. The 'Info' getting added I'm not sure if it is an intended behavior, looking for clarifications in Slack#talk-to-design-systems-team. The menu remaining open seems a defect/bug indeed, fixed in 1023408

(5) the input text field is selected after a user deleted typed text

  • a user types 'Info'
  • then, manually deletes the input and clicks outside
  • the input text field field is still selected

Screen Shot 2024-04-22 at 12.30.13 PM.png (706×3 px, 109 KB)

Good catch. The input looses its focus but the menu was remaining open even if empty creating the unexpected "shadow" below the input. Fixed in 1023408


Additional Notes:

As it's implemented now on `eswiki beta
(1) The text is not present on a page: "Some types of suggested edits are surfaced through ..."

(2) The text "These templates are needed for the image suggestions newcomer task feature. Articles containing these templates will not be listed as image suggestion tasks." doesn't have a link for image suggestions .

Thank you, @Sgs for the review and your replies! I re-check #4 and #5 when the patches get merged.

Change #1023408 merged by jenkins-bot:

[mediawiki/extensions/CommunityConfiguration@master] PageTitlesControl: close menu when there is no input

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

Checked ##3-4 from https://phabricator.wikimedia.org/T357710#9733651 - ✅ DONE

The scope of this task is done.
The placeholder issue is captured in T363051; #1-2 from https://phabricator.wikimedia.org/T357710#9733651 - added to T361324: [QA task] Community Configuration UI evaluation (will be subject for Design review).