VisualEditor: <span> annotations next to each other aren't necessarily the same
Closed, ResolvedPublic

bzimport set Reference to bz49873.
Mdennis-WMF created this task.Via LegacyJun 20 2013, 12:49 PM
Jdforrester-WMF added a comment.Via ConduitJun 21 2013, 12:18 AM

In this case:

<span style="color:green;">Aussie</span><span style="color:gold;">Legend</span>

… is being simplified by DM into:

<span style="color:green;">AussieLegend</span>

… which, unsurprisingly, Parsoid assumes means we wanted to combine them. :-)

Esanders added a comment.Via ConduitJun 21 2013, 10:59 AM

This is the same as bug 49478. We are dependent on it being in Parsoid first, otherwise we would reintroduce bug 48110.

Esanders added a comment.Via ConduitJun 21 2013, 11:26 AM
  • This bug has been marked as a duplicate of bug 42803 ***
Esanders added a comment.Via ConduitJun 21 2013, 11:30 AM
  • This bug has been marked as a duplicate of bug 48194 ***
GWicke added a comment.Via ConduitJul 2 2013, 3:17 AM

Several of these issues are actually on the VE side, so reopening.

GWicke added a comment.Via ConduitJul 11 2013, 8:51 PM

I still see annotation merging on this test case:

http://www.mediawiki.org/wiki/User:GWicke/TestDoubleFormatting?veaction=edit

Steps to reproduce:

  • append a char to 'baz'
  • preview the change

Result: The bold ranges are merged, leading to a dirty diff
Expected result: no merging and no dirty diff

Catrope added a comment.Via ConduitJul 11 2013, 9:02 PM

(In reply to comment #6)

I still see annotation merging on this test case:

http://www.mediawiki.org/wiki/User:GWicke/TestDoubleFormatting?veaction=edit

Steps to reproduce:

  • append a char to 'baz'
  • preview the change

    Result: The bold ranges are merged, leading to a dirty diff Expected result: no merging and no dirty diff

That should be the only remaining annotation merging issue. I've been meaning to file a bug about it but I keep forgetting.

Ed, we need to preserve the difference between <b>Foo</b><b>Bar</b> and <b>FooBar</b> somehow. Feel free to hit me up on IRC if you want to talk about how we should do that.

Esanders added a comment.Via ConduitJul 12 2013, 12:31 PM

All we need to do is turn off similar annotation comparisons in VE completely, but Parsoid is not ready for that yet, for example adding new bold text next to Parsoid-generated bold text would create:

<b data=parsoid="">Old bold text</b><b>New bold text from VE</b>

which Parsoid should obviously merge to:

'''Old bold textNew bold text from VE'''

but doesn't yet.

Once this is all handled correctly, we can turn off similar annotation comparisons and the two bolds in <b>Foo</b><b>Bar</b> will no longer be merged (as they have will have different data-parsoid's). Of course Parsoid will not want to merge them either so that will factor into their logic.

Esanders added a comment.Via ConduitJul 12 2013, 12:39 PM
  • Bug 50291 has been marked as a duplicate of this bug. ***
GWicke added a comment.Via ConduitJul 12 2013, 3:39 PM

Adding Parsoid bug 42803 as a dependency. We do add nowiki between most cases of adjacent quotes to ensure at least correctness, but the markup will indeed not be optimal.

gerritbot added a comment.Via ConduitJul 12 2013, 9:22 PM

Change 73523 had a related patch set uploaded by Esanders:
HACK: Don't merge adjacent annotations from Parsoid

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

Esanders added a comment.Via ConduitJul 13 2013, 10:35 AM
  • Bug 51234 has been marked as a duplicate of this bug. ***
gerritbot added a comment.Via ConduitJul 15 2013, 1:38 AM

Change 73523 merged by jenkins-bot:
HACK: Don't merge adjacent annotations from Parsoid

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

Jdforrester-WMF added a comment.Via ConduitJul 15 2013, 1:39 AM

Merged and will go out tomorrow.

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.