Skip to content

Add iframe to show ViewComponent previews

Thomas Hutterer requested to merge viewcomponent_iframe into main

This adds a new "Implementation (ViewComponent) tab to every component in design.gitlab.com

This new tab loads the preview of the ViewComponent from a publicly hosted Lookbook instance, and provides a link to the Lookbook site, where the user can interact with the previews, changing params etc.

The reason we don't iframe the full Lookbook UI but only the default preview, without any controls, is that Lookbook currently doesn't support to render without its global nav. So it would render its left sidebar, taking a lot of space and allowing the user to navigate to a different component inside the iframe, which is weird. I've already opened an issue to get a more iframe-friendly Loobook in the future, maybe.

design_lookbook

Resolves #1428 (closed)

Merge request reports