PhlexUI / phlex_ui

Ruby gem for Phlex UI Components
https://phlexui.com/
MIT License
115 stars 11 forks source link

Integrate JavaScript Close to Ruby Components in PhlexUI #57

Open cirdes opened 1 week ago

cirdes commented 1 week ago

Description

Inspired by the ViewComponent framework, I propose that Stimulus Controllers and PhlexUI components share the same folder structure. This approach will create a seamless connection between Ruby components and their corresponding JavaScript logic, enhancing the developer experience and maintaining consistency within the application.

https://viewcomponent.org/guide/javascript_and_css.html#stimulus

app/view/components
├── ...
├── example
 |   ├── component.rb
 |   └── component_controller.js
├── ...

Benefits