Skip to content

Add support for Rails 7#23

Merged
jazairi merged 1 commit into
masterfrom
rails-7-support
Apr 8, 2022
Merged

Add support for Rails 7#23
jazairi merged 1 commit into
masterfrom
rails-7-support

Conversation

@jazairi
Copy link
Copy Markdown
Contributor

@jazairi jazairi commented Apr 6, 2022

Why these changes are being introduced:

This gem currently supports Rails 5 and 6 only, but we are starting
to write applications that use Rails 7.

Relevant ticket(s):

MITLibraries/timdex-ui#16

How this addresses that need:

This updates the gemspec to support versions of Rails greater than
or equal to 5 but less than 8.

Side effects of this change:

N/A.

@JPrevost JPrevost self-assigned this Apr 6, 2022
@JPrevost
Copy link
Copy Markdown
Member

JPrevost commented Apr 6, 2022

@jazairi I suspect this is fine, but can you confirm that it still works properly locally with both Rails 6 and Rails 7 apps before we merge and release it? Hit me up on Slack if you want any tips on how to do that.

@jazairi
Copy link
Copy Markdown
Contributor Author

jazairi commented Apr 8, 2022

@JPrevost Confirmed that this does work on Rails 6 and Rails 7 by bundling the gem from source locally with Bento and TIMDEX UI. As we discussed this morning, there's some additional config required in Rails 7, which I'll include in my PR to add the theme gem to TIMDEX UI.

Once thing I should mention is that the theme gem uses sassc-rails as a dependency, which we should move away from as it's unsupported as far as I know. All of the Rails 7 options I'm aware of (dartsass, cssbundler, etc.) require an installation step that I'm not sure how to complete in a Rails Engine. If you have any ideas on how to work around that, let me know. Otherwise, I'd support opening a ticket to investigate further, and merging this as is in the meantime with that risk noted in the commit message.

Copy link
Copy Markdown
Member

@JPrevost JPrevost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the research ticket you noted in your comments so we don't forget to come back to that.

Can you also open ticket to add rails 7 layout features back to the layout template (I believe we'll lose Hotwire support if we use a Rails 6 app template but could be mistaken).

@jazairi
Copy link
Copy Markdown
Contributor Author

jazairi commented Apr 8, 2022

@JPrevost
SASS ticket: #24
Layouts ticket: #25

Why these changes are being introduced:

This gem currently supports Rails 5 and 6 only, but we are starting
to write applications that use Rails 7.

Relevant ticket(s):

MITLibraries/timdex-ui#16

How this addresses that need:

This updates the gemspec to support versions of Rails greater than
or equal to 5 but less than 8.

Side effects of this change:

* This gem still uses sassc, which appears to be unsupported. We
should investigate whether it's possible to use a more modern
CSS preprocessor (see #24).
* Further work may be needed for the this gem to function
alongside advanced Rails 7 UI features like Hotwire and Turbolinks
(see #25).
@jazairi jazairi merged commit d719b0f into master Apr 8, 2022
@jazairi jazairi deleted the rails-7-support branch April 8, 2022 20:10
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.

2 participants