Skip to content

feat: add default height for Repl component #109

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

Merged
merged 6 commits into from
Jun 23, 2023
Merged

Conversation

zqran
Copy link
Contributor

@zqran zqran commented Jun 23, 2023

When using the Repl component as a third-party package, it does not have a default height, so it will cause nothing to be seen in the left editor:

image

If this is adopted, we also need to update the default style of sfc-playground in vue/core. ( related to: vuejs/core#8628 )

@sxzz
Copy link
Member

sxzz commented Jun 23, 2023

But not all apps need put it in whole screen, like Vue docs

@zqran
Copy link
Contributor Author

zqran commented Jun 23, 2023

Yes, maybe 100vh is not a good default value, but Repl should have a default to ensure usability.

In my opinion, when using Repl, it usually has a larger page ratio, so I set 100vh as the default value for it.

@sxzz
Copy link
Member

sxzz commented Jun 23, 2023

For general usage, I think we can pass the style directly, instead of a default height.

<Repl style="height: 100vh" />

@zqran
Copy link
Contributor Author

zqran commented Jun 23, 2023

This is fine, but it's like having an Input component, which is invisible by default and must be set to a height before it can be used. Will this be a little troublesome?

However, there is corresponding sample code in the documentation, so it should be fine.

@sxzz
Copy link
Member

sxzz commented Jun 23, 2023

Maybe we can add width: 100% to fit the parent container.

@zqran
Copy link
Contributor Author

zqran commented Jun 23, 2023

Maybe we can add width: 100% to fit the parent container.

Did you mean height: 100% ?

@sxzz sxzz changed the title feat: update the default style of the Repl component feat: add default height for Repl component Jun 23, 2023
@sxzz sxzz merged commit d9673eb into vuejs:main Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants