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
Bump package version
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
05da7f5dac
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
Move legacy (S)CSS files to legacy folder
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
878eac083c
raucao added 1 commit 2022-02-12 19:53:26 +00:00
Build legacy CSS via cssbundling as well
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
8578fbdad9
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
Build CSS bundles in CI
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
836bd0a977
raucao added 4 commits 2022-02-12 20:13:43 +00:00
The old one conflicts with Rails' own new ActiveRecord encryption
feature.
Update validation message in spec
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
eda1f3999f
They seem to have shortened the default message.
Merge pull request 'Upgrade Rails to 7.0.2, use native JS bundling' (#60) from dev/upgrade_rails into dev/cssbundling
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
b71a2fa643
Reviewed-on: #60
raucao added 1 commit 2022-02-12 20:21:31 +00:00
Remove obsolete gems
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
f8b86b0a22
raucao added 1 commit 2022-02-12 20:23:11 +00:00
Fix rake command
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
30b2646b85
raucao added 1 commit 2022-02-12 20:28:11 +00:00
Don't pin bootsnap version
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
0fa6c1a211
raucao added 1 commit 2022-02-12 20:30:41 +00:00
Remove all remains of Webpack
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
ff3013f917
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
Remove bootsnap
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
a67f3e466b
raucao added 1 commit 2022-02-12 20:44:15 +00:00
Use vanilla Yarn to build CSS in CI
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
e571ed9429
raucao added 1 commit 2022-02-12 20:53:32 +00:00
Define RAILS_ENV in CI
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
2a793e9201
raucao added 1 commit 2022-02-12 20:55:46 +00:00
Explicitly install dev and test gems
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
830c634f88
raucao added 1 commit 2022-02-12 21:02:41 +00:00
Update Rails CI Docker image
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
562b16cf89
raucao added 4 commits 2022-02-12 21:10:38 +00:00
Use rspec binstub in CI
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
9636671d57
raucao added 1 commit 2022-02-12 21:11:47 +00:00
Remove bundler version requirement
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
908809bc48
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
Losing the battle
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
1a9b47ceee
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
Use rake tasks in CI
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
9fdbf27a60
raucao added 1 commit 2022-02-12 21:37:51 +00:00
Fix broken name
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
565a3c3276
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
Adjust bundle options in CI
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
1c4e444c0b
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
Remove unused helper specs
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
a71a9dfad0
raucao added 1 commit 2022-02-16 15:41:36 +00:00
Fix deprecation warning from Rails
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
6e9b38f04b
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
Update RSpec syntax/usage
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
5a658ce580
Fixes a deprecation warning
raucao added 1 commit 2022-02-16 16:46:21 +00:00
Update dev command in README
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
cd3e4161b8
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 description provided.