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

How to resize previews in pages? #469

Closed
dkniffin opened this issue May 17, 2023 · 3 comments
Closed

How to resize previews in pages? #469

dkniffin opened this issue May 17, 2023 · 3 comments
Labels
bug Something isn't working v2.x Issues/PRs that affect the v2.x line of releases

Comments

@dkniffin
Copy link

Is your feature request related to a problem? Please describe

I am creating docs using the pages feature. With it, I'm using the embed helper to render a component. The embed works correctly. However, it's only about 200px tall, and it's hard to see the large component.

Describe the solution you'd like

I would like an option to resize the embed. Something like a height param would work. Or a style param that I can pass CSS to.

Describe alternatives you've considered

I did look into passing a style param. It looks like the JS supports that. However, the component does not. Even so, when I manually include <lookbook-embed style="height: 1000px" ...>, the height is not kept around. As far as I can tell, that's due to the iframe-resizer library, but I'm not sure.

@dkniffin dkniffin added the feature request A suggestion for a feature or enhancement label May 17, 2023
@allmarkedup
Copy link
Collaborator

@dkniffin the embeds should automatically resize to match the height of the content of the iframe - for example the embed here: http://demo.lookbook.build/lookbook/pages/embeds if you add more content via the param fields the iframe height should automatically increase to accommodate the changes.

If that's not happening then it's a bug - could you maybe upload a screenshot of the embedded component? And let me know what browser you are using? Then I can try and dig into it for you.

@allmarkedup allmarkedup added bug Something isn't working v2.x Issues/PRs that affect the v2.x line of releases and removed feature request A suggestion for a feature or enhancement labels May 17, 2023
@dkniffin
Copy link
Author

Hey, sorry I never replied here. I was planning on looking into this pretty quickly after your reply, then never got around to it, and now this feature in my app has been deprioritized 😅 I'll report back here when I eventually look into this.

@allmarkedup
Copy link
Collaborator

@dkniffin no worries! If/when you pick it up again just let me know if you are still running into any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v2.x Issues/PRs that affect the v2.x line of releases
Projects
None yet
Development

No branches or pull requests

2 participants