Page MenuHomePhabricator

<mapframe> should be shown left/right/center aligned frame
Closed, ResolvedPublic


The <mapframe> tag should have the alignment capability as [[file:...]]:

  • left and right alignment options to show graph as a floating div
  • by default, it will be right aligned for LTR languages, and left-aligned for RTL

P.S. inline mode may be added later per additional discussion

Event Timeline

Yurik raised the priority of this task from to Needs Triage.
Yurik updated the task description. (Show Details)
Yurik added a project: Maps (Kartographer).
Yurik added subscribers: Yurik, Esanders, TheDJ, MaxSem.

This makes them inline components which means in VE they are able to be inserted in the middle of paragraphs.

Is it wrong in some way? <graph> work the same way. I'm not a styling expert, but IMO if two graphs are declared one after another, they should insert one after another, side by side - e.g. like CSS float left, or like characters in a paragraph.

You just lose the benefits of it being block level (like framed image), specifically when you drag and drop a block image in VE - it only lets you place it between paragraphs, and when you insert one it doesn't insert it within the paragraph text.

On the other having maps be always inline does simplify the code a bit.

A related issue is that there is probably going to community demand for a maps in [[File:foo.jpg|thumb|caption]]-style captioned frames, which would be display:block. If we don't provide this functionality the community will hack it together with templates - and then we will lose all the VE functionality, because {{FramedMap}} will be treated as a template node, not a map node.

We could provide this via some <maps style="CSS"> or <maps frametype="framed"> approach. Suggestions?

Yurik renamed this task from <maps> should be shown as inline blocks to <mapframe> should be shown as inline or left/right aligned frame.Feb 23 2016, 5:09 PM
Yurik updated the task description. (Show Details)

Change 274569 had a related patch set uploaded (by MaxSem):
Allow adjusting <mapframe> alignment

The way the image syntax has ended up is a bit crazy, as you can see form our media dialog:

pasted_file (225×453 px, 14 KB)

We need to find the balance between enough options that users don't have to create templates for their common layouts, and not too many that it becomes confusing.

@Esanders yeah, it is a bit crazy - i have no idea what the difference is between different types :) I guess we should have either 1) a left/right/centered block, or 2) inline (so it can be easily assembled into tables, etc, without any margins. The block one should have an option to add a caption at the bottom. Also, the default should be block on the right (left for RTL). Please suggest the tag's interface, e.g. <mapframe align=inline> or <mapframe align=left>.

Change 274569 merged by jenkins-bot:
Allow adjusting <mapframe> alignment

Yurik renamed this task from <mapframe> should be shown as inline or left/right aligned frame to <mapframe> should be shown left/right/center aligned frame.Mar 4 2016, 11:27 PM
Yurik closed this task as Resolved.
Yurik updated the task description. (Show Details)