-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add Admin Tailwind build when generating sandbox #5636
Add Admin Tailwind build when generating sandbox #5636
Conversation
Thanks @spaghetticode. I don't understand why the build file is not present locally only, or if you use the GH version of Solidus, while it's present if you use the RubyGems version. Can you help me? |
@kennyadsl that's because by design we've decided to avoid committing the CSS build file, so it's absent from GH/local copies of the repo. |
Ah, you are right, got it. What do you think about building this file during the installation the default option?
What you did works, but I would hide this technical detail to new users. |
52e6e5d
to
5461604
Compare
@kennyadsl thanks for your comment, I updated the PR description and the code and now the flag is set to |
This facilitates editing sandbox routes and Procfile when installing Tailwind.
This way, we can provide the option to (not) build the Tailwind CSS file and add rake tasks for managing Admin Tailwind assets. The flag is added to the Solidus installer, then passed along when installing the new admin.
The preferred (AKA the only way that fully works) way to start the sanbox is via `bin/dev`. Same thing when installing Solidus from Github or the local filesystem.
5461604
to
26ed5f7
Compare
apply_template_for :authentication, @selected_authentication | ||
apply_template_for :frontend, @selected_frontend | ||
apply_template_for :payment_method, @selected_payment_method | ||
generate "solidus_admin:install #{'--tailwind' if options[:build_admin_tailwind]}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the back and forth (and it might not be related to this PR), but at this point I don't understand in which case we don't need to install Tailwind along with the new admin. I mean, in which circumstances build_admin_tailwind
will be set to false?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now, never. But if for any reason somebody wants to disable it, we give the possibility to do it with rails g solidus:install --no-build-admin-tailwind
, for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
💔 All backports failed
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation and see the Github Action logs for details |
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation and see the Github Action logs for details |
Summary
Fixes #5598
This PR attempts to fix the error
couldn't find file 'solidus_admin/tailwind.css'
when loading admin pages from the sandbox application.The error is caused by the absence of the Admin Tailwind CSS build file, which doesn't exist on (local) copies of the project codebase from GitHub.
The fix adds the new flag
--build-admin-tailwind
to theinstall
process that controls whether to build the CSS file and install the associated rake tasks into the sandbox application. The flag defaults totrue
, so installing Solidus will build Admin Tailwind CSS and add rake tasks. This can be disabled withrails g solidus:install --no-build-admin-tailwind
, seerails g solidus:install --help
for more context.The only effective way to run the server is now via
bin/dev
.Also, the main
README
is updated with the new relevant information.Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
(https://github.com/solidusio/.github/blob/main/CONTRIBUTING.md#writing-good-commit-messages).
The following are not always needed: