When serializing DOM subtree of <h*> tags, force meta tags (links, categories, etc.) to serialize before / after heading as appropriate
Closed, ResolvedPublic

Description

This is a bit contrived, but a bug nonetheless:

  1. Go to [[testwiki:Sections galore]]
  2. Observe the wikitext source, then edit in VE
  3. Let's say you want to rewrite this article, so you select the entire lead and first section (from "Lead..." to "...core") and type some new text over it
  4. Make your new text into a heading
  5. Review changes

The category inclusion (which was previously before the "Apple" heading) becomes part of the new heading, which is silly from the point of view of a wikitext user.


Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=72048

bzimport added a project: Parsoid.Via ConduitNov 22 2014, 1:47 AM
bzimport set Reference to bz50373.
TTO created this task.Via LegacyJun 28 2013, 12:20 PM
Jdforrester-WMF added a comment.Via ConduitAug 2 2013, 11:45 PM

I think the right approach would be to reparent metas (at least for categories and langlinks) in this circumstance to the end of the page, but this feels messy in general.

TTO added a comment.Via ConduitFeb 22 2014, 1:56 AM

Upping to normal, since this is happening in real articles.

Esanders added a comment.Via ConduitFeb 22 2014, 1:25 PM

Shouldn't Parsoid be dealing with this?

Arlolra placed this task up for grabs.Via WebNov 25 2014, 8:07 PM
Arlolra set Security to None.
ssastry changed the title from "Parsoid: Category inclusions can end up as part of headings" to "When serializing DOM subtree of <h*> tags, force meta tags (links, categories, etc.) to serialize before / after heading as appropriate".Via WebTue, Feb 3, 6:39 PM
ssastry raised the priority of this task from "Normal" to "High".
ssastry moved this task to VE Q3 on the Parsoid workboard.
Arlolra claimed this task.Via WebTue, Feb 3, 10:11 PM
gerritbot added a project: Patch-For-Review.Via ConduitWed, Feb 4, 12:03 AM
gerritbot added a subscriber: gerritbot.

Change 188488 had a related patch set uploaded (by Arlolra):
Hoist metas from headings when serializing

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

Patch-For-Review

gerritbot added a comment.Via ConduitWed, Feb 4, 9:18 AM

Change 188488 merged by jenkins-bot:
Hoist metas from headings when serializing

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

gerritbot added a comment.Via ConduitThu, Feb 5, 11:37 PM

Change 188942 had a related patch set uploaded (by Arlolra):
Hoist out non-content as well, if we hit a link

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

Patch-For-Review

gerritbot added a comment.Via ConduitSat, Feb 7, 10:51 PM

Change 188942 merged by jenkins-bot:
Hoist out non-content as well, if we hit a link

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

Arlolra closed this task as "Resolved".Via WebMon, Feb 9, 9:37 PM
Jdforrester-WMF moved this task to Done on the § VisualEditor Q3 Blockers workboard.Via WebTue, Feb 10, 7:45 PM
Jdforrester-WMF set Story Points to 0.Via WebTue, Feb 10, 8:31 PM

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.