Page MenuHomePhabricator

VisualEditor: Image type is not getting changed accordingly with the selection in Media Settings>Advanced Settings
Closed, InvalidPublic

Description

Steps to reproduce:

1.Open the page in VE
2.Add an image
3.Go to Media Settings>Advanced Settings
4.Change the image type to Thumbnail ,Frame or Border
5.Apply the changes

Observed Result:
There is no apparent different in either of these image types when selected

Test Environment: http://en.wikipedia.beta.wmflabs.org/
Browser: Chrome Version 26.0.1410.65
OS: MAC OS X 10. 8. 5
Page:http://en.wikipedia.beta.wmflabs.org/w/index.php?title=10thFeb&veaction=edit


Version: unspecified
Severity: normal

Details

Reference
bz61153

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:57 AM
bzimport set Reference to bz61153.

I can't manage to reproduce in master in both Firefox 26.0 and Chrome 32.0 under Ubuntu.

A new inserted image is inserted as "thumb" which is what I see selected in the media edit dialog when it's opened. Changing to "frameless" changes the type (and changes the view properly for me) as well as changing to "Framed" (though that one is a bit more subtle, because the difference between them isn't too noticeable)

It seems to work for me as expected in master.

Sorry little change in the steps to reproduce:

1.Open the page in VE
2.Add an image
3.Go to Media Settings>Advanced Settings
4.Change the image type to Frameless
5.Save the page
6.Reopen the editor and go the media settings again
7.Now change the image type to Thumbnail, then frame

Observed Result:
There is no thumbnail icon getting added in the VE mode unless user saves it, and then if he changes to frameless, it also looks pretty similar to the type thumbnail because both of them has no thumbnail icon beside the caption field.

Selecting border also does not make any change compared to frameless which has a separate ticket:https://bugzilla.wikimedia.org/show_bug.cgi?id=61155

Okay, for some reason, when an image has |frameless but no position set, VE intercepts it as an inline image.

So, when a new image is inserted, the position is set to default (no representation in the wikitext) and when we set it to "frameless" it results in the following wikitext:

[[File:Diplopedia main page.jpg|frameless|150x150px|]]

It seems that since it's missing a position, VE reads it as an inline image.

Turns out: This is intended behavior.

Images with |frameless but no position render as inline images in both Parsoid and the PHP Parser. That is, apparently, intended, as counterintuitive as it may be.

Since we can't edit inline images just yet in VE, this turns out to be a bit of a hassle (and a bug) -- but hopefully very soon we'll be able to edit inline images in the media edit dialog, which would solve the issue of having the resulting image uneditable.

Per Moriel's statement in comment 4.