Page MenuHomePhabricator

Use Codex link styles in Minerva
Closed, ResolvedPublic3 Estimated Story Points

Description

Background

Similar to the approach in Vector in https://phabricator.wikimedia.org/T366515, we want to use the codex link mixin in Minerva

User story

  • As a mobile user I want the link styles to be consistent with wikimedia experiences

Requirements

  • There should be no visual change to unvisited links
  • There should be no visual change to self links
  • There should be no visual change to external links
  • There should be no visual change to focused links
  • There should be no visual change to red links
  • There should be no visual change to hovered linked
  • There should be no visual change to visited links
  • There shouldn't be a large increase in bundlesize with this change.
  • There should be no visual changes with this change
  • The following custom link variables are removed and favor of codex styles
@color-link
@color-link--visited
@color-link--active
@color-link-new
@color-link-new--visited
@color-link-external
@color-link-external--visited
@color-link-external--active
  • Reevaluate the need for 'content-links' module

Design

  • considering minerva is already using codex variables, there should be no visual changes

Communication criteria - does this need an announcement or discussion?

  • no

Derived Requirement

Ensure that link styles in the Minerva skin are consistent with Wikimedia experiences by using the Codex link mixin. There should be no visual changes to any type of links, and custom link variables should be removed in favor of Codex styles without significantly increasing the bundle size.

BDD

Feature: Consistent link styles in Minerva using Codex link mixin

Scenario: Ensure link styles in Minerva are consistent and unchanged after applying Codex link mixin

Given the user is browsing in the Minerva skin
When the Codex link mixin is applied
Then there should be no visual change to unvisited links
And there should be no visual change to self-links
And there should be no visual change to external links
And there should be no visual change to focused links
And there should be no visual change to red links
And there should be no visual change to hovered links
And there should be no visual change to visited links
And the bundle size increase should be minimal
Test Steps

Test Case 1: Ensure no visual changes to link styles in Minerva after applying Codex link mixin

Browse a page using the Minerva skin.
Observe the unvisited links.
AC1: Confirm that there is no visual change to unvisited links.
Observe the self-links.
AC2: Confirm that there is no visual change to self-links.
Observe external links.
AC3: Confirm that there is no visual change to external links.
Focus on a link.
AC4: Confirm that there is no visual change to focused links.
Observe red links.
AC5:* Confirm that there is no visual change to red links.
Hover over a link.
AC6: Confirm that there is no visual change to hovered links.
Visit a link and observe the visited link color.
AC7:** Confirm that there is no visual change to visited links.
Test Case 2: Ensure there is no significant increase in bundle size after the Codex link mixin is applied

Check the bundle size before and after applying the Codex link mixin.
AC8: Confirm that the bundle size increase is minimal.
Test Case 3: Ensure that custom link variables are removed in favor of Codex styles

Review the stylesheet.
AC9: Confirm that the following custom link variables are removed:
@color-link
@color-link--visited
@color-link--active
@color-link-new
@color-link-new--visited
@color-link-external
@color-link-external--visited
@color-link-external--active

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Jdlrobson changed the task status from Stalled to Open.Sep 5 2024, 5:46 PM
Jdlrobson removed Jdrewniak as the assignee of this task.
Jdlrobson added a subscriber: Jdrewniak.
Jdlrobson updated the task description. (Show Details)

Change #1073500 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/MinervaNeue@master] WIP: Use codex link mixin inside Minerva

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

Change #1073500 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Use codex link mixin inside Minerva

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

Change #1073892 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/MinervaNeue@master] Fixes styles of Minerva tabs in visited/active states

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

SToyofuku-WMF raised the priority of this task from Medium to High.

Change #1073892 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Fixes styles of Minerva tabs in visited/active states

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

GMikesell-WMF updated Other Assignee, added: Edtadros.
GMikesell-WMF updated the task description. (Show Details)
GMikesell-WMF added a subscriber: Edtadros.

Yep - this was caught by Pixel, but due to some Codex changes to border color this was not obvious from the diff:

image.png (1,680×900 px, 47 KB)

Change #1075602 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/MinervaNeue@master] Fixes last modified colors

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

Change #1075602 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Fixes last modified colors

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

Change #1077769 had a related patch set uploaded (by Jdlrobson; author: Jdrewniak):

[mediawiki/skins/MinervaNeue@master] Use :where() for link styling

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

Test Result - Beta

Status: ✅ PASS / ❓Need More Info
Environment: Beta
OS: macOS
Browser: Chrome
Device: MS
Emulated Device: NA

Test Artifact(s):

Test Steps

Test Case 1: Ensure no visual changes to link styles in Minerva after applying Codex link mixin

Browse a page using the Minerva skin.
Observe the unvisited links.
✅AC1: Confirm that there is no visual change to unvisited links.

screenshot 33.png (820×783 px, 84 KB)
screenshot 34.png (820×783 px, 85 KB)

Observe the self-links.
✅AC2: Confirm that there is no visual change to self-links.
See AC1

Observe external links.
✅AC3: Confirm that there is no visual change to external links.
See AC1

✅Focus on a link.
AC4: Confirm that there is no visual change to focused links.

screenshot 20.mov.gif (820×782 px, 373 KB)
screenshot 21.mov.gif (820×782 px, 336 KB)

Observe red links.
✅**AC5:* Confirm that there is no visual change to red links.
See AC1

Hover over a link.
✅ AC6: Confirm that there is no visual change to hovered links.
There is a very subtle color change as there was previously

screenshot 22.mov.gif (820×782 px, 275 KB)
screenshot 23.mov.gif (820×782 px, 316 KB)

✅ Visit a link and observe the visited link color.
AC7: Confirm that there is no visual change to visited links.

screenshot 26.mov.gif (820×828 px, 655 KB)
screenshot 27.mov.gif (820×800 px, 517 KB)

Test Case 2: Ensure there is no significant increase in bundle size after the Codex link mixin is applied

Check the bundle size before and after applying the Codex link mixin.
❓ AC8:** Confirm that the bundle size increase is minimal.
@Jdlrobson, This looks like something that should have been validated prior to deployment by the dev. If there is a way to test it on our end let me know.

Test Case 3: Ensure that custom link variables are removed in favor of Codex styles

Review the stylesheet.
❓AC9: Confirm that the following custom link variables are removed:
I don't believe this is verifiable by looking at the css output that I can see in the Sources tab. Please confirm if there is a way to verify this.
@color-link
@color-link--visited
@color-link--active
@color-link-new
@color-link-new--visited
@color-link-external
@color-link-external--visited
@color-link-external--active

Thanks @Edtadros you can skip over AC8 and AC9 - these are developer QA - can likely be moved to sign off steps.

Change #1077769 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Use :where() for link styling

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

@Jdlrobson - we're okay to sign off on this one? All the AC look good to me, but I noticed there was a patch that came in after QA.

Jdlrobson claimed this task.

Yep this LGTM! Thanks all!