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

Remove RBUI mentions from codebase #146

Merged
merged 2 commits into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 2 additions & 59 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,79 +2,22 @@ Rails need a plug n play system for creating streamlined ui components.

Phlex looks fun and fast, so I thought I'd start creating ui components with it.

Here is the list of components that are being built. For reference, see here https://ui.shadcn.com/docs/components/accordion
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That list has not been maintained


✅ Accordion
✅ Alert
✅ Alert Dialog
✅ Aspect Ratio
✅ Avatar
✅ Badge
✅ Button
✅ Calendar
✅ Card
✅ Checkbox
✅ Checkbox Group
✅ Codeblock
✅ Collapsible
⚪️ Combobox
✅ Command
⚪️ Context Menu
⚪️ Data Table
✅ Date Picker
✅ Dialog
✅ Dropdown Menu
⚪️ Form
✅ Hover Card
✅ Input
✅ Label
✅ Link
⚪️ Menubar
⚪️ Navigation Menu
✅ Pagination
✅ Popover
⚪️ Progress
⚪️ Radio Group
⚪️ Scroll Area
⚪️ Select
⚪️ Separator
✅ Sheet
⚪️ Skeleton
⚪️ Slider
⚪️ Switch
⚪️ Table
✅ Tabs
✅ Textarea
⚪️ Toast
⚪️ Toggle
✅ Tooltip
✅ Typography

## Contributing - Local Development Setup

### Install the Gem Locally

To contribute to this project, it's recommended to install the gem locally and point to it in your Gemfile:

```ruby
gem "rbui", path: "../rbui"
gem "ruby_ui", path: "../ruby_ui"
```

### Link the JavaScript Package

Similarly, link the rbui-js package locally using yarn:

```bash
yarn add ../rbui
```

## Working with Components

### Component Development Workflow

1. Eject the component you want to modify using the generator:
```bash
rails generate rbui:component combobox
rails generate ruby_ui:component combobox
```
2. Make your desired changes to the ejected component
3. Once you're satisfied with the modifications, integrate the component back into the gem in the appropriate location
Expand Down
Binary file added app/assets/.DS_Store
Binary file not shown.
37 changes: 30 additions & 7 deletions app/assets/images/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 30 additions & 7 deletions app/assets/images/logo_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions app/views/components/docs/tailwind_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ def view_template

def tailwind_config
<<~CODE
// For importing tailwind styles from rbui gem
// For importing tailwind styles from ruby_ui gem
Copy link
Contributor

@stephannv stephannv Nov 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this whole component can be removed, it is outdated, we don't need to check ruby_ui internal path anymore.

const execSync = require('child_process').execSync;

// Import rbui gem path (To make sure Tailwind loads classes used by rbui gem)
const outputRBUI = execSync('bundle show phlex_ui', { encoding: 'utf-8' });
const rbui_path = outputRBUI.trim() + '/**/*.rb';
// Import ruby_ui gem path (To make sure Tailwind loads classes used by ruby_ui gem)
const outputRUBYUI = execSync('bundle show phlex_ui', { encoding: 'utf-8' });
const ruby_ui_path = outputRUBYUI.trim() + '/**/*.rb';

const defaultTheme = require('tailwindcss/defaultTheme')

Expand All @@ -31,7 +31,7 @@ def tailwind_config
'./app/helpers/**/*.rb',
'./app/assets/stylesheets/**/*.css',
'./app/javascript/**/*.js',
rbui_path
ruby_ui_path
],
theme: {
container: {
Expand Down