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(ui): shared button styles #9575

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

suneettipirneni
Copy link
Member

@suneettipirneni suneettipirneni commented May 15, 2023

Please describe the changes this PR makes and why it should be merged:

Adds the shared button styles to /ui for reusability.

🤖 Generated by Copilot at 11b8e38

  • Remove unused dependency class-variance-authority from apps/website package to reduce bundle size and avoid conflicts (link)
  • Change imports of buttonVariants from local files to @discordjs/ui modules in apps/website files to use consistent and customizable button variants from the library (link, link, link, link, link, link, link)
  • Add exports field to packages/ui/package.json to define entry points and submodules of @discordjs/ui package for bundlers and TypeScript (link)
  • Add dependency class-variance-authority to packages/ui/package.json to handle variance of class components in @discordjs/ui package (link)
  • Export buttonVariants as a separate module in packages/ui/src/lib/index.ts to expose them to the website and the library (link)
  • Rename apps/website/src/styles/Button.tsx to packages/ui/src/lib/styles/Button.ts to move button variants module to the library (link)
  • Add moduleResolution option to tsconfig.json files in apps/website and packages/ui to enable TypeScript to resolve @discordjs/ui package as a node-compatible or bundler-compatible module (link, link)
  • Add src/lib/styles/Button.ts to optimizeDeps.include array in packages/ui/vite.config.ts to instruct Vite to pre-bundle button variants module for performance and compatibility (link)

@suneettipirneni suneettipirneni requested review from a team and iCrawl as code owners May 15, 2023 21:07
@vercel
Copy link

vercel bot commented May 15, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
discord-js ❌ Failed (Inspect) May 15, 2023 9:09pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
discord-js-guide ⬜️ Ignored (Inspect) May 15, 2023 9:09pm

@codecov
Copy link

codecov bot commented May 15, 2023

Codecov Report

Merging #9575 (11b8e38) into main (590f5bc) will increase coverage by 0.06%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main    #9575      +/-   ##
==========================================
+ Coverage   58.26%   58.32%   +0.06%     
==========================================
  Files         227      226       -1     
  Lines       14881    14864      -17     
  Branches     1133     1132       -1     
==========================================
  Hits         8670     8670              
+ Misses       6171     6154      -17     
  Partials       40       40              
Flag Coverage Δ
guide 0.00% <ø> (ø)
website 0.00% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...s/website/src/app/docs/packages/[package]/page.tsx 0.00% <0.00%> (ø)
apps/website/src/app/docs/packages/page.tsx 0.00% <0.00%> (ø)
apps/website/src/app/page.tsx 0.00% <0.00%> (ø)
apps/website/src/components/InstallButton.tsx 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

None yet

1 participant