Background
During a recent meeting, the web team engineers discussed the pros & cons of a tool like Storybook, and why it was ultimately removed from the MobileFrontend repo. Despite that removal, the team still sees value in tool like this and would like to explore options that could achieve similar functionality without the maintenance burden.
User story
- As a developer on the web team, when working on a component, I would like to see all (or most) permutations of that component during development, so that I can minimize regressions and edge-cases.
Requirements
During our meeting, we agreed to the following requirements:
- Integration with resourceLoader - One of the biggest downsides to Storybook was that it didn't truly reflect the style/js output that ResourceLoader would produce. ResourceLoader has specific features like skins.variables.less and CSS flipping for RTL that had to be hacked around in Storybook.
- i18n capabilities - MediaWiki has specific i18n functionality such as i18n messages in Less, icon-flipping, general CSS flipping with CSSJanus that cannot be easily replicated in Storybook.
- LiveReload - Not crucial but improves development experience.
Open questions
- Can we use a static page served from within Mediawiki? such as the docs folder
- Can we somehow integrate this tool with Jest snapshots?
- Can we use this tool in Pixel?
Design
N/A
Acceptance criteria
- A proof-of-concept, perhaps using the Popups repo as a test case.
Communication criteria - does this need an announcement or discussion?
- N/A
