Page MenuHomePhabricator

Add Wikipedia Preview "targets" to storybook
Closed, ResolvedPublic

Description

We already have stories for the different preview states and fullscreen gallery. It would be great to have different types of targets (text, image, links) and call the init function on them with various options to make sure they all look right and work as expected. Including them into a sample paragraph would be even better.

Event Timeline

hueitan moved this task from Backlog to Dev on the Inuka-Team (Kanban) board.

After several trying with adding custom script, preview-head script and hacky onload event, the result doesn't idea and buggy.

The idea of using Storybook helps for building the UI components in isolation

It would be great to have different types of targets (text, image, links) and call the init function

This is more like the demo instead of the UI component

Including them into a sample paragraph would be even better.

I would prefer only doing this by adding some target variants into the demo page.

After several trying with adding custom script, preview-head script and hacky onload event, the result doesn't idea and buggy.

I was wrong about this, the solution is quite simple, checkout here.

Including them into a sample paragraph would be even better.

Design is currently making the decision whether to include it.