Page MenuHomePhabricator

Both diffs shown when quickly toggling inline mode
Closed, ResolvedPublicBUG REPORT

Description

What is the problem?

If you toggle the inline diff mode on and off quickly, you will see both the inline and two-column diff on the page.

This only happens after you first load the page. If you subsequently toggle inline mode I cannot reproduce the race condition.

I wonder if the fix for T346145 will also fix this bug.

Steps to reproduce problem
  1. https://en.wikipedia.beta.wmflabs.org/w/index.php?title=Conflict-title-0.4250371923621381-I%C3%B1t%C3%ABrn%C3%A2ti%C3%B4n%C3%A0liz%C3%A6ti%C3%B8n&diff=483639&oldid=483638
  2. Very quickly toggle the inline mode on and off (i.e. click the inline toggle twice in rapid succession)

Expected behavior: Only one type of diff should be shown
Observed behavior: Both diffs are shown

Environment

Browser: Firefox 102. Chromium 116.
Wiki(s): https://en.wikipedia.beta.wmflabs.org MediaWiki 1.41.0-alpha (cfd7c86) 07:23, 13 September 2023.

Screenshots

From on to off:

inline_toggle_rc_on_off.png (614×1 px, 59 KB)

From off to on:

inline_toggle_rc_off_on.png (606×1 px, 61 KB)

QA Results - Beta

A separate issue was created as mentioned in https://phabricator.wikimedia.org/T346208#9207511

Event Timeline

Change 960073 had a related patch set uploaded (by Dmaza; author: Dmaza):

[mediawiki/core@master] Diffs: Toogle diff type container after api request is done

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

Change 960073 merged by jenkins-bot:

[mediawiki/core@master] Diffs: Toogle diff type container after api request is done

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

@dmaza Both diffs are not shown but I did notice a problem with Safari 16.6 on MacOS 13.5.2. As you see in the gif below, it highlights everything when you toggle it quickly and the Inline button highlight sticks out.

Status:❌ FAIL
Environment: Beta: 1.41.0-alpha (8740d6d)- Tue, Sep 26, 12:44 AM
OS: macOS Ventura, Windows 11
Browser: Chrome 117, Firefox 117, Safari 16.6, IE 117
Device: MBA M2
Emulated Device:: N/A
Test Links:

  1. https://en.wikipedia.beta.wmflabs.org/w/index.php?title=Conflict-title-0.4250371923621381-I%C3%B1t%C3%ABrn%C3%A2ti%C3%B4n%C3%A0liz%C3%A6ti%C3%B8n&diff=483639&oldid=483638

❌AC1: https://phabricator.wikimedia.org/T346208

Google and rest of Browsers- Safari 16.6-
2023-09-26_14-08-44.mp4.gif (1×1 px, 772 KB)
2023-09-26_14-09-25.mp4.gif (1×1 px, 1 MB)

Safari 16.6- screenshot of the highlight

2023-09-26_14-21-25.png (836×1 px, 217 KB)

I don't have safari to check but my bet is that this was an existing issue. No idea if that's expected browser behavior or not. Could you check if that's already the case in production?
I think this task can be closed and the highlighting/markup problem can be a separate low priority task. Would that be ok?

@dmaza Your bet was right and you would be in the money since it is showing in PROD too. I created T347602: Quickly toggle Inline button mode in Safari- Highlights for the Safari issue. I will move this task to Done. Thanks for all your work!

Prod- https://en.wikipedia.org/w/index.php?title=Peacock_(streaming_service)&diff=1177451263&oldid=1177409416

2023-09-28_08-13-27.png (1×1 px, 491 KB)