Page MenuHomePhabricator

[WtC-M2] Replace WiKit tokens used in MSMF's Sass files
Closed, ResolvedPublic3 Estimated Story Points

Description

Problem

The Mismatch Finder's user interface was styled using WiKit tokens. With the WiKit design system being superseded by Codex, the official Wikimedia design system. The utilization of WiKit tokens is not recommended, and they should be replaced in order to reduce maintenance costs and ensure consistency.

Solution

We have to replace all WiKit tokens used to style the Mismatch Finder app.
This task focuses on the replacement of the deprecated tokens used in the project's Sass files:

To support the replacement, here's a WiKit to Codex tokens mapping. You can find the WiKit tokens matched with their corresponding Codex token.

Considerations
  • The noscript.scss file is excluded because it already uses Codex tokens. Although it contains custom variables used for spacing that will have to be replaced (see T350189)
  • Any WiKit component tokens used individually in the file will need to also be replaced by an equivalent Codex token.
  • Typographic styles are currently defined in the MSMF app.scss file, including mixins from _typography.scss under each relevant selector. The assumption is that we'll replace the values in said mixins by the relevant Codex tokens in each case, and create any missing styles (see specs for more details).
  • The current body style will be replaced by Body M. A new Body S style will be used to define the smaller text within the MSMF footer (see specs for more details).
  • Components shouldn't inherit Body M. They need to display a smaller line-height. Their font style should be UI text M. To be decided whether the style needs to be internally specified within them, or applied globally.
Acceptance criteria
  • All the WiKit tokens used in the MSMF Sass files are replaced by their Codex equivalent

Event Timeline

Sarai-WMDE renamed this task from [WtC-M2] Replace WiKit tokens used in MSMF Sass files to [WtC-M2] Replace WiKit tokens used in MSMF's Sass files.Nov 29 2023, 3:26 PM
Sarai-WMDE created this task.
Sarai-WMDE moved this task from Incoming to UX Backlog on the Wikidata Dev Team board.
Sarai-WMDE updated the task description. (Show Details)
noarave set the point value for this task to 3.
noarave moved this task from Backlog to Doing on the Wikidata Dev Team (Quality Tools "Sprint") board.

For a reason still unclear to me, the font family token of the body mixin (body-M) is breaking text alignment on several places (mostly buttons and links)

example 1

image.png (44×197 px, 2 KB)

example 2

image.png (51×242 px, 3 KB)

Hey Noa! Thanks so much for rising this and confirming the following: there's an extra font style needed, UI text M. We should create and apply it to the components that don't have internal font modifiers (e.g. Dialog) to prevent them from inheriting the body M style and breaking like in your screenshots.
I'll add this point to the "Considerations" section in the task description and update the Figma specs accordingly. I'll also add a quick view below for simplicity. Thanks again!

Font styleUse case exampleSpecifications
UI text M
Screenshot 2024-01-04 at 10.21.00.png (276×334 px, 14 KB)
Text within components such as buttons
Screenshot 2024-01-04 at 10.34.46.png (918×2 px, 129 KB)

Adding this here as we've noted the issue first on this task.
Explanations and a possible workaround for the icon/text misalignment issue on codex buttons:
https://github.com/wmde/wikidata-mismatch-finder/pull/837

Thanks for the changes! There's only one low priority fix to make in relation to this task. It introduced a bug in the MSMF Store that was already identified during code review: there's a default outline applied via the .button class. We should include outline: @outline-base--focus; in the &:focus pseudo-class to remove it.

All looking good! Thanks for the changes