Page MenuHomePhabricator

FilterChipInput: make the FilterChip editable
Closed, ResolvedPublic2 Estimated Story Points

Description

Background

We created the MVP version of the FilterChipInput in T337095: ChipInput: Add ChipInput component to Codex. We need to implement an editable state to make the FilterChip within the input editable.

User stories

  • As a user, I need to edit the chips I'm adding in a FilterChipInput.

Known use cases

FilterChipInput - UserPreferences.gif (293×600 px, 595 KB)
There are there 2 FilterChipInputs in User's preferences. The first one is editable while the second one is not editable.

Previous implementations

Design spec

Open questions

Add here the questions to be answered in order to design and implement the component

Acceptance criteria (or Done)

Design

  • Design the Figma spec sheet and add it in this task
  • Update the component in the Figma library. This step will be done by a DST member.

Code


Future tasks

Event Timeline

Change 936081 had a related patch set uploaded (by Bmartinezcalvo; author: Anne Tomasevich):

[design/codex@main] FilterChipInput: Make FilterChips editable

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

CCiufo-WMF set the point value for this task to 2.Aug 8 2023, 5:11 PM
CCiufo-WMF triaged this task as Medium priority.Aug 8 2023, 5:23 PM

@bmartinezcalvo does this need design or is it ready for development? It seems like we have agreed upon the following UX:

  • In a FilterChipInput, when a user clicks on a FilterChip, it disappears and its text appears in the text input
  • If there was text in the text input, that text becomes a new FilterChip
  • Interactive styles for the FilterChip in this case will be applied as specified in T343479

Is that right, or is there more to it than that? I'm asking because T343479 is in the sprint, but should not be implemented until this task is (because FilterChips on their own should not show interactive styles; only if they are in a FilterChipInput and therefore do something when clicked)

I think we bumped this back into Design in order to capture the behavior from the patch in Figma. If there are no concerns about the approach in the patch, I agree we can continue working on it and any other concerns can be addressed in design sign-off.

I've updated the Figma spec adding the editable states for the FilterChipInput, where the FilterChip will become to text when clicking on it.

These are the states defined for both types of FilterChipInput:

Captura de pantalla 2023-08-16 a las 13.14.08.png (232×2 px, 54 KB)
Captura de pantalla 2023-08-16 a las 13.14.25.png (300×2 px, 59 KB)

Also explained in the spec sheet the 2 ways to create the chips within a FilterChipInput:

Captura de pantalla 2023-08-16 a las 13.29.19.png (500×2 px, 100 KB)

@AnneT if you agree with these behaviors we can move the task to Ready for development.

I've updated the Figma spec adding the editable states for the FilterChipInput, where the FilterChip will become to text when clicking on it.

These are the states defined for both types of FilterChipInput:

Captura de pantalla 2023-08-16 a las 13.14.08.png (232×2 px, 54 KB)
Captura de pantalla 2023-08-16 a las 13.14.25.png (300×2 px, 59 KB)

These look good to me. Note though that for the MVP, the "Filter chips outside the input" use case is not implemented.

CCiufo-WMF moved this task from In Design to Up Next on the Design-System-Team board.

Change 951554 had a related patch set uploaded (by Anne Tomasevich; author: Anne Tomasevich):

[design/codex@main] FilterChip: Add click-chip event and change keyboard behavior

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

Change 951554 merged by jenkins-bot:

[design/codex@main] FilterChip: Add click-chip event and change keyboard behavior

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

Change 936081 merged by jenkins-bot:

[design/codex@main] FilterChipInput: Make chips editable; add chip on blur

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

@AnneT during the last Eng/Design sync we discussed the option of adding arrow navigation for keyboard users. Will this be implemented in this task?

@AnneT during the last Eng/Design sync we discussed the option of adding arrow navigation for keyboard users. Will this be implemented in this task?

I believe that is captured here T344848: ChipInput: improve keyboard navigation.

@AnneT during the last Eng/Design sync we discussed the option of adding arrow navigation for keyboard users. Will this be implemented in this task?

I believe that is captured here T344848: ChipInput: improve keyboard navigation.

Oh great, so moving this task to Pending Rerelease then. Thank you!

Change 953351 had a related patch set uploaded (by Catrope; author: Catrope):

[mediawiki/core@master] Update Codex from v0.17.0 to v0.18.0

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

Change 953351 merged by jenkins-bot:

[mediawiki/core@master] Update Codex from v0.17.0 to v0.18.0

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