Skip to content

add nested sidebar#407

Open
kashiftariq1997 wants to merge 45 commits intoruby-ui:mainfrom
kashiftariq1997:feature/add-nested-sidebar
Open

add nested sidebar#407
kashiftariq1997 wants to merge 45 commits intoruby-ui:mainfrom
kashiftariq1997:feature/add-nested-sidebar

Conversation

@kashiftariq1997
Copy link

Add nested sidebar example with icon rail
Adds a new "Nested sidebar" example to the sidebar docs page. Demonstrates a two-panel sidebar layout where clicking an icon on the left rail switches the content panel on the right.

  • Icon rail with 4 sections: Home, Favorites, Workspaces, Settings
  • Content panels toggle via a lightweight Stimulus controller
  • Collapses to icon-only rail when sidebar is toggled
  • User avatar with dropdown menu at the bottom of the rail
  • Uses same item names as existing sidebar examples for consistency

- Create ruby_ui.gemspec with gem metadata and dependencies
- Add lib/ruby_ui/version.rb defining RubyUI::VERSION
- Implement Rails generators:
  - ruby_ui:component - Generate individual components from app/components/ruby_ui
  - ruby_ui:component:all - Generate all available components
  - ruby_ui:install - Install RubyUI with dependencies
  - ruby_ui:install:docs - Install component documentation
- Add JavaScript package management utilities (npm, yarn, pnpm, importmap support)
- Include dependencies.yml for component dependency tracking
- Add initializer and Tailwind CSS templates for installation
- Updated component_generator.rb, all_generator.rb, docs_generator.rb, and install_generator.rb to handle Rails loading more gracefully.
- Wrapped generator definitions in conditional checks to prevent errors if Rails is not available.
- Improved structure and readability of generator methods for better maintainability.
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