Skip to content
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

Codemod v3 slots improvements #1746

Merged
merged 16 commits into from
Jun 29, 2023
Merged

Codemod v3 slots improvements #1746

merged 16 commits into from
Jun 29, 2023

Conversation

kirillplatonov
Copy link

@kirillplatonov kirillplatonov commented May 8, 2023

This PR includes improvements for #1669:

  • Adds rake task to detect legacy slots bin/rails view_component:detect_legacy_slots
  • Adds rake to migrate legacy slots automatically bin/rails view_component:migrate_legacy_slots
  • Adds component previews to codemods view paths
  • Autodetection for Rails view paths
  • Improves uncertain matches detection
  • Updated changelog

@kirillplatonov kirillplatonov changed the title Codemod v3 slots improvements WIP: Codemod v3 slots improvements May 8, 2023
@kirillplatonov kirillplatonov marked this pull request as draft May 8, 2023 10:50
@kirillplatonov kirillplatonov changed the title WIP: Codemod v3 slots improvements Codemod v3 slots improvements May 8, 2023
@kirillplatonov kirillplatonov marked this pull request as ready for review May 8, 2023 16:01
@kirillplatonov kirillplatonov requested a review from Spone May 8, 2023 16:12
docs/CHANGELOG.md Outdated Show resolved Hide resolved
@kirillplatonov
Copy link
Author

@Spone can we merge it at the current state? I included this class in Polaris ViewComponents v1 release and tested upgrade on a couple production apps. It works great.

Even if the current implementation is not perfect it will be beneficial to have it shipped with ViewComponent now when people are doing upgrades to v3. In a couple of months this will be less useful I suppose.

@Spone
Copy link
Collaborator

Spone commented Jun 22, 2023

I agree. What do you think @joelhawksley?

Copy link
Member

@joelhawksley joelhawksley left a comment

Choose a reason for hiding this comment

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

I like the idea of getting this into main even if it isn't perfect ❤️

Gemfile Outdated
@@ -14,7 +14,7 @@ group :test do
gem "cuprite", "~> 0.8"
gem "puma", "~> 5"

gem "selenium-webdriver", "~> 4"
gem "selenium-webdriver", "~> 4", "< 4.9.1"
Copy link
Member

Choose a reason for hiding this comment

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

Do you still need this? I'm wary of introducing such a restriction as it is something we'll have to eventually remove.

Copy link
Author

Choose a reason for hiding this comment

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

Removed it

docs/CHANGELOG.md Show resolved Hide resolved
@kirillplatonov
Copy link
Author

@joelhawksley please note that this PR is a contribution to #1669. We'll need to make a final review there once merged.

@Spone Spone merged commit 3240607 into ViewComponent:codemods/v3-slots Jun 29, 2023
16 of 19 checks passed
@Spone
Copy link
Collaborator

Spone commented Jun 29, 2023

Let's wrap this up in #1669!

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.

3 participants