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
- As part of this ticket, we should review the unit test/snapshot test for the re-render and revise it to try and prevent regressions like T326682 in the future. I suspect there is too much mocking of the mustache rendering, and it deviates from the behavior in production too much.
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
AC | Status | Details |
---|---|---|
1 | ✅ | T326839#8555538 |
2 | ✅ | T326839#8555538 |
QA Results - Prod
AC | Status | Details |
---|---|---|
1 | ✅ | T326839#8559666 |
2 | ✅ | T326839#8559666 |