Switch from Webpacker to cssbundling-rails, upgrade Tailwind CSS to version 3 #59

Merged
raucao merged 32 commits from dev/cssbundling into master 2022-02-17 14:45:18 +00:00
Owner

The new way to run the server in development is via bin/dev, which will automatically install/start foreman, which in turn manages both the Rails server as well as runs Tailwind compilation with Tailwind JIT and PostCSS enabled.

The old stylesheets (that are built via the normal asset pipeline) are now bundled in a 'legacy.css' file.

The new way to run the server in development is via `bin/dev`, which will automatically install/start foreman, which in turn manages both the Rails server as well as runs Tailwind compilation with Tailwind JIT and PostCSS enabled. The old stylesheets (that are built via the normal asset pipeline) are now bundled in a 'legacy.css' file.
raucao added the
kredits-2
dev environment
labels 2022-02-11 23:30:38 +00:00
raucao added 1 commit 2022-02-11 23:30:39 +00:00
raucao requested review from greg 2022-02-11 23:30:57 +00:00
raucao requested review from bumi 2022-02-11 23:30:57 +00:00
raucao changed title from Switch from Webpacker to cssbundling-rails, upgrade Tailwind CSS to Switch from Webpacker to cssbundling-rails, upgrade Tailwind CSS to version 3 2022-02-11 23:33:10 +00:00
bumi reviewed 2022-02-12 10:38:22 +00:00
@ -8,4 +8,1 @@
<link href="https://assets.kosmos.org/fonts/open-sans/open-sans.css" rel="stylesheet">
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= stylesheet_pack_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
Owner

is the JS here still used? do we use turbolinks and such?

is the JS here still used? do we use turbolinks and such?
Author
Owner

We use turbolinks still, but never added any JavaScript to the folders/templates in app/javascript. The only custom JS we currently use is a little bit of vanilla inline JS in the wallet view.

We use turbolinks still, but never added any JavaScript to the folders/templates in `app/javascript`. The only custom JS we currently use is a little bit of vanilla inline JS in the wallet view.
Author
Owner

My response was wrong, removing JS obviously also removed Turbolinks. I upgraded everything to Rails 7, and it builds everything without Webpacker now, including Turbolinks.

My response was wrong, removing JS obviously also removed Turbolinks. I upgraded everything to Rails 7, and it builds everything without Webpacker now, including Turbolinks.
raucao added 1 commit 2022-02-12 15:34:47 +00:00
raucao added 1 commit 2022-02-12 16:01:29 +00:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is failing Details
05da7f5dac
Bump package version
Author
Owner

Just FYI, since our Gitea webhooks go to a local IP for Drone CI, the builds weren't triggered anymore since the recent upgrade (needed a new config value). I just fixed that (Chef PR incoming), and also enabled branch protection for master here.

Just FYI, since our Gitea webhooks go to a local IP for Drone CI, the builds weren't triggered anymore since the recent upgrade ([needed a new config value](https://github.com/go-gitea/gitea/pull/17482)). I just fixed that (Chef PR incoming), and also enabled branch protection for master here.
raucao added 1 commit 2022-02-12 18:44:23 +00:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is failing Details
878eac083c
Move legacy (S)CSS files to legacy folder
raucao added 1 commit 2022-02-12 19:53:26 +00:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is failing Details
8578fbdad9
Build legacy CSS via cssbundling as well
Add vanilla Sass builds that are also handled by cssbundling-rails.
raucao removed review request for greg 2022-02-12 20:01:10 +00:00
raucao removed review request for bumi 2022-02-12 20:01:12 +00:00
raucao changed title from Switch from Webpacker to cssbundling-rails, upgrade Tailwind CSS to version 3 to WIP: Switch from Webpacker to cssbundling-rails, upgrade Tailwind CSS to version 3 2022-02-12 20:01:18 +00:00
raucao added 1 commit 2022-02-12 20:03:37 +00:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is failing Details
836bd0a977
Build CSS bundles in CI
raucao added 4 commits 2022-02-12 20:13:43 +00:00
c06e58a0fb
Use new lockbox method
The old one conflicts with Rails' own new ActiveRecord encryption
feature.
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
eda1f3999f
Update validation message in spec
They seem to have shortened the default message.
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is failing Details
b71a2fa643
Merge pull request 'Upgrade Rails to 7.0.2, use native JS bundling' (#60) from dev/upgrade_rails into dev/cssbundling
Reviewed-on: #60
raucao added 1 commit 2022-02-12 20:21:31 +00:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is failing Details
f8b86b0a22
Remove obsolete gems
raucao added 1 commit 2022-02-12 20:23:11 +00:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is failing Details
30b2646b85
Fix rake command
raucao added 1 commit 2022-02-12 20:28:11 +00:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is failing Details
0fa6c1a211
Don't pin bootsnap version
raucao added 1 commit 2022-02-12 20:30:41 +00:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is failing Details
ff3013f917
Remove all remains of Webpack
raucao force-pushed dev/cssbundling from 34425ba133 to ff3013f917 2022-02-12 20:37:29 +00:00 Compare
raucao added 1 commit 2022-02-12 20:41:58 +00:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is failing Details
a67f3e466b
Remove bootsnap
raucao added 1 commit 2022-02-12 20:44:15 +00:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is failing Details
e571ed9429
Use vanilla Yarn to build CSS in CI
raucao added 1 commit 2022-02-12 20:53:32 +00:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is failing Details
2a793e9201
Define RAILS_ENV in CI
raucao added 1 commit 2022-02-12 20:55:46 +00:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is failing Details
830c634f88
Explicitly install dev and test gems
raucao added 1 commit 2022-02-12 21:02:41 +00:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is failing Details
562b16cf89
Update Rails CI Docker image
raucao added 4 commits 2022-02-12 21:10:38 +00:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is failing Details
9636671d57
Use rspec binstub in CI
raucao added 1 commit 2022-02-12 21:11:47 +00:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is failing Details
908809bc48
Remove bundler version requirement
raucao force-pushed dev/cssbundling from 7369503c7c to 908809bc48 2022-02-12 21:20:16 +00:00 Compare
raucao added 1 commit 2022-02-12 21:23:23 +00:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is failing Details
1a9b47ceee
Losing the battle
raucao force-pushed dev/cssbundling from b95fbbaeb7 to 1a9b47ceee 2022-02-12 21:27:28 +00:00 Compare
raucao added 1 commit 2022-02-12 21:29:17 +00:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is failing Details
9fdbf27a60
Use rake tasks in CI
raucao added 1 commit 2022-02-12 21:37:51 +00:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is failing Details
565a3c3276
Fix broken name
raucao requested review from bumi 2022-02-12 21:45:00 +00:00
Author
Owner

@bumi I'm having a mean issue with Drone CI. Everything works fine locally, but for some reason, which I was unable to find, it won't load bundled gems anymore in CI.

It works just fine on my machine, and I can't see anything wrong in the various boot-related files. It's all just standard Rails boilerplate. Could you verify that it runs on your machine? And do you perhaps have an idea what the problem could be?

@bumi I'm having a mean issue with Drone CI. Everything works fine locally, but for some reason, which I was unable to find, it won't load bundled gems anymore in CI. It works just fine on my machine, and I can't see anything wrong in the various boot-related files. It's all just standard Rails boilerplate. Could you verify that it runs on your machine? And do you perhaps have an idea what the problem could be?
raucao requested review from greg 2022-02-15 19:53:46 +00:00
Author
Owner

@greg Maybe you have an idea about #59 (comment)?

@bumi The Gitea was down shortly after I asked this, so you may have missed the question, too. Just pinging in case you didn't see it.

@greg Maybe you have an idea about https://gitea.kosmos.org/kosmos/akkounts/pulls/59#issuecomment-4450? @bumi The Gitea was down shortly after I asked this, so you may have missed the question, too. Just pinging in case you didn't see it.
Owner

hmm.. it works well for me locally. all assets seem to load and the app runs.

I don't know what the two bundle config in the drone.yml mean. Is thre something maybe not quite right?

hmm.. it works well for me locally. all assets seem to load and the app runs. I don't know what the two `bundle config` in the drone.yml mean. Is thre something maybe not quite right?
raucao added 1 commit 2022-02-16 15:26:08 +00:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
1c4e444c0b
Adjust bundle options in CI
Author
Owner

I don't know what the two bundle config in the drone.yml mean. Is thre something maybe not quite right?

That was just to ensure that it installs --with development test and via deployment into the ./vendor directory so that gems are cached. The flags are deprecated, so I thought changing it to bundle config just removed those deprecation warnings. (I had changed them to fix the issue in the first place, so something underneath must have changed either way.)

However, I have now adjusted the config to just explicitly enable caching and tell it a cache path (instead of using deployment), and now it works! \o/

> I don't know what the two bundle config in the drone.yml mean. Is thre something maybe not quite right? That was just to ensure that it installs `--with development test` and via `deployment` into the `./vendor` directory so that gems are cached. The flags are deprecated, so I thought changing it to `bundle config` just removed those deprecation warnings. (I had changed them to fix the issue in the first place, so something underneath must have changed either way.) However, I have now adjusted the config to just explicitly enable caching and tell it a cache path (instead of using `deployment`), and now it works! \o/
Author
Owner

@bumi Want to approve the PR now?

@bumi Want to approve the PR now?
raucao added 1 commit 2022-02-16 15:39:02 +00:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
a71a9dfad0
Remove unused helper specs
raucao added 1 commit 2022-02-16 15:41:36 +00:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
6e9b38f04b
Fix deprecation warning from Rails
raucao changed title from WIP: Switch from Webpacker to cssbundling-rails, upgrade Tailwind CSS to version 3 to Switch from Webpacker to cssbundling-rails, upgrade Tailwind CSS to version 3 2022-02-16 15:49:54 +00:00
raucao added 1 commit 2022-02-16 16:15:02 +00:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
5a658ce580
Update RSpec syntax/usage
Fixes a deprecation warning
raucao added 1 commit 2022-02-16 16:46:21 +00:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
cd3e4161b8
Update dev command in README
bumi approved these changes 2022-02-17 11:23:06 +00:00
raucao merged commit 773ea24c5d into master 2022-02-17 14:45:18 +00:00
raucao deleted branch dev/cssbundling 2022-02-17 14:45:27 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: kosmos/akkounts#59
No description provided.