Page MenuHomePhabricator

Cosmetic UX changes for context item
Closed, ResolvedPublic

Assigned To
Authored By
lilients_WMDE
Sep 16 2025, 10:02 AM
Referenced Files
F66713747: image.png
Sep 30 2025, 2:56 PM
F66713743: image.png
Sep 30 2025, 2:56 PM
F66713737: image.png
Sep 30 2025, 2:56 PM
F66713734: image.png
Sep 30 2025, 2:56 PM
F66713698: image.png
Sep 30 2025, 2:36 PM
F66713700: image.png
Sep 30 2025, 2:36 PM
F66713695: image.png
Sep 30 2025, 2:36 PM
F66713693: image.png
Sep 30 2025, 2:36 PM

Description

We have made some cosmetic changes to the ContextItem to make its appearance more clear and 'clean'.

Outcome

After some discussions we agreed on and implemented the following changes:

  • remove the icon from the chip
  • desktop: display the reuse chip below the edit button
  • mobile: keep the position of the chip the same
  • horizontal line between main ref and subref
  • borderless add details button with new icon
desktop
image.png (443×740 px, 44 KB)
image.png (422×744 px, 48 KB)
mobile
image.png (551×598 px, 49 KB)
image.png (551×598 px, 49 KB)

Design specification for the ContextItem UI

mocks in figma file

1. Re-use counter update

These changes affect the Contextitem for all reused references (regardless of whether sub-referencing is active on the project):

  • The re-use counter InfoChip (highlighted with red below) is moved to a new position: on the same line as the Reference title and the 'Edit' button. This is to emphasize to the user that, when clicking the 'Edit' button, they will edit multiple re-uses of this reference at the same time.
  • Next to this, the icon in the re-use counter will be removed to save space and make the contextItem look less cluttered.

image.png (370×522 px, 32 KB)

  • Edge case: when the re-use counter InfoChip does not fit on the top line anymore, it will flow to the next line, right-aligned underneath the 'Edit' button.
    image.png (400×528 px, 38 KB)
2. Details-section design update
  • The ContextItem will now contain a dividing line between the main reference content and the sub-reference content:
    image.png (410×562 px, 35 KB)
    Note that it does not go to the outer edge of the contextItem, but has the same padding from the edge as the other content inside the ContextItem. The color token used for this divider is: border-color-subtle (see Codex color token documentation)

In the cases where sub-referencing is enabled on a project, for each re-used reference that does not contain a sub-reference yet:

  • The 'Add details' button has been changed to a 'quiet' (weight="quiet") button with an icon. The icon used is 'cdxIconAdd' (see list of Codex Icons). This button is left-aligned with the same padding as the rest of the content of the ContextItem, but because it is a quiet button, it will look like the button is indented to users:
    image.png (370×544 px, 33 KB)
    When hovered and active, the button will look like this:
    image.png (444×1 px, 67 KB)
    background-color-interactive-subtle--hover (EAECF0 or color.gray100) and background-color-interactive-subtle--active (#dadde3 or color.gray200)

In the cases where the ContextItem contains a sub-reference:

  • The spacing between the subref-content and the subref-edit-button should use existing spacing tokens/conventions, but should be smaller than the spacing between the divider and this section, following Gestalt theory's 'proximity' principle:
    image.png (404×1 px, 64 KB)
  • The subref-content should have a slight indentation that is similar to the optical indentation of the 'Add details' button for continuity/consistency:
    image.png (596×656 px, 52 KB)

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Some thoughts after dev discussion: This can be done in a few smaller iterations:

  • Apply CSS user-select: none to the reuse badge so that it can't be accidentally included in the selection.
  • Move the reuse badge to the right-hand side below the action button.
  • Then we can experiment with more precision CSS which places the badge in the top row when it can be fit alongside the reference type label.

Change #1190257 had a related patch set uploaded (by Svantje Lilienthal; author: Svantje Lilienthal):

[mediawiki/extensions/Cite@master] WIP change reuse warning chip

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

Change #1190398 had a related patch set uploaded (by Mareike Heuer; author: Mareike Heuer):

[mediawiki/extensions/Cite@master] UX changes for reference context item

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

Turns out, that adding the chip to the header was no problem. I think it actually looks good, also for the edge case:

image.png (230×521 px, 24 KB)

@ElineWMDE what do you think, can we leave as is for now?

Update: Actually the german version does not look so good:
desktop:

image.png (312×732 px, 38 KB)

mobile:
image.png (601×594 px, 73 KB)

Patchdemo: https://2bd385e8ae.catalyst.wmcloud.org/w/index.php?title=Hauptseite&veaction=edit

We could ask for a shorter string for the reused chip, but that feels strange. Maybe we should go with the other approach per default, to always display the chip below the edit button:
desktop:

image.png (380×731 px, 55 KB)

mobile:
image.png (601×594 px, 73 KB)

Patchdemo: https://9a196aac3b.catalyst.wmcloud.org/w/index.php?title=Hauptseite&veaction=edit

Also @ElineWMDE the icon only edit button should get a title text that can show up when hovering and would also help screen reader users. I guess something like Edit details?

Also, here's a screenshot with the blue dot

image.png (104×485 px, 3 KB)

image.png (104×485 px, 4 KB)

Change #1191397 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[VisualEditor/VisualEditor@master] Fix incomplete word-wrapping in ve.ui.LinearContextItem

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

Change #1191415 had a related patch set uploaded (by Svantje Lilienthal; author: Svantje Lilienthal):

[mediawiki/extensions/Cite@master] Move reused chip below the edit button

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

Test wiki created on Patch demo by Svantje Lilienthal (WMDE) using patch(es) linked to this task:
https://8760c253a4.catalyst.wmcloud.org/wiki/Main Page

Test wiki on Patch demo by Svantje Lilienthal (WMDE) using patch(es) linked to this task was deleted:

https://8760c253a4.catalyst.wmcloud.org/w/

Test wiki created on Patch demo by Svantje Lilienthal (WMDE) using patch(es) linked to this task:
https://9a196aac3b.catalyst.wmcloud.org/w/

Test wiki created on Patch demo by Svantje Lilienthal (WMDE) using patch(es) linked to this task:
https://2bd385e8ae.catalyst.wmcloud.org/w/

Change #1191397 merged by jenkins-bot:

[VisualEditor/VisualEditor@master] Fix incomplete word-wrapping in ve.ui.LinearContextItem

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

We could ask for a shorter string for the reused chip, but that feels strange. Maybe we should go with the other approach per default, to always display the chip below the edit button:
desktop:

image.png (380×731 px, 55 KB)

mobile:
image.png (601×594 px, 73 KB)

Patchdemo: https://9a196aac3b.catalyst.wmcloud.org/w/index.php?title=Hauptseite&veaction=edit

Hi, yes, why is the German version behaving differently? As soon as there is overflow on the top line, the re-use chip should move below the 'Edit' button as in this last example. So the earlier screenshots you showed, where there is overflow within the chip but it does not move to the line below, should never happen.
In the PatchDemo you included, the content of the reference is somehow wrapped with the infoChip:

image.png (606×846 px, 124 KB)
can this be fixed to keep the normal amount of padding between the header and the content? The Chip is still part of the header, even if it moves to the next line.

Also, the padding within the InfoChip seem off, this is the codex design: https://doc.wikimedia.org/codex/main/components/demos/info-chip.html

image.png (262×632 px, 24 KB)
where there is 6px padding on the left and right sides, and 0 top and bottom. The current implementation seems to have 8 on the sides and 4 on the top and bottom:
image.png (282×660 px, 25 KB)

Thanks for including the mobile design! I think I need to make a different approach for mobile, it doesn't work well like this: the relationship between the 'edit' (pencil) icon and the reference now gets a bit lost because of the chip in between. Would it be difficult to place the chip differently for mobile only? For example stuck to the bottom of the ref content?

After talking about this, we have some todos:

WMDE-Fisch renamed this task from Cosmetic UX changes for edit dialog to Cosmetic UX changes for context item.Sep 30 2025, 9:06 AM

Change #1190398 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] UX changes for reference context item

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

Change #1190257 abandoned by WMDE-Fisch:

[mediawiki/extensions/Cite@master] Change reuse warning chip to show up in the header

Reason:

Will work on I5e69449fbd57eb68a5042ffd16430f350b1da422 instead

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

Change #1192847 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/Cite@master] Fix inconsistent view/edit icon for subrefs

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

Test wiki created on Patch demo by Svantje Lilienthal (WMDE) using patch(es) linked to this task:
https://8c01e56746.catalyst.wmcloud.org/w/

Change #1193012 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/Cite@master] Replace fragile "mobile" with Minerva skin targetting

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

Change #1191415 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Move reuse warning below the edit button

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

Change #1193022 had a related patch set uploaded (by Awight; author: Mareike Heuer):

[mediawiki/extensions/Cite@wmf/1.45.0-wmf.21] UX changes for reference context item

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

Change #1193022 merged by jenkins-bot:

[mediawiki/extensions/Cite@wmf/1.45.0-wmf.21] UX changes for reference context item

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

Mentioned in SAL (#wikimedia-operations) [2025-10-02T08:34:11Z] <awight@deploy2002> awight, hashar: Backport for [[gerrit:1193024|Revert "Enable Wikifunctions client mode on Wiktionaries, Part III, and Incubator" (T406185 T397401 T401682)]], [[gerrit:1193022|UX changes for reference context item (T404690)]], [[gerrit:1193009|Nasty fix for main ref change in main+details (T406002)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verif

Mentioned in SAL (#wikimedia-operations) [2025-10-02T08:55:30Z] <awight@deploy2002> Finished scap sync-world: Backport for [[gerrit:1193024|Revert "Enable Wikifunctions client mode on Wiktionaries, Part III, and Incubator" (T406185 T397401 T401682)]], [[gerrit:1193022|UX changes for reference context item (T404690)]], [[gerrit:1193009|Nasty fix for main ref change in main+details (T406002)]] (duration: 48m 54s)

Change #1193012 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Replace fragile "mobile" with Minerva skin targetting

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

Change #1193184 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (8b1b8b872)

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

Change #1193184 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (8b1b8b872)

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

Change #1192847 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Fix inconsistent view/edit icon for subrefs

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

Tobi_WMDE_SW claimed this task.

Test wiki on [[ | Patch demo ]] by Svantje Lilienthal (WMDE) using patch(es) linked to this task was deleted:

https://8c01e56746.catalyst.wmcloud.org/w/

Test wiki on [[ | Patch demo ]] by Svantje Lilienthal (WMDE) using patch(es) linked to this task was deleted:

https://2bd385e8ae.catalyst.wmcloud.org/w/

Test wiki on [[ | Patch demo ]] by Svantje Lilienthal (WMDE) using patch(es) linked to this task was deleted:

https://9a196aac3b.catalyst.wmcloud.org/w/

Test wiki on Patch demo by Svantje Lilienthal (WMDE) using patch(es) linked to this task was deleted:

https://2bd385e8ae.catalyst.wmcloud.org/w/

Test wiki on Patch demo by Svantje Lilienthal (WMDE) using patch(es) linked to this task was deleted:

https://8c01e56746.catalyst.wmcloud.org/w/

Test wiki on Patch demo by Svantje Lilienthal (WMDE) using patch(es) linked to this task was deleted:

https://9a196aac3b.catalyst.wmcloud.org/w/