Skip to content

Conversation

@TheOrcDev
Copy link
Owner

@TheOrcDev TheOrcDev commented May 30, 2025

Summary by CodeRabbit

  • Refactor
    • Updated all components using the "Press Start 2P" retro font to apply it via a static CSS class instead of dynamic font imports.
    • Removed the dependency on dynamic font loading for the retro font style, simplifying font management across the app.
    • Added a new CSS file that provides the retro font styling and is now included in all relevant components.
  • Chores
    • Updated the component registry to reference the new retro font CSS file where applicable.

@vercel
Copy link

vercel bot commented May 30, 2025

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

Name Status Preview Comments Updated (UTC)
8bitcn-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 30, 2025 9:48pm

@TheOrcDev TheOrcDev merged commit 5a7abef into main May 30, 2025
2 of 3 checks passed
@coderabbitai
Copy link

coderabbitai bot commented May 30, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This change removes all dynamic imports and usage of the "Press Start 2P" Google font via Next.js's font loader from the codebase. Instead, it introduces a static CSS file (retro.css) that imports the font and defines a .retro class, which is now used throughout the project for retro font styling.

Changes

Files / Groups Change Summary
components/ui/8bit/*.tsx, app/blocks/page.tsx, app/page.tsx, app/themes/page.tsx, etc. Removed dynamic Google font import (next/font/google), replaced all pressStart.className with "retro" CSS class, and imported ./styles/retro.css.
components/ui/8bit/styles/retro.css New file: Defines .retro CSS class and imports "Press Start 2P" from Google Fonts.
config/fonts.ts Deleted file: Removed exported pressStart font configuration.
registry.json Added components/ui/8bit/styles/retro.css to the files array for all relevant components.
public/r/8bit-*.json (component registries) Updated documentation/registry to reflect new CSS-based font usage and .retro class.
Component prop types (e.g., BitAccordionTriggerProps) Changed font prop values from `"normal"

Sequence Diagram(s)

sequenceDiagram
    participant Component
    participant retro.css
    participant GoogleFonts

    Component->>retro.css: Import .retro class
    retro.css->>GoogleFonts: @import "Press Start 2P"
    Component->>Component: Apply className="retro" where needed
Loading

Possibly related PRs

  • TheOrcDev/8bitcn-ui#201: Refactors toast component usage, related as both PRs affect toast styling and structure.
  • TheOrcDev/8bitcn-ui#176: Introduced the 8-bit accordion component, which is directly affected by the font styling refactor in this PR.
  • TheOrcDev/8bitcn-ui#193: Added the 8-bit menubar component using dynamic font loading, which is now refactored to use the static .retro class.

Poem

In a field of code, a rabbit hops,
Swapping font loaders for CSS crops.
"retro" now rules, with pixel delight,
No more dynamic fonts in sight!
With one .css, the style is set—
The 8-bit dream is easier to get.
🐰✨

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

app/themes/page.tsx

Oops! Something went wrong! :(

ESLint: 9.27.0

ESLint couldn't find the plugin "eslint-plugin-react-hooks".

(The package "eslint-plugin-react-hooks" was not found when loaded as a Node module from the directory "".)

It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:

npm install eslint-plugin-react-hooks@latest --save-dev

The plugin "eslint-plugin-react-hooks" was referenced from the config file in " » eslint-config-next/core-web-vitals » /node_modules/.pnpm/eslint-config-next@15.3.3_eslint@9.27.0_jiti@2.4.2__typescript@5.8.3/node_modules/eslint-config-next/index.js".

If you still can't figure out the problem, please see https://eslint.org/docs/latest/use/troubleshooting.

components/ui/8bit/accordion.tsx

Oops! Something went wrong! :(

ESLint: 9.27.0

ESLint couldn't find the plugin "eslint-plugin-react-hooks".

(The package "eslint-plugin-react-hooks" was not found when loaded as a Node module from the directory "".)

It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:

npm install eslint-plugin-react-hooks@latest --save-dev

The plugin "eslint-plugin-react-hooks" was referenced from the config file in " » eslint-config-next/core-web-vitals » /node_modules/.pnpm/eslint-config-next@15.3.3_eslint@9.27.0_jiti@2.4.2__typescript@5.8.3/node_modules/eslint-config-next/index.js".

If you still can't figure out the problem, please see https://eslint.org/docs/latest/use/troubleshooting.

components/ui/8bit/alert-dialog.tsx

Oops! Something went wrong! :(

ESLint: 9.27.0

ESLint couldn't find the plugin "eslint-plugin-react-hooks".

(The package "eslint-plugin-react-hooks" was not found when loaded as a Node module from the directory "".)

It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:

npm install eslint-plugin-react-hooks@latest --save-dev

The plugin "eslint-plugin-react-hooks" was referenced from the config file in " » eslint-config-next/core-web-vitals » /node_modules/.pnpm/eslint-config-next@15.3.3_eslint@9.27.0_jiti@2.4.2__typescript@5.8.3/node_modules/eslint-config-next/index.js".

If you still can't figure out the problem, please see https://eslint.org/docs/latest/use/troubleshooting.

  • 42 others

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4612a59 and 2070afb.

📒 Files selected for processing (94)
  • app/blocks/page.tsx (1 hunks)
  • app/docs/components/breadcrumb/page.tsx (3 hunks)
  • app/docs/components/sidebar/page.tsx (1 hunks)
  • app/page.tsx (1 hunks)
  • app/themes/page.tsx (1 hunks)
  • components/site-header.tsx (1 hunks)
  • components/ui/8bit/accordion.tsx (5 hunks)
  • components/ui/8bit/alert-dialog.tsx (2 hunks)
  • components/ui/8bit/alert.tsx (2 hunks)
  • components/ui/8bit/avatar.tsx (3 hunks)
  • components/ui/8bit/badge.tsx (2 hunks)
  • components/ui/8bit/blocks/chart.tsx (1 hunks)
  • components/ui/8bit/blocks/login-form-2.tsx (2 hunks)
  • components/ui/8bit/blocks/login-form-with-image.tsx (2 hunks)
  • components/ui/8bit/blocks/sidebar.tsx (2 hunks)
  • components/ui/8bit/breadcrumb.tsx (8 hunks)
  • components/ui/8bit/calendar.tsx (1 hunks)
  • components/ui/8bit/card.tsx (8 hunks)
  • components/ui/8bit/checkbox.tsx (2 hunks)
  • components/ui/8bit/collapsible.tsx (4 hunks)
  • components/ui/8bit/command.tsx (6 hunks)
  • components/ui/8bit/context-menu.tsx (2 hunks)
  • components/ui/8bit/dialog.tsx (4 hunks)
  • components/ui/8bit/drawer.tsx (8 hunks)
  • components/ui/8bit/dropdown-menu.tsx (4 hunks)
  • components/ui/8bit/hover-card.tsx (1 hunks)
  • components/ui/8bit/input-otp.tsx (3 hunks)
  • components/ui/8bit/input.tsx (2 hunks)
  • components/ui/8bit/label.tsx (2 hunks)
  • components/ui/8bit/menubar.tsx (1 hunks)
  • components/ui/8bit/navigation-menu.tsx (1 hunks)
  • components/ui/8bit/pagination.tsx (8 hunks)
  • components/ui/8bit/popover.tsx (3 hunks)
  • components/ui/8bit/progress.tsx (2 hunks)
  • components/ui/8bit/radio-group.tsx (1 hunks)
  • components/ui/8bit/select.tsx (4 hunks)
  • components/ui/8bit/sheet.tsx (2 hunks)
  • components/ui/8bit/skeleton.tsx (2 hunks)
  • components/ui/8bit/table.tsx (2 hunks)
  • components/ui/8bit/tabs.tsx (2 hunks)
  • components/ui/8bit/textarea.tsx (2 hunks)
  • components/ui/8bit/toast.tsx (2 hunks)
  • components/ui/8bit/toggle-group.tsx (3 hunks)
  • components/ui/8bit/toggle.tsx (2 hunks)
  • components/ui/8bit/tooltip.tsx (1 hunks)
  • config/fonts.ts (0 hunks)
  • public/r/8bit-accordion.json (1 hunks)
  • public/r/8bit-alert-dialog.json (1 hunks)
  • public/r/8bit-alert.json (1 hunks)
  • public/r/8bit-avatar.json (1 hunks)
  • public/r/8bit-badge.json (1 hunks)
  • public/r/8bit-breadcrumb.json (1 hunks)
  • public/r/8bit-calendar.json (1 hunks)
  • public/r/8bit-card.json (1 hunks)
  • public/r/8bit-carousel.json (1 hunks)
  • public/r/8bit-chart.json (2 hunks)
  • public/r/8bit-checkbox.json (1 hunks)
  • public/r/8bit-collapsible.json (1 hunks)
  • public/r/8bit-combo-box.json (1 hunks)
  • public/r/8bit-command.json (1 hunks)
  • public/r/8bit-context-menu.json (1 hunks)
  • public/r/8bit-dialog.json (1 hunks)
  • public/r/8bit-drawer.json (1 hunks)
  • public/r/8bit-dropdown-menu.json (1 hunks)
  • public/r/8bit-hover-card.json (1 hunks)
  • public/r/8bit-input-otp.json (1 hunks)
  • public/r/8bit-input.json (1 hunks)
  • public/r/8bit-label.json (1 hunks)
  • public/r/8bit-login-form-2.json (2 hunks)
  • public/r/8bit-login-form-with-image.json (2 hunks)
  • public/r/8bit-login-form.json (1 hunks)
  • public/r/8bit-login-page.json (1 hunks)
  • public/r/8bit-menubar.json (1 hunks)
  • public/r/8bit-navigation-menu.json (1 hunks)
  • public/r/8bit-pagination.json (1 hunks)
  • public/r/8bit-popover.json (1 hunks)
  • public/r/8bit-progress.json (1 hunks)
  • public/r/8bit-radio-group.json (1 hunks)
  • public/r/8bit-resizable.json (1 hunks)
  • public/r/8bit-scroll-area.json (1 hunks)
  • public/r/8bit-select.json (1 hunks)
  • public/r/8bit-sheet.json (1 hunks)
  • public/r/8bit-sidebar.json (1 hunks)
  • public/r/8bit-skeleton.json (1 hunks)
  • public/r/8bit-slider.json (1 hunks)
  • public/r/8bit-switch.json (1 hunks)
  • public/r/8bit-table.json (1 hunks)
  • public/r/8bit-tabs.json (1 hunks)
  • public/r/8bit-textarea.json (1 hunks)
  • public/r/8bit-toast.json (1 hunks)
  • public/r/8bit-toggle-group.json (1 hunks)
  • public/r/8bit-toggle.json (1 hunks)
  • public/r/8bit-tooltip.json (1 hunks)
  • registry.json (48 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@TheOrcDev TheOrcDev deleted the refactor/make-it-work-everywhere branch May 30, 2025 21:48
Riley1101 pushed a commit to Riley1101/8bitcn-ui that referenced this pull request Jun 8, 2025
TheOrcDev added a commit that referenced this pull request Jun 9, 2025
* added syntax highlight

* Feat/drawer (#195)

* setting up 8bit version of the drawer component, setting up the template for the drawer page and example from shadcn

* made drawer component for content, trigger, footer and header into 8bit pixel style

* added example of drawer component, metadata graph image and ran registry build

* fix issue with dark mode button border not yellow

* reran registry build

* rewrite content component to make use of vaul primitive drawer content and modify drawer handle

* reran registry build

* remove top side for drawer content

* reran registry build

* refactor: update drawer and sheet components styling and positioning

* feat(drawer) change example code

---------

Co-authored-by: OrcDev <urosmiric88@gmail.com>

* chore: add GitHub Sponsors funding configuration file (#197)

* docs: add GitHub sponsor badge to README (#198)

* refactor: update React.ElementRef to React.ComponentRef in UI components for better type safety (#199)

* Feat/toast (#200)

* feat(registry) add toast

* refactor(toast) change to 8-bit toast

* feat(installation-commands) replace sonner with 8-bit toast (#201)

* chore: latest dependencies (#202)

* Feat navigation menu (#203)

* feat: navigation menu

* feat: navigation menu
fix code rabbit ai comments

* feat: navigation menu
- create better, more consistent border behavior
- fix broken links in demo

* feat: navigation menu
fix code rabbit ai comments

* feat: navigation menu
- Address review comment

* feat: navigation menu
- update registry file

* feat(nav-items) add new tag to navigation menu (#204)

* Feat/themes (#205)

* feat(app) add themes page

* feat(themes) add all retro themes

* feat: add theme copy dialog and refactor theme management with TypeScript enums

* style: update calendar sizing, code snippet layout and theme selector text colors

* style: update theme selector UI and adjust accent color values across themes

* style: adjust accent and muted color values in dark and light themes

* feat(themes) add metadata (#206)

* chore: add semicolons and consistent formatting across components (#207)

* chore: latest dependencies (#208)

* feat(button) add local font for react support (#209)

* refactor: replace custom font with Google Fonts for Press Start 2P (#210)

* refactor: move retro font to external CSS and simplify button styling (#211)

* refactor(app) make all components work on react (#212)

* style: add type prefix to VariantProps imports across components (#213)

* refactor: remove new badges from nav items (#214)

* refactor: remove new badge from mobile navigation items (#215)

* fix: adjust YAxis width from 45 to 46 pixels in chart component (#216)

* feat(registry) add bar chart component (#217)

* feat: add authentication and charts blocks pages with example components (#218)

* added syntax highlight

* Removed unused code

* re added Max height control

---------

Co-authored-by: Elias Tran <trandinhphuc1997@gmail.com>
Co-authored-by: OrcDev <urosmiric88@gmail.com>
Co-authored-by: YangZhao <bit.zhaoyang512@gmail.com>
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