TrestleAdmin / trestle

A modern, responsive admin framework for Ruby on Rails
https://trestle.io
GNU Lesser General Public License v3.0
1.96k stars 177 forks source link

Hotwire Support #461

Closed spohlenz closed 3 months ago

spohlenz commented 4 months ago

After keeping this development behind closed doors for way too long, I'm excited to finally publicly release one of the largest Trestle updates yet -- the Trestle Hotwire update. This has been a branch two years in the making, and brings the Trestle front-end much more up-to-date and in-line with modern Rails development practices.

Among the things I'm most excited about with this release are the full Stimulus integration, making it easier to override and extend default behavior; Turbo frames, and an easier pathway to real-time updates with Turbo streams; Sass no longer being a required dependency for theming, making it possible to live alongside applications using Tailwind CSS; as well as run-time theming options.

Key Points

Breaking Changes

Where possible, I've tried to avoid breaking changes but there are a few potential pitfalls:

# Define primary and secondary theme colors. Color values may be specified
# as either 3- or 6-digit hex codes, or rgb/hsl() triplets.
config.theme = { primary: "#338ab7", secondary: "#719dc3" }

If you do come across any more, please comment below and I'll update the list.

Deprecations

Associated PRs

Updating & Testing

Update your Gemfile to refer to the hotwire branch of the trestle repository, and related gems as required:

gem "trestle", github: "TrestleAdmin/trestle", branch: "hotwire"

gem "trestle-auth", github: "TrestleAdmin/trestle-auth", branch: "hotwire"
gem "trestle-search", github: "TrestleAdmin/trestle-search", branch: "hotwire" # or branch: "hotwire-filters"
gem "trestle-tinymce", github: "TrestleAdmin/trestle-tinymce", branch: "hotwire"

Next Steps

I am currently running these branches in production on a few of my applications and have managed to fix all of the issues I have myself encountered. As such, I'm hoping that this will be able to be merged and released as 0.10.0 fairly soon.

Following that, I'll be releasing a roadmap outlining the remaining features that I'd like to implement before making a 1.0 release.

If you do find any issues while testing this branch, please report them here (or in the relevant repo's PR linked above).