8000 Tailwind v4 css configuration by mgrunberg · Pull Request #8649 · activeadmin/activeadmin · GitHub
[go: up one dir, main page]

Skip to content

Tailwind v4 css configuration #8649

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

Draft
wants to merge 16 commits into
base: master
Choose a base branch
from
Draft

Conversation

mgrunberg
Copy link
Contributor

Built on top of #8640

Exploring an idea to move from javascript config to CSS config.

Pros: Use the latest tailwind configuration mechanism (clean IMO).
Cons: There won't be a single way to configure tailwind.

Copy link
codecov bot commented Mar 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.11%. Comparing base (542f7d6) to head (01ed5ba).
Report is 6 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8649   +/-   ##
=======================================
  Coverage   99.11%   99.11%           
=======================================
  Files         141      141           
  Lines        4073     4073           
=======================================
  Hits         4037     4037           
  Misses         36       36           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hasghari
Copy link
Contributor

@mgrunberg Would the configuration be simplified if the view files were published in the NPM package, similar to what #8220 was trying to achieve? I think that would remove the need for the #ACTIVE_ADMIN_GEM# placeholder in the config and allow for referencing the plugin and view files using a relative path.

@mgrunberg
Copy link
Contributor Author

@mgrunberg Would the configuration be simplified if the view files were published in the NPM package, similar to what #8220 was trying to achieve? I think that would remove the need for the #ACTIVE_ADMIN_GEM# placeholder in the config and allow for referencing the plugin and view files using a relative path.

@hasghari Thanks for the contribution, but I'm not ready to reopen the #8220 discussion. That's why I'm still referencing gem files.

Speaking about simplicity, I do have the idea of reducing the usage of #ACTIVE_ADMIN_GEM, but I'm not finding time to come back to the PR.

@amkisko
Copy link
amkisko commented Apr 30, 2025

Hey!

I've successfully moved to tailwind v4 by having both javascript and css configurations within the same setup. Full configuration is here: https://gist.github.com/amkisko/af1b2f7dc4f0f941437ea16400277864

The idea is to use "old" way with custom rake task and javascript configuration file for resolving dynamic paths in pair with @config "../../../config/tailwind-active_admin.config.js"; tailwind v4 config method. ActiveAdmin tailwind plugin does not work, so it requires rewriting to the new v4 syntax fully.

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.

3 participants
0