Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Responsive "layout preview" mode #179

Open
ghost opened this issue Nov 26, 2021 · 0 comments
Open

Responsive "layout preview" mode #179

ghost opened this issue Nov 26, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@ghost
Copy link

ghost commented Nov 26, 2021

Like TailwindUI have for showing their UI components, you can resize them to see the look of it in lower resolutions like tablet or mobile.

Media queries works because they use a iframe logic with the srcdoc attribute which allow you to pass HTML content directly inside this attribute.

Since it may be an heavy operation to have all those iframes, i think the way i see it is by adding a new layout action with a double horizontal arrow which generate on-the-fly the <iframe> below the div layout preview to avoid having a really big DOM with iframe for each layouts previewed (maybe it will not be that heavy to have all iframes loaded but hidden, need to do some tests).

So when this action is clicked, the div containing the preview is hidden and the iframe one shows instead.
A resize UI element display to test the layout behavior when you change it's width (only horizontal resizing)

To go out of resize mode, you have to click on the resize layout action which is the only layout action displayed in this mode (to avoid unexpected behavior) and we could even bind some keys to go out like ESC key maybe.

Screenshot

image

@ghost ghost added the enhancement New feature or request label Nov 26, 2021
@maelys-pilotin maelys-pilotin assigned ghost Jan 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

0 participants