Page MenuHomePhabricator

[WtC-M3] [QB] Replace WiKit Link component by Codex's
Closed, ResolvedPublic

Description

Problem

The Query Builder's user interface was composed using a combination of Vue 2 custom components and WiKit elements, such as Link. The WiKit design system is now on its deprecation path, as it has been superseded by Codex, the official Wikimedia design system. The utilization of WiKit components is not recommended, and they should be replaced in order to reduce maintenance costs and ensure consistency.

Solution

We have to replace WiKit's Link component and mixins by the Codex equivalent.

Unfortunately, Codex right now provides links as a Less mixin (cdx-mixin-link) that we can't reuse in Sass. The team is not planning to provide a preprocessor independent solution. Our way around this in the previous migration project was to recreate the Link mixin for reusage in our application.

Considerations

Please note that links should display a font-size and line-height that matches that of their surrounding text. For example, links included within the Query Builder's footer should reflect the Body S properties (14px font-size, 22.4 line-height).

Acceptance criteria
  • All WiKit links in the Query Builder UI and components are replaced by their Codex equivalent

Details

Related Changes in Gerrit:

Event Timeline

Sarai-WMDE renamed this task from [SW] [WtC-M3] [QB] Replace WiKit Link component by Codex's to [WtC-M3] [QB] Replace WiKit Link component by Codex's.Apr 10 2024, 12:05 PM
Sarai-WMDE updated the task description. (Show Details)

This task will require design validation. Please ping Charlie Kritschmar whenever the ticket is ready to be reviewed. Thank you!

Change #1068816 had a related patch set uploaded (by Itamar Givon; author: Itamar Givon):

[wikidata/query-builder@master] Use Codex style link mixin

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

@Charlie_WMDE You can validate the design at https://1068816--clicky-sparqly.netlify.app/ Let me know if there are any needed changes.

Thanks @ItamarWMDE

Everything looks great to me except that the focus state seems to be missing/not consistent with codex specification for links.

Could you take a look?

In also just noticed that something seems off about the links in the footer in RTL languages

in persian one link resolves to it's original URL and in hebrew the spacing between the second and third column is off. not sure that has to do with this ticket as it might have been this way before but documenting here just in case.

grafik.png (448×2 px, 110 KB)

grafik.png (448×2 px, 80 KB)

Hey @Charlie_WMDE, sorry that it took me so long to respond, priorities shifted slightly, and then I went on holiday, but now I'm back.

Everything looks great to me except that the focus state seems to be missing/not consistent with codex specification for links.

Thanks! This should now be fixed in the preview branch: https://1068816--clicky-sparqly.netlify.app/

In also just noticed that something seems off about the links in the footer in RTL languages

The Hebrew issue seems to be resolved by resolving T371519: [QB] RTL layout is broken on staging environment, the Farsi issue is weird - might be a translation typo, but it also seems separate to all of these as it exists also in the deployed version of Query Builder: https://query.wikidata.org/querybuilder/?uselang=fa. I filed a separate bug for it at T375112: [QB] Link to Report a Technical Problem is rendered incorrectly in Farsi version.

@ItamarWMDE awesome! looks good to me now and thanks for filing the ticket for the farsi bug! <3

Change #1068816 merged by jenkins-bot:

[wikidata/query-builder@master] Use Codex style link mixin

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