-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: move to ViewComponent 3 + Rails 8 #196
Conversation
which strangely seems to be working
goddamn
@@ -10,7 +10,7 @@ jobs: | |||
fail-fast: false | |||
matrix: | |||
ruby: ['3.2.6', '3.3.6'] | |||
rails: ['6.1.5', '7.0.3'] | |||
rails: ['8.0.1'] |
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.
Vraiment top cette introduction de Rails 8 et ce passage à view component 3
En revanche, view component 3 supporte aussi Rails 7.2 est encore supporté pour longtemps.
Est-ce qu’on ne pourrait pas garder Rails 7 aussi ?
En revanche très partant pour dropper Rails 6 qui n’est plus maintenu.
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.
alors, idéalement oui, le truc c'est qu'en fait cette dépendance à Rails (7 ou 8) n'existe que dans le cadre de développement de dsfr-view-components
. D'ailleurs je me rends compte bien trop tard que l'upgrade à VC3 aurait sûrement pu se faire sans upgrader la dummy app.
Mais sinon, tu peux installer dsfr-view-components dans un projet Rails7 sans problème :
FROM ruby:3.3.6-slim
RUN apt-get update && apt-get install -y build-essential git
RUN gem install rails -v 7.0.0 && \
rails new --minimal app
WORKDIR /app
RUN bundle add dsfr-view-components --github="betagouv/dsfr-view-components" --branch="feat/rails8"
RUN bundle exec gem dep dsfr-view-components | grep -v "development"
# NDLR ceci^ donne ceci :
# #9 [6/6] RUN bundle exec gem dep dsfr-view-components | grep -v "development)"
#9 0.327 Gem dsfr-view-components-2.0.0
#9 0.327 html-attributes-utils (~> 1)
#9 0.327 pagy (~> 6)
#9 0.327 view_component (~> 3)
#9 0.327
#9 DONE 0.3s
CMD ["./bin/rails", "s"]
docker build le_code_au_dessus -t yolo && docker run -t yolo
=> Rails 7.0.8.7 application starting in development
=> Run `bin/rails server --help` for more startup options
Puma starting in single mode...
* Puma version: 5.6.9 (ruby 3.3.6-p108) ("Birdie's Version")
* Min threads: 5
* Max threads: 5
* Environment: development
* PID: 1
* Listening on http://127.0.0.1:3000
* Listening on http://[::1]:3000
Use Ctrl-C to stop
et viva la vida
Calling once |
Calling twice |
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.
entière confiance @freesteph on s’arrangera pour faire marcher si ça ne passe plus chez RDVSP.
Merci d’être toujours motivé pour cette gem, longue vie ruby
@@ -111,5 +111,5 @@ | |||
# config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session | |||
config.public_file_server.enabled = true | |||
config.assets.paths << Rails.root.join('node_modules') | |||
config.assets.paths << Rails.root.join('node_modules', 'govuk-frontend', 'govuk', 'assets', 'fonts') | |||
config.assets.paths << Rails.root.join("node_modules/govuk-frontend/govuk/assets/fonts") |
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.
faudra qu’on supprime cette dépendance sur govuk
je n’ai pas bien saisi la dépendance à |
c'est dans le bootstrap code de Rails8/CSSBundling j'ai pas tout capté mais de toute façon ça saute juste après rails/rails#49241 |
Alors le plus dur c'était surtout la dummy app et de transitionner de Sprockets aux nouveaux trucs. En attendant un avis sur #195, voilà une PR qui nous ramène à l'horizon de la modernité.
Closes #176