Page MenuHomePhabricator

Preview is too narrow when limited-width preference is disabled
Closed, ResolvedPublicBUG REPORT


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

  • Disable the 'Enable limited width mode' (vector-prefs-limited-width) and 'Show preview without reloading the page' (tog-uselivepreview) preferences and enable Temporarily disable the visual editor while it is in beta
  • Go to
  • Click show preview
  • Zoom out if necessary or increase window size.

What happens?:

The preview is displayed narrow.

What should have happened instead?:

The preview should be full-width, to match the text width when not editing.

Software version (skip for WMF-hosted wikis like Wikipedia):

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

Screenshot 2022-11-04 at 07-46-09 Editing Test - Dev wiki1.png (966×1 px, 214 KB)

First reported at T322337#8368807.

Event Timeline

Jdlrobson updated the task description. (Show Details)
Jdlrobson subscribed.

Seems like the code

.vector-feature-limited-width-disabled #wikiPreview, .skin-vector-disable-max-width #wikiPreview {
    max-width: 60em;  margin: auto;

should be removed (or at least limited to vector-feature-limited-width-content-enabled)?

matmarex subscribed.

This is not related to Realtime Preview, in fact it only occurs when you're not using that new feature. It's a bug in Vector.

The skin style is here: but probably shouldn't be. Community tech, any chance you could assess the fix for T307725 some time soon?

Yeah I think you're right.

$wgVectorMaxWidthOptions lists action=edit as one of the places where max-width isn't meant to apply, but that's no longer true because that whole config var is (I think?) ignored when the vector-prefs-limited-width preference is true. This means that when the user has limited-width enabled, everything is already narrow (the edit form and the preview). When it's not enabled, everything should be wide and we shouldn't be making any change to the preview width.

But what are the plans for the future? I'm slightly wary of changing things again while Vector-2022 is still under development. Is there going to be a situation in which the edit form will be wide and the content width narrow? Am I just failing to think properly about all the permutations of $wgVectorMaxWidthOptions and the preference (including changing defaults)?

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

[mediawiki/skins/Vector@master] Remove narrow width preview

Change 881746 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Fix font-size adjustments for narrow width

Thanks for the patch @Samwilson! I guess we should take QA for this.

ppelberg claimed this task.