Page MenuHomePhabricator

Flow doesn't render <gallery> correctly
Open, Needs TriagePublic


Entering a <gallery> in a Flow post using the wikitext interface doesn't result in a normal gallery as in a real wikitext page. Instead, a bullet list of images is rendered.


Event Timeline

QuimGil raised the priority of this task from to Needs Triage.
QuimGil updated the task description. (Show Details)
QuimGil added a project: StructuredDiscussions.
QuimGil subscribed.
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald Transcript

Thanks! Should this task be blocked by T110910, then?

Just in case it helps, there seems to be also a problem with tables, see

@ssastry @QuimGil is this fixed and if so, would you please close?

Trizek-WMF subscribed.

Tested and it looks good. If there is still a problem, please reopen.

I still get bullet lists instead of normal galleries. See

I still get bullet lists instead of normal galleries. See

I've checked to reproduce it and get a strange bug:

  1. you are on the page where you have bulleted galleries
  2. click on the reply form at the bottom
    1. if the reply form is set to visual mode, the galleries are rendered correctly
    2. if the reply form is set to wikitext mode, the galleries are not rendered correctly. Switch to visual.

Given the fact that setting visual mode or wikitext mode is memorized, I haven't seen the problem when I've visited the link provided into the description because visual mode was set.

The problem seems to be that gallery.css is only loaded when you enter visual editing mode.

When you click it, you can see a style element injected into the head, that beings like,

.ve-init-mw-editSwitch{float:right}.ve-init-mw-editSwitch .oo-ui-toolbar-bar{background:transparent;box-shadow:none;border:0}.ve-init-mw-editSwitch .oo-ui-popupToolGroup{height:32px;border:0;margin:0;border-radius:0}.ve-init-mw-editSwitch .oo-ui-popupToolGroup-handle{height:24px}.ve-init-mw-editSwitch .oo-ui-popupToolGroup-handle .oo-ui-iconElement-icon{height:auto}.ve-init-mw-editSwitch .oo-ui-popupToolGroup .oo-ui-toolGroup-tools{top:32px}.ve-init-mw-editSwitch .oo-ui-popupWidget-head{font-weight:bold} .ve-init-mw-switchPopupWidget{white-space:normal;z-index:4}.ve-init-mw-switchPopupWidget .oo-ui-popupWidget-anchor{margin-left:1.25em}.ve-init-mw-switchPopupWidget .oo-ui-popupWidget-head{font-weight:bold} .wikiEditor-ui-toolbar .ve-init-mw-editSwitch{font-size:0.9143em}.ve-init-mw-editSwitch .oo-ui-buttonElement-button{padding:0.3em}

Flow needs to ship that resource by default for the galleries to be styled properly. The html structure seems fine.