Page MenuHomePhabricator

Wikitext preview re-renders article preview at the wrong width
Closed, ResolvedPublic3 Estimated Story PointsBUG REPORT

Description

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

What happens?:
The content area is narrower than in the viewing mode. This impacts what the content looks like. For instance, the images in the gallery appear in a sequence 1-1-2, while in the viewing mode, it's 1-2-1.

I've tried to replicate this on Russian Wikipedia - with the same result. The content area was narrower in the preview.

View (reading)Preview
obraz.png (1×812 px, 757 KB)
obraz.png (1×680 px, 744 KB)

What should have happened instead?:
The content area width should be the same as in the viewing mode

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

Developer notes

Looks like the rule in https://gerrit.wikimedia.org/g/mediawiki/skins/Vector/+/1a2b6d59a547ce0c395f28226bdd85539396b33a/skinStyles/mediawiki.action.edit.less#4 needs updating

Article is currently rendering at 944px, not 840px.

This rule does look like a bit of a hack, but there is no way to programmatically switch a page from having a max-width applied to not having a max-width applied.

Event Timeline

Jdlrobson renamed this task from Different content area width in the wikitext preview to Wikitext preview re-renders article preview at the wrong width.Aug 5 2022, 6:47 AM
Jdlrobson updated the task description. (Show Details)
Jdlrobson added a subscriber: Samwilson.
Jdlrobson subscribed.

Tagging community tech as they last touched this in T307725.

Both are set to 60em, but one is at 16px font size and the preview is at 14px, hence the difference. Using rem might help, although take care to test in our various supported skins (monobook + vector + vector-2022).

I'm not sure we touched the piece regarding the font size changes and the details in the developer notes seem to confirm otherwise. Tagging @Samwilson for a second pair of more technical eyes

Although we didn't touch the font sizes, we did change the width and we based it on font size so I think it makes sense for us to fix this too. The difference in font sizes should be fixed, I assume? It doesn't make sense for the preview to be a different size to the final display.

Change 843603 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/skins/Vector@master] Set width of preview to match reading

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

Change 843603 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Set width of preview to match reading

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

In Sprint planning, we decided we wanted this as a fix before we graduate Realtime preview to a preview to all

dom_walden moved this task from QA 🐛 to Done 🏁 on the Community-Tech (CommTech-Sprint-35) board.
dom_walden subscribed.

@NRodriguez In the RTL today, we decided that there wasn't much point continuing to test this. The original bug cannot be reproduced (due to changes in Vector 2022?). The time would be better spent testing the fixes for T322337, T321728 and (possibly) T310309 which will also include testing whether this bug still exists.