Page MenuHomePhabricator

EditCheck: Improve interactions
Open, Needs TriagePublic

Description

Background

Currently, interactions with Edit Checks feel static, which impacts the user experience. To improve usability, the process needs to become more interactive by addressing the following areas:

  • Interactive states: Clearly define and visually differentiate default, hover, active (pressed), and disabled states for both Edit Checks and highlighted text.
  • Loading state: define how the loading will look like
  • Text-Edit Check relationship: Establish a clearer connection between highlighted text and its corresponding Edit Check card, for example by using different colors for hover/active states on both text and cards.

Design proposal

Interaction states
Captura de pantalla 2025-10-06 a las 16.38.50.png (542ร—1 px, 186 KB)
Captura de pantalla 2025-10-06 a las 16.37.32.png (472ร—1 px, 32 KB)
Edit Check cardHighlighted text

The following states have been defined:

  • Edit Check card:
    • Unselected / Collapsed
      • Default
      • Unselected Hover
      • Unselected Active
      • Unselected Focus
    • Selected / Expanded
      • Hover
      • Active
      • Disabled (this state will be used when the user is interacting with some of the buttons in the card, so disabled will be used just when the card is selected/expanded)
      • Loading (loading will be reflected just in the selected/expanded card)
    • Completed
  • Highlighted text: For now, these will be the states represented in the highlighted text. Other states could be included in the future if needed (e.g. an "editing text" state)
    • Default / Unselected: background-color-interactive-subtle
    • Hover: background-color-warning-subtle
    • Active / Selected: background-color-warning-subtle
    • Revising: Blue borders to use when revising/updating the text (as implemented in T397984)
Edit Check + Highlighted text behavior

image.png (2ร—2 px, 555 KB)

The Edit Check card and highlighted text will be synchronized. This means that when the Edit Check is not selected, both the card and highlighted text will appear gray to indicate unselection. They will change to yellow (warnings) or red (errors) when the Edit Check (either the card or the highlighted text) is hovered, pressed, or selected.

image.png (1ร—4 px, 2 MB)

Touchable screens (Tablet/Mobile)
  • The trigger icon will use the status color (e.g. warning, progressive) of each type of check/suggestion in wither unselected and selected states.
Captura de pantalla 2026-02-10 a las 11.47.03.png (1ร—718 px, 171 KB)
image.png (1ร—728 px, 174 KB)
image.png (1ร—728 px, 167 KB)
Current behaviorExpected behavior

Open questions

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

Acceptance criteria (or Done)

Design

  • Define interactive states for both Edit Checks and highlighted text
  • Clearly indicate visual connection between the highlighted text and its corresponding Edit Check card

Implementation

  • Implement the different states proposed

Future tasks

Event Timeline

Restricted Application added a subscriber: Aklapper. ยท View Herald TranscriptMay 19 2025, 5:22 PM
bmartinezcalvo renamed this task from EditCheck: Review interactions to EditCheck: Improve interactions.May 19 2025, 5:23 PM
bmartinezcalvo updated the task description. (Show Details)
bmartinezcalvo updated the task description. (Show Details)
nayoub edited projects, added Editing-team (Kanban Board); removed Editing-team.
nayoub moved this task from Inbox to Doing on the Editing-team (Kanban Board) board.

@bmartinezcalvo It appears that you want to use the new tokens outlined in T397327: Create new border-color tokens for warning status as backgrounds behind text where links may be present, all possible text/link colors won't be accessible/have enough color contrast from the interactive state backgrounds without darkening the text/link colors as well, which I imagine wouldn't be possible. I wonder if there are other design solutions to improve the interaction design for Edit Check. I have some ideas and would be happy to jam with you on them, but the solution as you've laid out here would introduce inaccessible patterns.

As decided yesterday in a team's meeting, we will go for now with the background-color-warning-subtle (yellow-50) to avoid accessibility issues with links. We will explore other solutions to increase the highlighted text contrast on the page's background in T399294.

I've updated the design proposal in this task to reflect these decisions.

Disabled feels like overkill -- it's too low-contrast to be easily readable to my eyes, and it's specified to be used in places when someone might still want to refer to the contents of the card. E.g. in add-reference, the card still contains the explanation for why you should add a citation.

El T394713#11021615, @DLynch escribiรณ:

Disabled feels like overkill -- it's too low-contrast to be easily readable to my eyes, and it's specified to be used in places when someone might still want to refer to the contents of the card. E.g. in add-reference, the card still contains the explanation for why you should add a citation.

Disabled elements are not required to meet AA contrast standards, and the current contrast follows the same approach used across other disabled elements. If we introduce a collapsed disabled state in the future, it would follow this same color approach. For consistency, I recommend using the existing color tokens applied to other disabled components.

I suppose I could rephrase my position to "that shouldn't be disabled", if we have to use those colors.

I shall move this over to the appropriate ticket rather than commenting on the parent here. :)

The new border-color-warning tokens have been released in Codex T397327 so we can start using them for the different states of Edit Check card.

I mentioned this over in T404604#11233971, but I don't think we can implement the notice-level highlight as specified here. It's visually almost identical to how selections look in text, and that's going to be confusing. We need something that isn't blue.

El T394713#11246117, @DLynch escribiรณ:

I mentioned this over in T404604#11233971, but I don't think we can implement the notice-level highlight as specified here. It's visually almost identical to how selections look in text, and that's going to be confusing. We need something that isn't blue.

In T406468: Update Blue50 color token in Codex, the blue has been updated to improve contrast on white backgrounds and also to create better distinction between background-color-interactive-subtle (unselected highlight) and background-color-progressive-subtle (selected highlight for suggestions).

Grabaciondepantalla2025-10-06alas12.03.34-ezgif.com-video-to-gif-converter.gif (443ร—800 px, 1 MB)

I'm sorry, but in that animation I cannot see any difference between that highlight and normal text-selection. If anything, T406468 has made it more identical to text-selection than it used to be.

El T394713#11246375, @DLynch escribiรณ:

I'm sorry, but in that animation I cannot see any difference between that highlight and normal text-selection. If anything, T406468 has made it more identical to text-selection than it used to be.

I understand your concern, but I still think the blue works for Suggestions. While the color similarity with text-selection is noticeable, the two states remain visually distinguishable because the Suggestions highlight includes the left rail and line-by-line highlighting โ€” both clear differentiators that the selection highlight doesnโ€™t have.

image.png (1ร—2 px, 1 MB)
image.png (1ร—2 px, 1 MB)
Differences between highlighted suggestion and text selectionText being selected on a suggestion

Also, although the contrast between the Suggestions highlight and the text-selection blue is low (1.29:1), the contrast between the yellow Checks highlight and the text-selection blue is almost the same (1.35:1). So, by that logic, no highlight color would meet the contrast requirement to remain visually distinct from text selection.

While the color similarity with text-selection is noticeable, the two states remain visually distinguishable because the Suggestions highlight includes the left rail and line-by-line highlighting โ€” both clear differentiators that the selection highlight doesnโ€™t have.

I do agree that they're distinguishable when viewed side-by-side or by someone who knows the product well, but I don't think we can expect a random user to be able to look at the screen like this and tell whether they have text selected or not. It'll create confusing behavior when someone activates a suggestion, because it's going to look like we just selected all the related text and they'll expect regular text-is-selected behavior (replacing it all when you start typing, etc).

The interaction states described in this task have been already implemented in T404604.

We will need to fix only the mobile version, where the trigger icon is currently black when unselected, while it should use the status color (e.g. warning, progressive) of each type of check/suggestion.

Captura de pantalla 2026-02-10 a las 11.47.03.png (1ร—718 px, 171 KB)
image.png (1ร—728 px, 174 KB)
Current behaviorExpected behavior

@bmartinezcalvo Should there be any visible distinction between the focused action-group and unfocused ones, or are they visually identical?

Change #1238393 had a related patch set uploaded (by DLynch; author: DLynch):

[mediawiki/extensions/VisualEditor@master] EditCheckGutterSectionWidget: icons should get flags regardless of focus

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

El T394713#11602974, @DLynch escribiรณ:

@bmartinezcalvo Should there be any visible distinction between the focused action-group and unfocused ones, or are they visually identical?

As commented in our chat internally, the difference between the unselected and selected elements (either individual or groups) would be the highlighted text:

  • unselected: gray
  • selected: yellow/blue

We will need to improve in some moment the contrast of highlighted text in T399294.

Change #1238393 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] EditCheckGutterSectionWidget: icons should get flags regardless of focus

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