Skip to content

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