Skip to content

Replace Bootstrap with Tailwind CSS#19

Merged
bartes merged 3 commits into
mainfrom
tailwind-ui
Jun 3, 2026
Merged

Replace Bootstrap with Tailwind CSS#19
bartes merged 3 commits into
mainfrom
tailwind-ui

Conversation

@bartes

@bartes bartes commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

What & why

The app's UI was built on Bootstrap 5 (via the bootstrap gem + sassc-rails). This PR replaces that with a Tailwind CSS build through the tailwindcss-rails gem — no Node toolchain required — and reskins the UI to the same dark theme used by the Castle Node and Python example apps, so the three demos now share one visual language.

Changes

  • Pipeline: drop the bootstrap and sassc-rails gems; add tailwindcss-rails. Tailwind source is app/assets/stylesheets/application.tailwind.css with design tokens in config/tailwind.config.js, compiled to app/assets/builds/tailwind.css (committed so bin/rails server works without a build step; assets:precompile also rebuilds it for Docker).
  • Views: restyle the layouts (app + Devise), the home page, the Devise/registration/profile forms and the webhooks table with Tailwind utilities and a small shared component layer.
  • Forms: reconfigure simple_form to emit Tailwind field/input/button classes and remove the 373-line Bootstrap simple_form wrapper initializer.
  • JS: replace Bootstrap's JS bundle (navbar toggle, alert dismiss) with a small vanilla helper; keep rails-ujs.
  • README documents the styling setup.

Known limitations

  • The built-in Devise password-recovery screens (not customised in this app) still render the Devise gem defaults; they pick up base/preflight styling but aren't bespoke-themed.
  • The responsive top-nav simply wraps/clips at very narrow widths, matching the current behaviour of the Node and Python demos (no hamburger menu).

bartes added 3 commits June 3, 2026 16:21
Swap the Bootstrap + sassc asset pipeline for a Tailwind CSS build via the
tailwindcss-rails gem (no Node toolchain), and reskin the UI to a dark theme
shared with the Node and Python example apps.

- drop the bootstrap and sassc-rails gems; add tailwindcss-rails
- add config/tailwind.config.js (design tokens) and
  app/assets/stylesheets/application.tailwind.css (base + component layer),
  compiled to the committed app/assets/builds/tailwind.css
- restyle layouts, Devise/registration/profile views, the home page and the
  webhooks table with Tailwind
- reconfigure simple_form to emit Tailwind field/input/button classes and
  remove the Bootstrap simple_form wrappers
- replace Bootstrap's JS (navbar/alert) with a small vanilla helper
- document the styling setup in the README
Keep x86_64-linux, aarch64-linux and the generic ruby platform in the lock so
CI and the Docker build can resolve the platform-specific tailwindcss-ruby gem.
@bartes bartes merged commit 90c248f into main Jun 3, 2026
1 check passed
@bartes bartes deleted the tailwind-ui branch June 6, 2026 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant