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

feat: adding VTCodeGroup component to the @vue/theme (#46) #50

Merged
merged 1 commit into from
Apr 28, 2022

Conversation

JessicaSachs
Copy link
Contributor

@JessicaSachs JessicaSachs commented Feb 23, 2022

Resolves #46

Adds a VTCodeGroup component to replace https://github.com/vuejs/docs/blob/main/src/guide/scaling-up/TestingApiSwitcher.vue

Also @kiaking it fixes the mobile responsive issues you saw with the original implementation. To test it, I replaced the custom component I pasted above locally. I was looking for a way to demo/test out the component in this repo. Is there any infra for that?

demo.mov

@kiaking kiaking changed the title feat: adding VTCodeGroup component to the @vue/theme feat: adding VTCodeGroup component to the @vue/theme (#46) Feb 23, 2022
@kiaking kiaking added the enhancement New feature or request label Feb 23, 2022
@JessicaSachs
Copy link
Contributor Author

JessicaSachs commented Feb 23, 2022

BTW (just curious)... why aren't we using scoped *styles in this repo?

@kiaking
Copy link
Member

kiaking commented Feb 24, 2022

Wonderful work! 🙌

I was looking for a way to demo/test out the component in this repo. Is there any infra for that?

I think demo folder is used for this purpose 👍

BTW (just curious)... why aren't we using scoped slots in this repo?

Well we do in vitepress folder. The reason we use external css in core is that because at the beginning of this repo, we thought it might be nice to be able to use core component or styles without using Vue component.

Like when we have pure HTML only stuff, we can reuse the same css (like bootstrap css). However, later on, we decided this repo to be Vue website exclusive, I'm thinking to put those css into component with scoped css 😅 And also merge core folder and vitepress folder.

@JessicaSachs
Copy link
Contributor Author

JessicaSachs commented Feb 24, 2022

I think demo folder is used for this purpose 👍

Yeah I had issues with the demo folder because it doesn't pull in all of the code block styles, so when I went to test this, the CodeGroup component didn't look great. Nbd though.

Thx for the explanation about the css. I was so confused about why we wouldn't use scoped styles. Thought there must've been a reason 😂

LMK if you need anything else 🎉

@yyx990803 yyx990803 merged commit b208105 into vuejs:main Apr 28, 2022
@yyx990803
Copy link
Member

New theme has been published and updated in vuejs/docs so feel free to open a PR there to refactor the usage :)

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

Successfully merging this pull request may close these issues.

Code Group Component
3 participants