Topic on Extension talk:MobileFrontend

Style error in Special:MobileDiff

4
TripleCamera2022 (talkcontribs)

This topic is moved from Topic:Xnptvuef38x7jel1 at Project:Support desk.

  • MediaWiki version: 1.40.0
  • PHP version: 8.1.21
  • MariaDB version: 11.0.2
  • MobileFronted version: 2.4.1
  • Minerva version: 2023-06-29
  • URL: https://wiki.mcbe-dev.net/

Hello, I am editing wiki on my phone. When I use desktop view, the page for comparing revisions is Special:Diff, which works correctly. But when I switch to mobile view, comparing revisions uses Special:MobileDiff, whose style is broken: The old and new revision are supposed to take up 50% of the screen width, but actually they both take up 100% of the screen width. (Example: Diff, MobileDiff)

I tried to compare revisions in Wikipedia. In Wikipedia, the view of Special:MobileDiff is completely different: There is no 2-column look, instead, the changes are highlighted. Example

Why are the views totally different? Are there any special configurations for Wikipedia, or is this mcbe-dev wiki missing something?

TripleCamera2022 (talkcontribs)

Update: Wikipedia is using the inline diff. It has enabled $wgShowDiffToggleSwitch, which is because it had updated to 1.41. --The second question is now answered.

I also located the piece of CSS that caused the style error in Special:MobileDiff:

.diff.diff tbody, .diff tr, .diff td {
    display: block;
}

Finally, the code is located. Module: mobile.special.mobilediff.styles. Source code (GitHub).

TripleCamera2022 (talkcontribs)

Inline diff has nothing to do with $wgShowDiffToggleSwitch. To enable inline diff, you need to install wikidiff2 and then add $wgDiffEngine = 'wikidiff2'; to your LocalSettings.php.

TripleCamera2022 (talkcontribs)
Reply to "Style error in Special:MobileDiff"