Page MenuHomePhabricator

[REQUEST] Font modes: Integrate Codex font modes into Vector 2022
Closed, ResolvedPublic0 Estimated Story Points

Description

What teams or group is this for?

Design System Team

Who is your main point of contact and contact preference?

Eng: @AnneT, Design: @DTorsani-WMF, PM: @CCiufo-WMF

What are the details of your request? Include relevant timelines or deadlines

In our upcoming Codex 2.0 release, we will include font modes, which are a set of typographic scales meant to enable the skins to use scales consistent with the design system and to ensure that Codex components look ideal at different base font sizes. Including font modes in Codex is just the first step - the next step will be to actually use the font modes in the skins.

For Vector, this means updating CSSCustomProperties.less to use the font mode mixins provided by Codex to set various font-related design tokens at the small, standard, and large text sizes. This will replace the code that currently sets the --font-size-medium and --line-height-medium CSS custom properties for the different font size client preferences.

Once all of the font-size, line-height, and size-icon token scale with client's preferred text size, any part of the UI that uses these tokens will also scale. This is beneficial to parts of the UI that use Codex components (like QuickSurveys, message boxes, and WikiFunctions pages) because the components will scale perfectly as we designed them to at the different text sizes. However, this also means that parts of the UI that we don't intend to scale yet will start to scale. This includes the entire header and sidebars - see this patchdemo. To maintain the status quo in which content scales but the "chrome" does not, we will need to update the code to ensure that text scaling only affects the intended areas.

Codex 2.0.0-rc1 will be released on 2025-04-29 and ride the train the following week. There is no required timeline for integrating font modes into Vector 2022. However, doing so will resolve inconsistencies caused by scaling some tokens but not others, and allow us to remove workarounds such as those done as part of T391890. Integrating font modes into Vector 2022 will also resolve the parent tasks of the [[ T363845 | typographic scale epic ]], fixing long-standing inconsistencies with typography styles.

How does the request fit within the departmental or foundation priorities?

As mentioned above:

  • Using Codex font modes in the skins will mean we're using one consistent typographic scale.
  • It will mean Codex components scale perfectly at different font sizes.
  • It will resolve long-standing issues (parent tasks of T363845).
  • It will enable us to remove hard-coded values and overridden CSS custom properties from Vector.

Is this request urgent or time sensitive?

Not terribly. We'd like to at least discuss pursuing this in the next month or so, but it does not have to get done at a specific time. The main motivations are improved UX and reduction of technical debt.

Event Timeline

Jdlrobson-WMF changed the task status from Open to In Progress.Apr 23 2025, 7:12 AM
Jdlrobson-WMF triaged this task as High priority.
Jdlrobson-WMF moved this task from Incoming to Sprint Backlog on the Web-Team board.
Jdlrobson-WMF moved this task from Sprint Backlog to Q4 on the Web-Team board.

Not terribly. We'd like to at least discuss pursuing this in the next month or so, but it does not have to get done at a specific time. The main motivations are improved UX and reduction of technical debt.

@AnneT is this request to get feedback or simply be informed of what's happening? Do we want to arrange this conversation in the next 3 weeks to set this up?

@Jdlrobson I think we should set up a conversation in the next few weeks to discuss when and how we might complete this task. I'm happy to do that if you let me know who from the Web site to include.

Thanks @AnneT I'm out most of this week but will be back next week.
@bwang myself and @Jdrewniak (optional) is probably enough from the web side for now.

Jdlrobson-WMF set the point value for this task to 1.
Jdlrobson-WMF changed the point value for this task from 1 to 0.May 7 2025, 7:58 PM

Scheduled for Thu 8 May 2025

Jan just needs to look through the changes here before resolving.

We chatted about this and our understanding is that DST will let us know when they need to talk about this more e.g. work on { T393739}