Page MenuHomePhabricator

Pinning behaviour disappears after the TOC reloaded from an edit made with VisualEditor
Closed, ResolvedPublic

Description

Background

https://jumpshare.com/v/Y6t22wHnVhcrjfEkHH7b
Discovered during work on T326682

Developer notes

Currently we reload the entire TOC (#vector-toc) when the 'wikipage.tableOfContents' hook is fired by VisualEditor. This means we need to provide the data and templates for the PinnableHeader, which is unnessary and more error prone. Instead we should only rerender the TOC contents

Acceptance Criteria

QA

Expected behaviour

Unpinned scenario:

  • Edit an article.
  • Change the headers. That makes sure to reload TOC
  • Save the Edits
  • Pinning actions showing and working

Pinned scenario

  • Edit an article.
  • Change the headers. That makes sure to reload TOC
  • Save the Edits
  • Open TOC menu
  • Pinning actions showing and working
Unexpected behaviour

Unpinned scenario:

  • Pinning actions disappear.

Pinned scenario

  • Menu opens but show empty area

QA Results - Beta

ACStatusDetails
1T326839#8555538
2T326839#8555538

QA Results - Prod

ACStatusDetails
1T326839#8559666
2T326839#8559666

Event Timeline

Change 879117 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[mediawiki/skins/Vector@master] Update tableOfContents.js to rerender only the TOC contents rather than the entire pinnable element

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

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

[mediawiki/skins/Vector@master] Table of contents Pinning behavior

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

Mabualruz reopened this task as Open.
Mabualruz claimed this task.
Mabualruz removed Mabualruz as the assignee of this task.
Mabualruz moved this task from Incoming to Doing on the Web-Team FY2022-23 Q3 Sprint 1 board.
Mabualruz moved this task from Doing to Code Review on the Web-Team FY2022-23 Q3 Sprint 1 board.
Mabualruz subscribed.
ovasileva triaged this task as Medium priority.Jan 13 2023, 11:46 PM

Change 879667 abandoned by Mabualruz:

[mediawiki/skins/Vector@master] Table of contents Pinning behavior

Reason:

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

Opened a bug for another issue with table of contents https://phabricator.wikimedia.org/T327064 Table of contents Collapse/Expand not working

Change 879117 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Update tableOfContents.js to rerender only the TOC contents rather than the entire pinnable element

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

Mabualruz renamed this task from Pinning behavior disappears after the TOC reloaded from an edit made with VisualEditor to Pinning behaviour disappears after the TOC reloaded from an edit made with VisualEditor.Jan 17 2023, 4:57 PM
Edtadros subscribed.

Please provide some steps/guidance on how I can verify this.

Jdlrobson subscribed.

Can you please add some QA steps to the description of this ticket? Thanks in advance!

@Jdlrobson I did not author this one, I did the review and some final touches, anyway I did add QA steps

Test Result - Beta

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

Test Artifact(s):

QA Steps

✅ AC1: Unpinned scenario:

Edit an article.
Change the headers. That makes sure to reload TOC
Save the Edits
Pinning actions showing and working

Screen Recording 2023-01-24 at 3.46.37 PM.mov.gif (1×1 px, 656 KB)

✅ AC2: Pinned scenario

Edit an article.
Change the headers. That makes sure to reload TOC
Save the Edits
Open TOC menu
Pinning actions showing and working

Screen Recording 2023-01-24 at 3.48.02 PM.mov.gif (1×1 px, 501 KB)

Test Result - Prod

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

Test Artifact(s):

QA Steps

✅ AC1: Unpinned scenario:

Edit an article.
Change the headers. That makes sure to reload TOC
Save the Edits
Pinning actions showing and working

Screen Recording 2023-01-25 at 7.12.47 PM.mov.gif (896×782 px, 2 MB)

✅ AC2: Pinned scenario

Edit an article.
Change the headers. That makes sure to reload TOC
Save the Edits
Open TOC menu
Pinning actions showing and working

Screen Recording 2023-01-25 at 7.18.51 PM.mov.gif (996×792 px, 2 MB)