Page MenuHomePhabricator

OOjs UI Demos: Show code used to generate widgets
Closed, ResolvedPublic

Description

The demo already has a console that lets you interact with the widgets.

Screen Shot 2017-05-16 at 5.12.19 PM.png (96×764 px, 18 KB)

It would be helpful to have a way to see the code that generated the widget and quickly copy it. This helps both in testing and while learning how to use the library.

Screen-Shot-2017-05-16-at-5.12.19-PM.png (204×764 px, 5 KB)

Event Timeline

Change 353960 had a related patch set uploaded (by Prtksxna; owner: Prtksxna):
[oojs/ui@master] [wip] show code on demo page

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

Volker_E raised the priority of this task from Medium to High.May 19 2017, 10:40 PM

Change 353960 merged by jenkins-bot:
[oojs/ui@master] demos: Show code that can be used to create the widget

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

Volker_E moved this task from Reviewing to OOjs-UI-0.22.0 on the OOUI board.
Volker_E edited projects, added OOUI (OOjs-UI-0.22.0); removed OOUI.
Volker_E removed a project: Patch-For-Review.
Volker_E removed a subscriber: gerritbot.

Thanks. Great improvment.
I see somewidgets did not get the proper code listing. Is this known issue?

image.png (360×795 px, 34 KB)

No, looks like a bug. That example definitely worked last time I checked that patch. Looks like it was broken by the last patchset.

Change 355205 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[oojs/ui@master] demos: Fix code generation for more complicated cases

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

Change 355205 merged by VolkerE:
[oojs/ui@master] demos: Fix code generation for more complicated cases

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