https://bugzilla.wikimedia.org/show_bug.cgi?id=51501

       Web browser: ---
            Bug ID: 51501
           Summary: VisualEditor: Rewrite converter to be bottom-up
           Product: VisualEditor
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: Technical Debt
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected]
    Classification: Unclassified
   Mobile Platform: ---

The data->DOM converter should construct its DOM bottom-up, the way
https://gerrit.wikimedia.org/r/74058 already does for annotations. This would
enable us to do some cool things like:

* Pass childDomElements to nodes and meta items (already done for annotations)
* Pass data content in addition to DOM content?
* Allow nodes and meta items to unwrap themselves by returning an empty array
(already done for annotations)
** We could implement unwrapping of generated wrapper paragraphs using this
feature
* Possibly change the API so that instead of returning an array of DOM
elements, the toDomElements function is responsible for appending its children.
** This could replace handlesOwnChildren, and enable model types with complex
output

For DOM->data it's not as straightforward. We could experiment with bottom-up
(outside-in, really) building there too, but it would be a bit less clear how
things would work, and whether the copying involved would affect performance
(although I believe we may already do a fair bit of copying around as it is).


This may be my pet project for my flight to Wikimania, or I may end up doing
this sooner if there's time.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to