Page MenuHomePhabricator

Text in page preview changes to visited color when its article was visited before
Closed, ResolvedPublic2 Estimated Story PointsBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Open an article for example open Tim Berners-Lee article
  • Open a link in that article for example open World Wide Web
  • Return to the anchor article (i.e. return to the article Tim Berners-Lee)
  • Now hover on the Word Wide Web link
  • Move move into the page preview itself so you hare hovering over the summary text.

What happens?:
The summary text color changes to blue.

What should have happened instead?:
No color change is needed when hovering.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
Windows, Chrome, Firefox, Opera, Edge etc.
Confirmed in Firefox and Chrome

Other information (browser name/version, screenshots, etc.):
Here is a screenshot of the problem:

The_problem_of_hovering_Screenshot.png (711×1 px, 541 KB)

Debugging information can be found here:
https://github.com/wikimedia/mediawiki-extensions-Popups?tab=readme-ov-file#debugging

The fix should be a simple case of adding the following rule:

a.mwe-popups-extract:hover {
    color: inherit;
}

to https://github.com/wikimedia/mediawiki-extensions-Popups/blob/07337b540ec152fae8af96a86c03dd83aab44922/src/ui/templates/popup/popup.less#L76

OR
Strengthening the existing .mwe-popups .mwe-popups-extract selector to .mwe-popups a.mwe-popups-extract

Requirement

Ensure that the summary text in page previews does not change color when the linked article has been previously visited. The text should maintain a consistent color regardless of the link’s visited status.

BDD

Feature: Consistent text color in page previews for visited links  
  Scenario: Text color remains unchanged when hovering over a page preview of a visited link  
    Given a user has previously visited an article  
    When the user hovers over the link to that article and moves the cursor into the page preview  
    Then the summary text color in the page preview should remain consistent and not change  

  Scenario: Text color remains unchanged for unvisited links  
    Given a user has not visited an article  
    When the user hovers over the link to that article and moves the cursor into the page preview  
    Then the summary text color in the page preview should remain consistent and not change

Test Steps

Test Case 1: Verify text color does not change for visited links

  1. Open the Tim Berners-Lee article on Wikipedia.
  2. Click on the World Wide Web link to visit that article.
  3. Use the browser’s back button to return to the Tim Berners-Lee article.
  4. Hover over the World Wide Web link to trigger the page preview.
  5. Move the cursor into the page preview, hovering over the summary text.
  6. Confirm that the summary text color does not change.
  7. AC1: The summary text color remains consistent for visited links.

Test Case 2: Verify text color does not change for unvisited links

  1. Open the Tim Berners-Lee article on Wikipedia.
  2. Identify a link to an article that you have not visited before.
  3. Hover over the link to trigger the page preview.
  4. Move the cursor into the page preview, hovering over the summary text.
  5. Confirm that the summary text color does not change.
  6. AC2: The summary text color remains consistent for unvisited links.

QA Results - Beta

ACStatusDetails
1T382142#10537542
2T382142#10537542

QA Results - Prod

ACStatusDetails
1T382142#10542514
2T382142#10542514

Details

Related Changes in Gerrit:

Event Timeline

Aklapper renamed this task from Unnecessary color change in the case of hovering to Text in page preview changes when its article was visited before.Dec 14 2024, 5:03 PM
Aklapper added a project: Page-Previews.

Hi, is the file visible now?

Try yourself in a private browser window. :) Yes, it does - thanks!

Jdlrobson changed the task status from Open to Stalled.Jan 2 2025, 4:54 PM
Jdlrobson subscribed.

I can't seem to replicate this issue.

Are you still experiencing this issue? If so, could you check if a gadget or user style is interfering?

Aklapper changed the task status from Stalled to Open.Jan 15 2025, 8:58 AM

I can reproduce this on https://en.wikipedia.org/wiki/Tim_Berners-Lee?safemode=1&usedebug=true using Firefox 134, hovering over "World Wide Web" and then hovering over the popup extract text, after having visited the "World Wide Web" page.
I'd assume that this might be involved:

a:where(:not([role='button'])):visited:hover {
  color:var(--color-visited--hover,#534fa3)
}
Aklapper renamed this task from Text in page preview changes when its article was visited before to Text in page preview changes to visited color when its article was visited before.Jan 15 2025, 8:58 AM
Jdlrobson-WMF changed the task status from Open to In Progress.Jan 21 2025, 7:39 PM
Jdlrobson-WMF subscribed.

Seems like an easy to fix bug that is impacting users.

Jdlrobson-WMF set the point value for this task to 2.Jan 21 2025, 9:37 PM

Per team estimation (4 votes seems sufficient)

ovasileva lowered the priority of this task from High to Medium.Feb 3 2025, 7:00 PM
SToyofuku-WMF subscribed.

Picking up as nothing higher priority is available, but will put down to support A/B test as needed

Change #1118197 had a related patch set uploaded (by Stoyofuku-wmf; author: Stoyofuku-wmf):

[mediawiki/extensions/Popups@master] Fix visited link color

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

Change #1118197 merged by jenkins-bot:

[mediawiki/extensions/Popups@master] Fix visited link color

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

Status: ✅ PASS
Environment: Beta
OS: macOS
Browser: Chrome
Device: MS

Test Case 1: Verify text color does not change for visited links

  1. Open the Tim Berners-Lee article on Wikipedia.
  2. Click on the World Wide Web link to visit that article.
  3. Use the browser’s back button to return to the Tim Berners-Lee article.
  4. Hover over the World Wide Web link to trigger the page preview.
  5. Move the cursor into the page preview, hovering over the summary text.
  6. Confirm that the summary text color does not change.
  7. ✅ AC1: The summary text color remains consistent for visited links.

screenshot 101.mov.gif (1×1 px, 1 MB)

Test Case 2: Verify text color does not change for unvisited links

  1. Open the Tim Berners-Lee article on Wikipedia.
  2. Identify a link to an article that you have not visited before.
  3. Hover over the link to trigger the page preview.
  4. Move the cursor into the page preview, hovering over the summary text.
  5. Confirm that the summary text color does not change.
  6. ✅ AC2: The summary text color remains consistent for unvisited links.

See AC1

Edtadros updated the task description. (Show Details)
Edtadros updated the task description. (Show Details)
Edtadros subscribed.

Status: ✅ PASS
Environment: testwiki
OS: macOS
Browser: Chrome
Device: MS

Test Case 1: Verify text color does not change for visited links

  1. Open the Tim Berners-Lee article on Wikipedia.
  2. Click on the World Wide Web link to visit that article.
  3. Use the browser’s back button to return to the Tim Berners-Lee article.
  4. Hover over the World Wide Web link to trigger the page preview.
  5. Move the cursor into the page preview, hovering over the summary text.
  6. Confirm that the summary text color does not change.
  7. ✅ AC1: The summary text color remains consistent for visited links.

screenshot 1.mov.gif (1×1 px, 2 MB)

Test Case 2: Verify text color does not change for unvisited links

  1. Open the Tim Berners-Lee article on Wikipedia.
  2. Identify a link to an article that you have not visited before.
  3. Hover over the link to trigger the page preview.
  4. Move the cursor into the page preview, hovering over the summary text.
  5. Confirm that the summary text color does not change.
  6. ✅ AC2: The summary text color remains consistent for unvisited links.

See AC1