Page MenuHomePhabricator

VisualEditor: Image should not change size when going from read to edit
Closed, ResolvedPublic

Description

When editing, "default size" in mw prefs is not honored.

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 22 2014, 3:37 AM
bzimport set Reference to bz67047.

This is verging on a WONTFIX; we actively don't want people resizing images to look "right" for them, which this would encourage.

I think i might have been unclear on this one.

The gist is "Image should not change size when going from read to edit"

there are many possible fixes, but the one that seemed simplest was, for images which are at "default" size, look at users preference for what size "default" is and display them at that size when in edit mode.

there might be other options, but the bug is that they change, size at all.

(In reply to Jared Zimmerman (WMF) from comment #2)

I think i might have been unclear on this one.

The gist is "Image should not change size when going from read to edit"

there are many possible fixes, but the one that seemed simplest was, for
images which are at "default" size, look at users preference for what size
"default" is and display them at that size when in edit mode.

And as I said, we have intentionally chosen not to do this.

there might be other options, but the bug is that they change, size at all.

The simplest "fix" to this issue is to remove the user preference. But you probably don't want that.

I think I might be being unclear with the request…

As a user who sets my thumbnail preference to (120/180/220/250/300/etc)px while in visual editor I see "default sized" thumbnails display as (120/180/220/250/300/etc)px depending on my preference.

I'm not sure I understand your point "we actively don't want people resizing images to look "right" for them, which this would encourage." which is the exact opposite of what this would do, if the images LOOK right when i get to VE then I'm much less likely to go on a resizing spree.

I'd like to revisit this, the current behavior is actively against the WYSIWYG model established in VE. I'm still not understanding the argument against this. If images are the same size both in read and edit mode, how will this contribute to editors wanted to resize them to "look right for them" if they already look correct? if anything this seems like it would lessen the desire to fiddle with image sizes.

This issue has been pointed on fr.wp too.
With the given example I see the image 1.66 bigger while reading than while editing.

This really looks like it would be a simple fix. Parsoid sets class="mw-default-size" on the <figure> elements if no explicit size was given, and VE already knows user's preferred thumbnail size.

Change 499330 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] Respect user preference for default thumbnail size while editing

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

Change 499330 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Respect user preference for default thumbnail size while editing

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