diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index 3aa7b323..54005550 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -6,62 +6,27 @@ body: - type: markdown attributes: value: | - **Before You Start...** - + Thanks for taking the time to fill out this bug report! This form is only for submitting bug reports. If you have a usage question or are unsure if this is really a bug, make sure to: - Read the [docs](https://radix-vue.com/) - Ask on [Discord Chat](https://chat.radix-vue.com/) - Ask on [GitHub Discussions](https://github.com/shadcn-vue/shadcn-vue/discussions) - - Also try to search for your issue - it may have already been answered or even fixed. - However, if you find that an old, closed issue still persists in the latest version, - you should open a new issue using the form below instead of commenting on the old issue. - - type: textarea - id: bug-env - attributes: - label: Environment - description: Please provide the following information about your environment. - value: | - Developement/Production OS: Windows 10 19043.1110 - Node version: 16.0.0 - Package manager: pnpm@8.6.0 - Radix Vue version: 1.0.0 - Shadcn Vue version: 1.0.0 - Vue version: 3.0.0 - Nuxt version: 3.0.0 - Nuxt mode: universal - Nuxt target: server - CSS framework: tailwindcss@3.3.3 - Client OS: Windows 10 19043.1110 - Browser: Chrome 90.0.4430.212 - render: bash - validations: - required: true - type: input - id: reproduction-link + id: reproduction attributes: - label: Link to minimal reproduction + label: Reproduction description: | - Please provide a link to a minimal reproduction of the bug. - A minimal reproduction is a CodeSandbox, CodePen, or a StackBlitz that contains the bare minimum amount of code needed to show the bug. - A minimal reproduction is required unless you are absolutely sure that the issue is obvious and the provided information is enough to understand the problem + A [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) is **required**, otherwise the issue might be closed without further notice. [**Why?**](https://antfu.me/posts/why-reproductions-are-required) - This is **required** for us to be able to triage your issue in a timely manner. + To get started, you can use the StackBlitz and CodeSandbox playgrounds in shadcn-vue demos: + https://www.shadcn-vue.com/docs/components/accordion.html - Please do not just fill in a random link. The issue will be closed if no valid reproduction is provided. - placeholder: Reproduction Link - validations: - required: true - - type: textarea - id: steps-to-reproduce - attributes: - label: Steps to reproduce - description: | - How do you trigger this bug? Please walk us through it step by step. - Note that you can use [Markdown](https://guides.github.com/features/mastering-markdown/) to format lists and code. - placeholder: Steps to reproduce + or use template presets + https://vite.new + https://nuxt.new + placeholder: Reproduction validations: required: true - type: textarea @@ -73,14 +38,18 @@ body: validations: required: true - type: textarea - id: expected-behavior + id: system-info attributes: - label: Expected behavior - description: A clear and concise description of what you expected to happen. - - type: textarea - id: screenshots + label: System Info + description: Output of `npx envinfo --system --npmPackages vue,@vueuse/core,radix-vue,nuxt,shadcn-vue,shadcn-nuxt,unplugin-auto-import --binaries --browsers` + render: bash + placeholder: System, Binaries, Browsers + validations: + required: true + - type: checkboxes + id: contributes attributes: - label: Conext & Screenshots (if applicable) - description: | - If applicable, provide any additional context or screenshots of the bug. - You can drag and drop images here to add them to the issue. + label: Contributes + options: + - label: I am willing to submit a PR to fix this issue + - label: I am willing to submit a PR with failing tests diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 8c407ce8..9d347542 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -17,8 +17,6 @@ on: - opened # When a labeled '🚀request-deploy' pull request from forked repo, it will be deploy to Cloudflare Pages - labeled - paths: - - 'apps/www/**' # Allows you to run this workflow manually from the Actions tab # eslint-disable-next-line yml/no-empty-mapping-value workflow_dispatch: @@ -86,7 +84,7 @@ jobs: # Run a action to publish docs - name: Publish to Cloudflare Pages - uses: cloudflare/pages-action@v1.5.0 + uses: zernonia/cloudflare-pages-action@v0.0.7 with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} @@ -96,24 +94,11 @@ jobs: gitHubToken: ${{ secrets.GITHUB_TOKEN }} # Optional: Switch what branch you are publishing to. # By default this will be the branch which triggered this workflow - # branch: main + branch: ${{ github.ref == 'refs/heads/dev' && 'dev' || format('refs/pull/{0}/merge', github.event.number) }} # Optional: Change the working directory workingDirectory: apps/www wranglerVersion: '3' - - name: Create PR comment - if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }} - uses: mshick/add-pr-comment@v2 - with: - message: | - ### ⚡ Successfully Cloudflare Pages deployed! - | Name | Link | - | :--- | :--- | - | Latest commit | ${{ github.event.pull_request.head.sha || github.sha }} | - | Latest deploy log | ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | - | Deploy Preview Url | [${{ steps.cloudflare-pages-deploy.outputs.url }}](${{ steps.cloudflare-pages-deploy.outputs.url }}) | - | Environment | ${{ steps.cloudflare-pages-deploy.outputs.environment }} | - - name: Remove label if: ${{ github.event_name == 'pull_request_target' && contains(github.event.label.name, '🚀request-deploy') }} uses: actions/github-script@v6 @@ -126,32 +111,3 @@ jobs: repo: context.repo.repo, name: ['🚀request-deploy'] }) - - # Comment on PR from the fork - comment: - name: Comment - runs-on: ubuntu-latest - - # pull_request_target opened event from forked repo - if: ${{ - github.event_name == 'pull_request_target' && - github.event.action == 'opened' && - github.event.pull_request.head.repo.fork == true - }} - - steps: - - name: Create PR comment - run: | - cat << EOF > comment.md - # ⚠️ \`🚀request-deploy\` label is required for deployment - - This repository is a forked repository. - Due to security reasons, deployment from forked repositories does not happen automatically. - - To request deployment, please add the \`🚀request-deploy\` label to this pull request. - (Only certain members have the ability to add labels.) - EOF - - gh pr comment ${{ github.event.number }} -R ${{ github.repository }} -F comment.md - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/apps/www/.vitepress/config.mts b/apps/www/.vitepress/config.mts index 42998819..b6cf67bd 100644 --- a/apps/www/.vitepress/config.mts +++ b/apps/www/.vitepress/config.mts @@ -3,9 +3,17 @@ import { defineConfig } from 'vitepress' import Icons from 'unplugin-icons/vite' import tailwind from 'tailwindcss' import autoprefixer from 'autoprefixer' +import { createCssVariablesTheme } from 'shiki' + +// import { transformerMetaWordHighlight, transformerNotationWordHighlight } from '@shikijs/transformers' import { siteConfig } from './theme/config/site' import ComponentPreviewPlugin from './theme/plugins/previewer' +const cssVariables = createCssVariablesTheme({ + variablePrefix: '--shiki-', + variableDefaults: {}, +}) + // https://vitepress.dev/reference/site-config export default defineConfig({ title: siteConfig.name, @@ -50,7 +58,11 @@ export default defineConfig({ srcDir: path.resolve(__dirname, '../src'), markdown: { - theme: 'css-variables', + theme: cssVariables, + codeTransformers: [ + // transformerMetaWordHighlight(), + // transformerNotationWordHighlight(), + ], config(md) { md.use(ComponentPreviewPlugin) }, diff --git a/apps/www/.vitepress/theme/components/Kbd.vue b/apps/www/.vitepress/theme/components/Kbd.vue index 7e3bd02c..55428107 100644 --- a/apps/www/.vitepress/theme/components/Kbd.vue +++ b/apps/www/.vitepress/theme/components/Kbd.vue @@ -18,9 +18,9 @@ const kbdClass = computed(() => { { variants: { size: { - xs: 'min-h-[16px] text-[10px] h-4 px-1', - sm: 'min-h-[20px] text-[11px] h-5 px-1', - md: 'min-h-[24px] text-[12px] h-6 px-1.5', + xs: 'min-h-4 text-[10px] h-4 px-1', + sm: 'min-h-5 text-[11px] h-5 px-1', + md: 'min-h-6 text-[12px] h-6 px-1.5', }, }, }, diff --git a/apps/www/.vitepress/theme/config/docs.ts b/apps/www/.vitepress/theme/config/docs.ts index f22bf81c..4f69dc39 100644 --- a/apps/www/.vitepress/theme/config/docs.ts +++ b/apps/www/.vitepress/theme/config/docs.ts @@ -299,6 +299,12 @@ export const docsConfig: DocsConfig = { href: '/docs/components/slider', items: [], }, + { + title: 'Sonner', + href: '/docs/components/sonner', + label: 'New', + items: [], + }, { title: 'Switch', href: '/docs/components/switch', @@ -322,7 +328,6 @@ export const docsConfig: DocsConfig = { { title: 'Toast', href: '/docs/components/toast', - label: 'New', items: [], }, { diff --git a/apps/www/.vitepress/theme/layout/DocsLayout.vue b/apps/www/.vitepress/theme/layout/DocsLayout.vue index 522d776f..1ab12142 100644 --- a/apps/www/.vitepress/theme/layout/DocsLayout.vue +++ b/apps/www/.vitepress/theme/layout/DocsLayout.vue @@ -6,6 +6,7 @@ import EditLink from '../components/EditLink.vue' import { ScrollArea } from '@/lib/registry/default/ui/scroll-area' import { Badge } from '@/lib/registry/default/ui/badge' import RadixIconsCode from '~icons/radix-icons/code' +import RadixIconsExternalLink from '~icons/radix-icons/external-link' import ChevronRightIcon from '~icons/lucide/chevron-right' const $route = useRoute() @@ -20,7 +21,7 @@ const sourceLink = 'https://github.com/radix-vue/shadcn-vue/tree/dev/'