Page MenuHomePhabricator

Table of contents toggles don't work correctly after update
Closed, ResolvedPublic2 Estimated Story PointsBUG REPORT

Description

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

What happens?:
The toggle doesn't work.

If you add a subsection in the edit, some toggles work only for the first click.

Other information (browser name/version, screenshots, etc.):
Chrome.

Event Timeline

ovasileva triaged this task as Medium priority.Aug 24 2022, 9:15 AM
ovasileva raised the priority of this task from Medium to High.Aug 24 2022, 4:45 PM

Change 826552 had a related patch set uploaded (by Mabualruz; author: Mabualruz):

[mediawiki/skins/Vector@master] Table of contents toggles don't work correctly after update

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

Change 826552 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Table of contents toggles don't work correctly after update

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

Jdlrobson added subscribers: Mabualruz, Jdlrobson.

@ovasileva we may want to consider retroactively estimating this one.

LGoto set the point value for this task to 2.Aug 29 2022, 5:42 PM

Test Result - Beta

Status: ✅ PASS
Environment: beta
OS: macOS Monterey
Browser: Chrome
Device: MBP
Emulated Device:NA

Test Artifact(s):

QA Steps

Go to https://test.wikipedia.org/wiki/TOC_toggle_button.
Click "Edit" to edit with VE.
Make some change.
Save the page.
Click the subsection toggle.

✅ AC1: The toggle should work

Screen Recording 2022-08-29 at 6.51.12 PM.mov.gif (882×856 px, 884 KB)

Edtadros subscribed.

Test Result - Prod

Status: ✅ PASS
Environment: testwiki
OS: macOS Monterey
Browser: Chrome
Device: MBP
Emulated Device:NA

Test Artifact(s):

QA Steps

Go to https://test.wikipedia.org/wiki/TOC_toggle_button.
Click "Edit" to edit with VE.
Make some change.
Save the page.
Click the subsection toggle.

❌ AC1: The toggle should work
It looks like I missed this in beta. If the section is collapsed and you make an edit, after you publish, the section is expanded, but the first click doesn't register.

Screen Recording 2022-08-31 at 11.50.05 AM.mov.gif (966×1 px, 627 KB)

Jdlrobson added a subscriber: bwang.

@Mabualruz @bwang looks like this is still not quite right! I expect the initialization script doesn't consider the state may have changed?

Huh, when i test in test wiki it seems to work for me? Is there any other testing steps im missing?

Steps:

Expected: Collapses
Actual: Nothing. Clicking again collapses.

Does the type of edit matter? This is what I'm seeing in FF and chrome https://jmp.sh/fH0LD04

Ah I see, I didnt see that the section has to be collapsed in order to reprod. I also noticed that the toggle does work if you click one more time. The issue is likely due to the fact that the section was collapsed prior to the edit, but uncollapsed after. The JS considers the element collapsed still.

Would it make more sense to assign this to @Mabualruz given he worked on the original task?

ovasileva lowered the priority of this task from High to Medium.Sep 8 2022, 5:10 PM
ovasileva claimed this task.