Page MenuHomePhabricator

OOUIPlayground GroupElement generated code shows the code in the hacked-in format, rather than in the code that would actually be used
Closed, DeclinedPublic

Description

BEFORE:

var widget = new OO.ui.DeferredWidget( {
    "class": "ButtonSelectWidget",
    "items": [
        {
            "data": 1,
            "label": "Option 1",
            "title": "Button option 1",
            "class": "ButtonOptionWidget"
        },
        {
            "data": 2,
            "label": "Option 2",
            "title": "Button option 2",
            "class": "ButtonOptionWidget"
        },
        {
            "data": 3,
            "label": "Option 3",
            "title": "Button option 3",
            "class": "ButtonOptionWidget"
        }
    ]
} );
$( 'body' ).append( widget.$element );

Should be:

var widget = new OO.ui.ButtonSelectWidget( {
    "items": [
        new ButtonOptionWidget( {
            "data": 1,
            "label": "Option 1",
            "title": "Button option 1"
        } ),
        new ButtonOptionWidget( {
            "data": 2,
            "label": "Option 2",
            "title": "Button option 2"
        } ),
        {
            "data": 3,
            "label": "Option 3",
            "title": "Button option 3",
            "class": "ButtonOptionWidget"
        }
    ]
} );
$( 'body' ).append( widget.$element );

Event Timeline

werdna claimed this task.
werdna raised the priority of this task from to High.
werdna updated the task description. (Show Details)

Change 203816 had a related patch set uploaded (by Werdna):
[WIP] Reimplement code rendering.

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

Volker_E lowered the priority of this task from High to Lowest.Mar 7 2017, 10:59 PM

Change 203816 abandoned by VolkerE:
[WIP] Reimplement code rendering.

Reason:
Other direction taken with https://doc.wikimedia.org/oojs-ui/master/demos/

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

Volker_E removed a project: Patch-For-Review.
Volker_E removed a subscriber: gerritbot.

Declined as we've been taking another direction with Wikimedia Design Style Guide and OOUI demos