Page MenuHomePhabricator

Design Suggestion "card" component MVP
Open, HighPublic

Description

This task involves the work of designing the MVP for the Suggestion "card" component.

At a minimum, the design patterns we converge on in this task will need to:

  1. Support the Suggestions we come to define in T402242
  2. Adapt to support the Suggestions powered by the methods we are investigating in T404220

Story

As a newcomer, when I am within the visual editor and an edit suggestion is surfaced to me, I want the suggestion to be presented in a clear, non-intrusive, and trustworthy way, so that I can quickly understand a) the action(s) being presented to me are optional, b) what action(s) I am being asked to consider taking, and c) why I might consider taking this action(s), and ultimately, decide what – if any action – to take (e.g. complete the suggestion, dismiss/decline it (T401739, T404606))

NOTE: We'll become clear about what moments/action(s) create the potential for someone to see an edit suggestion in T360487. E.g. after tapping the Edit button on article. It might instead (or also) refer to a new, dedicated button within the visual editor.

Design proposal

Suggestions-Card_Desktop.gif (267×500 px, 298 KB)
image.png (1×720 px, 165 KB)
DesktopMobile
  • Suggestion's card:
    • Default (unselected): background-color-base (white), border-color-muted (check the rest of interactive states)
    • Icon: Lightbulb for now
    • Title: Suggestion's title will use Regular text in both collapsed and expanded card (to differentiate from Checks where we use Bold)
      Captura de pantalla 2026-01-07 a las 12.34.59.png (316×2 px, 127 KB)
  • Highlighted text:
    • Default: background-color-interactive-subtle
    • Hover, Active, Selected: background-color-progressive-subtle
      Captura de pantalla 2026-01-07 a las 12.35.12.png (238×1 px, 19 KB)
Mobile
  • Title: it will be Bold in both checks and suggestions.
  • Style: background-color-base (white) in both checks and suggestions
  • Highlighted text: same behavior as on desktop
Multiple checks + suggestions in the same text
  • Desktop: All cards will be displayed in a list, without trying to merge them. That keeps the model consistent and avoids the complexity of deciding when to combine.
  • Mobile: We will use the numbered badge since the space is limited.
    image.png (1×720 px, 170 KB)

Requirements

  • Compliments and makes sense alongside existing Edit Check and Suggested Edit "card" designs
  • Can be effective on both mobile and desktop web
  • Design pattern(s) will accommodate the suggestions the MVP will include (being defined in T402242)

Done

  • Requirements are documented
  • Proposal is documented
  • Proposal is shared with Growth Team (and potentially apps) for review
  • Requirements + Proposal are implemented

Future tasks

Event Timeline

ppelberg updated the task description. (Show Details)
ppelberg updated the task description. (Show Details)

After exploring many different options and discussing them with the team, this is the preferred approach to differentiate between suggestions and edit checks.

image.png (1×2 px, 1 MB)
image.png (1×2 px, 1 MB)
image.png (1×1 px, 347 KB)
DesktopMobile
Card:

Edit Checks:

  • Style: background-color-base (white) and border-color-base
  • Title: Bold
  • Icon: status icon (warning, error)

Suggestions:

  • Style: background-color-progressive-subtle (blue) and border-color-subtle
  • Title: Regular on desktop and Bold on mobile. We considered adding a question mark at the end of each suggestion title, but decided against it as it could cause issues with translations.
  • Icon: TO DECIDE (once decided on icon, we will share in this task. For now, we can use e.g the info icon).

Highlighted text:
  • Default: background-color-interactive-subtle
  • Hover, Active, Selected: it will use the status color
    • Checks: background-color-warning-subtle
    • Suggestions: background-color-progressive-subtle

Mobile
  • Title: it will be Bold in both checks and suggestions.
  • Style:
    • Checks: background-color-base (white)
    • Suggestions: background-color-progressive-subtle (blue)
  • Highlighted text: same behavior as on desktop

Random feedback:

  • Switching to background-color-base for checks makes them feel less "clickable" to me. It also lowers their apparent emphasis -- my eyes are more drawn to the suggestions than to our more-important direct feedback on modifications.
  • How should stacked checks+suggestions in mobile work?
  • The pale blue text-highlight conflicts with normal selections and hover effects, which I think will be confusing. (This is why we didn't use it for the "revising" state in tone check, if you'll recall.)
El T404604#11233971, @DLynch escribió:

Random feedback:

  • Switching to background-color-base for checks makes them feel less "clickable" to me. It also lowers their apparent emphasis -- my eyes are more drawn to the suggestions than to our more-important direct feedback on modifications.

I explored using the background-color-interactive-subtle (gray) for checks (as they are implemented now), but since this gray is too visually similar to the progressive-subtle (blue), it was more difficult to visually differentiate suggestions from checks. For this reason, and to be more aligned with the white bottom sheet on mobile, I would use the white background in checks.

image.png (1×2 px, 1 MB)

In case we use a ToggleButton to show/hide suggestions (as represented in this proposal), the blue of the button will match with the blue of suggestions cards. This visual consistency will make the connection clearer and more evident for users.

  • How should stacked checks+suggestions in mobile work?

I'm exploring this solution. The main check could show a +2 indicator (or other number) in its default/collapsed state when additional suggestions are stacked within that check. Once expanding the check cards, the suggestions would be shown and the user could expand them within the expanded check card.

image.png (745×3 px, 458 KB)

Since this task is to define the suggestions card, should this be covered in this or in another task?

  • The pale blue text-highlight conflicts with normal selections and hover effects, which I think will be confusing. (This is why we didn't use it for the "revising" state in tone check, if you'll recall.)

What do you mean? Why the blue highlighted text conflicts with other hover effects?

For this reason, and to be more aligned with the white bottom sheet on mobile, I would use the white background in checks.

Grey's definitely better to me. If you think it's too similar to the light-blue, how about a particularly-subtle version of the check's icon-color? (i.e. a paler version of the background color used when it's expanded.)

I'm exploring this solution. The main check could show a +2 indicator (or other number) in its default/collapsed state. Then, the suggestions within that check could be shown when expanding the check.

Not what I meant -- I was talking about when multiple checks and suggestions are applied to the same range of the gutter on mobile. Currently there's a numbered badge over the icon, and next/prev buttons inside the card to move between them in the stack.

(Separately I don't think that can work -- stacking them inside the card like that seems extremely confusing. For one thing, your example is strange because pasted content couldn't contain any suggestions since it's 100% modified-content. As a different issue, on mobile making those cards really-tall seems problematic.)

Since this task is to define the suggestions card, should this be covered in this or in another task?

Has to be handled here, I think, since we can't implement it without knowing how this should interact.

What do you mean? Why the blue highlighted text conflicts with other hover effects?

Because they're also pale blue, so it's hard to tell the difference between a selection and a suggestion-highlight.

After reviewing the design proposal with @AAlhazwani-WMF (Growth) and also applying the feedback collected in this task, we will include the following updates in the design proposal:

Card's color

The blue color makes suggestions cards more prominent and clickable than checks, so we will finally use background-color-base (white) for both checks and suggestions. The reason to use white instead gray for the unselected cards is that it looks cleaner when many checks/suggestions are visible in the article, we reuse the Codex Card styles, and there’s no need to visually emphasize interactivity since users will already discover that through cursor interactions improvements being implemented in T394713: EditCheck: Improve interactions.

We will rely on the rest of visual clues to differentiate them (icon, border color, Bold text, and copy if possible).

We will also unify to white in the mobile bottom sheet for both check and suggestions.

Highlighted text

Since the current background-color-progressive-subtle used in the selected suggestions text was not contrasted enough on white background and it was so similar to the background-color-interactive-subtle used in the non-selected highlighted text, I've created T406468: Update Blue50 color token in Codex to increase this contrast. This way, the highlighted text for suggestions will be contrasted enough when selected, same as the warning checks highlighted text (yellow).

Captura de pantalla 2025-10-06 a las 11.58.30.png (765×2 px, 457 KB)

Multiple checks + suggestions in the same text

To avoid confusion by stacking different checks/suggestions within the same card, I've updated the proposal with the following:

  • Desktop: We can keep the current approach and simply display all cards in a list, without trying to merge them. That keeps the model consistent and avoids the complexity of deciding when to combine. We could potentially use more padding (16px) to separate cards that belong to different text blocks and less padding (4px) to separate cards that are related to the same text block.
    Grabaciondepantalla2025-10-06alas12.03.34-ezgif.com-video-to-gif-converter.gif (443×800 px, 1 MB)
  • Mobile: We will use the numbered badge since the space is limited.
    image (15).png (1×1 px, 258 KB)

During the last Editing team meeting, we've agreed to move forward with the design proposal shared above (and documented in the task description). For now, we will implement Suggestions using blue and observe how this works. We will test the color, icon, and other aspects in a separate task.

besides conversations and explorations around visual treatments and styles, i believe that UX copy can play a major role here...

if we frame suggestions as questions, they'll automatically be positioned differently compared to edit checks that use a more direct language. for example...

edit checks

  • revise tone
  • review pasted content

vs

suggestions

  • add a citation?
  • remove external link?

@AAlhazwani-WMF there's a trade-off there, though, because it means that any check that gets contributed will need a second translation for the suggestion-form of its title.

@AAlhazwani-WMF there's a trade-off there, though, because it means that any check that gets contributed will need a second translation for the suggestion-form of its title.

@DLynch i think i'm confused :) so here's the question: could an edit prompt (e.g., revise tone) be both an edit check AND an edit suggestion? i'm asking because i'd thought those were two different domains, meaning that an edit prompt needed to be classified as a check OR as a suggestion.

@AAlhazwani-WMF Yup, they're the same thing. A suggestion is a check that's running on content you didn't modify in your current edit session. You actually used a current check in your suggestions example, because "add a citation" was our first released check.

There's some checks that won't ever show up as suggestions for semantic/technical reasons -- e.g. the pasted content check can't possibly show up as a suggestion, because we can only detect pasted content from the current session and so it'll always be a check.

(We could enforce that some checks/suggestions are only valid in one mode even if they technically could run, but we haven't implemented such a restriction yet for our MVP.)

Hey all, is this still blocked, or do we have enough info to get started on implementation?

Hey all, is this still blocked, or do we have enough info to get started on implementation?

I've updated the task's description with the up to date design. All details are specified to start implementing the Card's component. Later, in other tasks, we will decide how each suggestion behaves. Let me know if you need other details to start implementing this.

Two questions:

  1. I'm seeing the mobile card "banner" as having a white background and the desktop "banner" as having a blue background...what explains this difference?
PlatformCardNotes
Mobile
Screenshot 2026-01-27 at 17.08.22.png (1×864 px, 233 KB)
Desktop
Screenshot 2026-01-27 at 17.08.18.png (520×2 px, 284 KB)
  1. @bmartinezcalvo: would it be accurate for me to think the following...?
    • For now, we're using the 💡 icon for all Suggestions, regardless of type.
    • Later, we can replace the 💡 icon with icons that are more specific to the Suggestion at-hand

Two questions:

  1. I'm seeing the mobile card "banner" as having a white background and the desktop "banner" as having a blue background...what explains this difference?

Yes, as for Checks, we will use the colored background just on the desktop expanded card while we use white bottom sheets on mobile, indicating the blue color just in the bottom sheet's icon.

  1. @bmartinezcalvo: would it be accurate for me to think the following...?
    • For now, we're using the 💡 icon for all Suggestions, regardless of type.
    • Later, we can replace the 💡 icon with icons that are more specific to the Suggestion at-hand

Yes, as we discussed some time ago, we will use a unified icon for all decisions. In case we want to use specific icons for each type of suggestions I recommend creating a separate task to evaluate that change and decide which icons we would use for each suggestion/suggestion's category. In terms of consistency with the lightbulb ToggleButton, I would recommend using the same icon in cards for findability, at least for now.

ppelberg removed ppelberg as the assignee of this task.EditedThu, Jan 29, 12:34 AM

Two questions:

  1. I'm seeing the mobile card "banner" as having a white background and the desktop "banner" as having a blue background...what explains this difference?

Yes, as for Checks, we will use the colored background just on desktop while we use white bottom sheets on mobile, indicating the blue color just in the bottom sheet's icon.

Got it. Sounds good.

  1. @bmartinezcalvo: would it be accurate for me to think the following...?
    • For now, we're using the 💡 icon for all Suggestions, regardless of type.
    • Later, we can replace the 💡 icon with icons that are more specific to the Suggestion at-hand

Yes, as we discussed some time ago, we will use a unified icon for all decisions. In case we want to use specific icons for each type of suggestions I recommend creating a separate task to evaluate that change and decide which icons we would use for each suggestion/suggestion's category. In terms of consistency with the lightbulb ToggleButton, I would recommend using the same icon in cards for findability, at least for now.

All that you described sounds good to me. I've created T415844 where we can consider introducing more nuanced icons.

@Esanders I've reviewed the implementation and here are some things to address to align with the design. Not sure if we need to address them in this task or in T394713: EditCheck: Improve interactions:

  1. active state (pressing) should use border-color-progressive--active
  2. On desktop, the hover and active states are missing when the card is expanded, to indicate that the card can be collapsed if clicked on again. We need to indicate the hover/active in the border of the card as we do when the card is collapsed.
  3. When hovering over the card, the highlighted text should be hovered, indicating that this card is related with that highlighted text

Apart from this, all looks good.

Change #1237485 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/extensions/VisualEditor@master] EditCheckActionWidget: Add hover and active border colours

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

Change #1237480 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/extensions/VisualEditor@master] Add hover state to highlights when action widget is hovered

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

Test wiki created on Patch demo by BMartinezCalvo (WMF) using patch(es) linked to this task:
https://f719abad0f.catalyst.wmcloud.org/w/

Change #1237480 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Add hover state to highlights when action widget is hovered

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

Change #1237485 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] EditCheckActionWidget: Add hover and active border colours

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

@Esanders I've reviewed the updated implementation and it looks good.

We will need to continue working on some improvements for the overall design of Check cards and highlighted text in T394713 and T399294.