Page MenuHomePhabricator

Unstyled VE diffMode buttons without icons while using RevisionSlider
Closed, ResolvedPublicBUG REPORT

Description

While using Revision-Slider it's possible to get the pair of Visual Wikitext buttons without icons.

Screenshot from 2023-08-21 11-43-06.png (231×530 px, 15 KB)

Steps to reproduce:

  • Enable user preference "Use the wikitext mode inside the visual editor, instead of a different wikitext editor."
  • Go to a diff page for something that does not contain any wikitext changes, e.g. a log entry. Example: https://de.wikipedia.org/wiki/Special:Diff/220483682/230653261.
  • Open/expand RevisionSlider.
  • Click "← Older edit". RevisionSlider loads the new diff without reloading the entire page. It obviously never loads the necessary ResourceLoader modules.
  • This currently happens on all live wikis.
  • It only happens when Revision-Slider is enabled and expanded.
  • The skin is unrelated.

Not sure if this qualifies as a regression. Maybe it was always like this and we just never noticed. The buttons apparently exist since 2017, see T167508. But T338388 might be related.

Possible solutions:

  1. Simply make sure these modules are always loaded, no matter if the buttons are shown or not.
  2. Somehow re-load the missing modules when RevisionSlider flips the page.
  3. …?

Event Timeline

It's not just that the icons are missing: the visual diff button does not work at all.

I think RevisionSlider could solve this by loading the module 'ext.visualEditor.diffPage.init' somewhere. You already have some integration with visual diffs, so it seems like the right place to put this to me. Thoughts?

awight moved this task from Backlog to Doing on the WMDE-TechWish-Maintenance-2023 board.
awight updated Other Assignee, added: awight.
awight updated Other Assignee, removed: awight.

Another bug in this group, detected locally: when you click visual diff, it works but after navigating to an older or newer diff using the legacy links, the choice of diff style is reset to show a wikitext diff.

Change 953958 had a related patch set uploaded (by Awight; author: Awight):

[mediawiki/extensions/VisualEditor@master] Share diff page initialization with non-text diffs

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

awight moved this task from Doing to Review on the WMDE-TechWish-Maintenance-2023 board.
awight subscribed.

Change 953958 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Share diff page initialization with non-text diffs

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

The patch https://gerrit.wikimedia.org/r/953958 might have caused the new issue described in T346252. But as far as I understand the discussion a proper fix will not be done via a revert. So this here is still done and it should be fine to mark it as such.