Last modified: 2014-10-14 18:41:40 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T51784, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 49784 - VisualEditor: Transclusion nodes should re-evaluate their block/inline status on every update
VisualEditor: Transclusion nodes should re-evaluate their block/inline status...
Status: ASSIGNED
Product: VisualEditor
Classification: Unclassified
Technical Debt (Other open bugs)
unspecified
All All
: High enhancement
: ---
Assigned To: Ed Sanders
:
: 50363 50610 52032 54893 72045 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-18 22:48 UTC by Ed Sanders
Modified: 2014-10-14 18:41 UTC (History)
9 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Ed Sanders 2013-06-18 22:48:30 UTC
Especially important for newly inserted ones, as at the moment we have no idea what they are going to be so we just assume inline.
Comment 1 Ed Sanders 2013-06-18 22:50:10 UTC
Possible solution may involve removing distinction between block & inline transclusion types in the DM, replacing with hybrid type, and have CE work out how to render it properly.
Comment 2 Oliver Keyes 2013-07-29 17:14:43 UTC
*** Bug 50363 has been marked as a duplicate of this bug. ***
Comment 3 James Forrester 2013-10-02 20:38:30 UTC
*** Bug 54893 has been marked as a duplicate of this bug. ***
Comment 4 James Forrester 2013-11-25 10:34:06 UTC
*** Bug 50610 has been marked as a duplicate of this bug. ***
Comment 5 Krinkle 2013-12-02 22:19:15 UTC
Parsoid says they now have a public wt2html API that we can use instead of action=parse. That would at least allow use to let Parsoid determine whether it is inline or block (instead of sniffing the html result, though that's fairly trivial, just <span> vs. everything else, right? Maybe a few other inline elements nodes that we use, or do we wrap them all?)

However we still need to then find a way to swap the data model node instance in that case. Having 1 datamodel type would be nice indeed. We could make it similar to extension tags in that templates have their own class, but it wouldn't be specific to an element type, we can still swap it dynamically (just like we can change lists from UL to OL).
Comment 6 Krinkle 2013-12-02 22:21:38 UTC
(In reply to comment #5)
> Parsoid says they now have a public wt2html API that we can use instead of
> action=parse. That would at least allow use to let Parsoid determine whether
> it
> is inline or block (instead of sniffing the html result, though that's fairly
> trivial, just <span> vs. everything else, right? Maybe a few other inline
> elements nodes that we use, or do we wrap them all?)
> 
> However we still need to then find a way to swap the data model node instance
> in that case. (..)

From ve.dm.MWTransclusionBlockNode to ve.dm.MWTransclusionInlineNode or visa versa.
Comment 7 James Forrester 2014-03-20 23:14:19 UTC
*** Bug 52032 has been marked as a duplicate of this bug. ***
Comment 8 Roan Kattouw 2014-10-01 22:35:34 UTC
Inez talked to me about this long-standing problem today. He worked on a solution that involves waiting for the preview to come back before inserting the template, displaying a spinner in the meantime. His code is at https://github.com/Wikia/app/pull/4932/files . It looks a bit rough and it only deals with insertion, but I think the general approach could work out pretty well. If nothing else, it could be a stop-gap until we have collaborative editing and having a transclusion reevaluate its type asynchronously would not be a big deal.
Comment 9 James Forrester 2014-10-14 18:41:40 UTC
*** Bug 72045 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links