Page MenuHomePhabricator

Create @example demo for CalendarWidget and DateInputWidget
Closed, ResolvedPublic

Description

T97425 created two widgets but they're not exposed anywhere.

Since we don't have a public demo for mediawiki widgets, maybe we can use the API documentation examples for now as a place to provide an interactive test demo and example show case.

https://doc.wikimedia.org/mediawiki-core/master/js/#!/api/mw.widgets.CalendarWidget
https://doc.wikimedia.org/mediawiki-core/master/js/#!/api/mw.widgets.DateInputWidget

Similar to what we have for OOjs UI core widgets like https://doc.wikimedia.org/oojs-ui/master/js/#!/api/OO.ui.ButtonWidget which have a Show Preview and Code Example.

Event Timeline

Krinkle raised the priority of this task from to Needs Triage.
Krinkle updated the task description. (Show Details)
Krinkle subscribed.
matmarex subscribed.

I had some demos for testing at https://gerrit.wikimedia.org/r/#/c/226647/ , I'll adapt them.

matmarex triaged this task as Medium priority.Aug 4 2015, 1:59 PM

Change 226647 had a related patch set uploaded (by Bartosz Dziewoński):
mw.widgets.DateInputWidget: Add @example

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

Change 226647 merged by jenkins-bot:
mw.widgets.DateInputWidget: Add @example

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

Jdforrester-WMF subscribed.

Well, https://doc.wikimedia.org/mediawiki-core/master/js/#!/api/mw.widgets.DateInputWidget doesn't exactly work perfectly as the live preview is broken, but it "works".