Have preview of search text in pills when form is collapsed
Open, Needs TriagePublic3 Story Points

Description

Problem: User tests revealed that the pills are not helpful to the users when trying to remember the used search terms and thus they don't feel confident removing them without opening the form up again. T170397

Solution: Adding up to the first 8 letters to the pills is enough to trigger the memory of what was searched for and allows for a more confident deletion of the pills.

Acceptance Criteria:

  • Field content is contained within the pill.
  • If field content is larger than 8 characters, it's truncated and an ellipsis sign is added.
  • Full field content is always available as a title attribute.
Restricted Application added a project: TCB-Team. · View Herald TranscriptWed, Jul 26, 4:10 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Charlie_WMDE updated the task description. (Show Details)Wed, Jul 26, 4:20 PM
Charlie_WMDE updated the task description. (Show Details)
gabriel-wmde set the point value for this task to 3.Wed, Aug 2, 11:59 AM
Pablo-WMDE claimed this task.

Looking at the current technological possibilities, and after talking to the UX team I suggest we solve this using styling, without putting truncation code into the application.
Two trade-offs:

  • we'll not be able to cut after exactly 8 characters, but rather we let the browser cut after - for example - a string length that is as wide as '5 m-characters' in the given font.
  • browser that do not support this feature will cut the string without any decoration

On the plus side we do not have to address LTR, language questions...

Pablo-WMDE added a comment.EditedMon, Aug 7, 4:11 PM

Ad hoc AC changes/specification

  • don't show formatted query syntax in title
  • disable draggable (raised bug w/ ooui T172781)
  • show image dimension search preview, supporting <, > and =, as "<1400", ">300", and "500" respectively
Pablo-WMDE removed Pablo-WMDE as the assignee of this task.Tue, Aug 8, 3:27 PM
Pablo-WMDE moved this task from Doing to Review on the WMDE-Fundraising-Sprint-8 board.
Pablo-WMDE added a comment.EditedWed, Aug 9, 3:31 PM

Thanks for the review and discussion. Did some more UAT, caught another edge case considering store values containing empty array (when adding, then removing all contents of a multi-value field) - so I went for readability in the skipOptionInPreview method. Please re-review.
https://gerrit.wikimedia.org/r/#/c/370642/

T172781 is moving (https://gerrit.wikimedia.org/r/#/c/370965/).
We are not directly binding to a specific version/release of the lib, totally depend on what MW is doing in this regard, so we probably will not be able to profit from these changes just yet...
@gabriel-wmde Which versions of MW do we actually strive to support (thinking LTS)?

@Pablo-WMDE Reviewed and merged your patch, thank you.

@Lea_WMDE @Charlie_WMDE: Currently, in fields that can contain multiple terms (templates, "OR", "excactly this text", etc) the terms are separated with a space. In case you want a different separation (commas, braces, etc), please open a new issue for that.

but the mock shows a comma for multiple entries :/

Ok, we'll fix that without a separate issue.

Pablo-WMDE claimed this task.
Pablo-WMDE moved this task from Todo to Doing on the WMDE-Fundraising-Sprint-8 board.
Pablo-WMDE added a comment.EditedTue, Aug 15, 2:53 PM

Added another patch set. https://gerrit.wikimedia.org/r/#/c/371072/

  • using file dimension comparator symbol instead of (long string literal)
  • Separated test method for scalar, array, file dimension preview

The rest works for me.

gabriel-wmde removed gabriel-wmde as the assignee of this task.

T172781 is finished. T173009 will tell, if/when we can incorporate it...