Page MenuHomePhabricator

Flow: Reference numbers in Parsoid output aren't superscripted
Closed, ResolvedPublic

Details

Reference
bz60017

Related Objects

StatusSubtypeAssignedTask
OpenFeatureNone
ResolvedJdlrobson
ResolvedNone
ResolvedArlolra
ResolvedArlolra
ResolvedEsanders
ResolvedCatrope
DeclinedNone
DeclinedNone
Resolvedssastry
Resolved bearND
Resolved bearND
Resolved bearND
Resolved bearND
OpenNone
Resolved Jhernandez
OpenNone
Resolved marcoil
ResolvedCatrope
Resolved marcoil
ResolvedArlolra
ResolvedArlolra
Resolved GWicke
Resolved GWicke
Resolved GWicke
Resolvedfgiunchedi
Resolvedfgiunchedi
Resolved Cmjohnson
Resolved Cmjohnson
ResolvedJoe
Resolvedfgiunchedi
Resolved GWicke
Resolved Jdouglas
Resolved GWicke
Resolved GWicke
ResolvedArlolra
Resolved GWicke
Resolved mobrovac
Resolved mobrovac
Resolved mobrovac
Resolved mobrovac
Duplicate Jdouglas
ResolvedAndrew
Resolved GWicke
Resolvedfgiunchedi
Resolvedfgiunchedi
Resolvedfgiunchedi
ResolvedEevans
Resolvedfgiunchedi
Resolved GWicke
Resolved GWicke
Resolvedfgiunchedi
Resolved mobrovac
Resolved GWicke
Resolved GWicke
Resolved AlexMonk-WMF
Resolved santhosh
Resolvedssastry
Resolved Mholloway
ResolvedJackmcbarn
ResolvedRenxiaoyi
Resolvedcscott
ResolvedKelson
OpenNone
OpenNone
OpenNone
ResolvedArlolra
ResolvedArlolra
OpenNone
DeclinedNone
OpenNone
OpenNone
DeclinedNone
DeclinedNone
DeclinedNone
OpenNone
OpenNone
InvalidNone
InvalidNone
DuplicateNone
DuplicateNone
Resolved Jhernandez
ResolvedJdlrobson
DuplicatePeter
Resolved bmansurov
DeclinedNone
DuplicateNone
Resolved nray
Resolvedphuedx
ResolvedAnomie
ResolvedAnomie
ResolvedAnomie
ResolvedEBernhardson
ResolvedAnomie
ResolvedAnomie
OpenNone
DuplicateNone
ResolvedNone
Resolvedphuedx
DeclinedNone
Resolved Pchelolo
ResolvedArlolra
ResolvedMooeypoo
ResolvedCatrope
Resolved GWicke
ResolvedArlolra
Resolved marcoil
Resolved marcoil
Resolved GWicke

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:51 AM
bzimport set Reference to bz60017.
bzimport added a subscriber: Unknown Object (MLST).

bingle-admin wrote:

The WMF core features team tracks this bug on Mingle card https://wikimedia.mingle.thoughtworks.com/projects/flow/cards/720, but people from the community are welcome to contribute here and in Gerrit.

Also, in the mediawikiwiki example (https://www.mediawiki.org/w/index.php?title=Talk:Sandbox&workflow=050e2fb772abdae40bd7842b2b77d26b#flow-post-050e2fc7a956d409439790b11c278af6 ) there is also a problem with the {{reflist}} being in a <pre> formatted div.

/Possibly/ this has the same root problem? I notice in the html-source code that there are a lot of &quot;s (or &amp;quot;s if the first gets converted in this comment).

Or possibly it's because the [[mw:Template:Reflist]] is much older than the [[Template:Reflist]] at Enwiki and ee-flow?

I'm not sure if I should open a separate bug for that...?

The pre-formatted div you mention in #comment 2 seems fixed on mediawiki.

The lack of superscript may be because Parsoid doesn't run the <ref> tag through Extension:Cite/Cite.php – it doesn't use the PHP parser's hooks. But it clearly does something with the <ref> tag, turning it into a <span class="reference"> containing a hyperlink with a counted element. If it's by design that Parsoid doesn't output a <sup> tag, then a workaround could be to include Parsoid-specific CSS matching the browser's built-in styling of <sup> i.e.

span.reference { font-size: smaller; line-height: normal; vertical-align: super;}

Some other glitches with reference tags:

  • The hyperlinks between the citation [1] and the reference are #citeANCHORNAME fragments, but because the Flow page includes a <base href="/wiki/Talk:Sandbox"> (in order to make relative links work?), following the links when you're viewing this topic in isolation makes you leave the current page, and if it's scrolled off the Flow board the link won't work. This happens on http://parsoid.wmflabs.org/_wikitext/ , I'll file a separate bug.
  • Each post restarts its citation counters. It's technically illegal HTML to have two id="cite_note-1" in one document and it's undefined what hyperlinks using that as a fragment will do. So citations can never work correctly when the Flow board or single topic view shows more than one post using them, unless each Flow post provides an anchorPrefixParameter to Parsoid like '#flow-postId-flow-post-rn84j0djfcyxetu8-' , and Parsoid prepends that when generating id, name, and href attributes. Another separate bug.

(In reply to spage from comment #3)

  • The hyperlinks between the citation [1] and the reference are

#citeANCHORNAME fragments, but because the Flow page includes a
<base href="/wiki/Talk:Sandbox"> ... [they] won't work.

I filed bug 62691, maybe Flow doesn't need to output <base href> any more.

Change 124787 had a related patch set uploaded by Spage:
Add Parsoid's CSS modules

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

Change 124787 merged by jenkins-bot:
Add Parsoid's CSS modules

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

The superscripting is fixed in 1.24wmf3, the other glitches in comment #3, should probably be filed as enhancements.