Skip to content

Update to view_component 4.0#3706

Merged
sandbergja merged 1 commit into
mainfrom
view-component4
Aug 2, 2025
Merged

Update to view_component 4.0#3706
sandbergja merged 1 commit into
mainfrom
view-component4

Conversation

@jcoyne
Copy link
Copy Markdown
Member

@jcoyne jcoyne commented Jul 30, 2025

No description provided.

@jcoyne jcoyne force-pushed the view-component4 branch 5 times, most recently from 917f553 to d679c46 Compare July 31, 2025 15:45
Copy link
Copy Markdown
Contributor

@sandbergja sandbergja left a comment

Choose a reason for hiding this comment

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

Thanks so much for getting Blacklight working with the new ViewComponent release, @jcoyne ! I had a few questions/thoughts.

Comment thread app/components/blacklight/document_component.rb Outdated
@jcoyne jcoyne force-pushed the view-component4 branch 2 times, most recently from 5687371 to adb7238 Compare August 1, 2025 18:41
Comment thread .github/matrix.json
"rails_version": ["7.1.5.1", "7.2.2.1"],
"bootstrap_version": [null],
"view_component_version": ["~> 3.12"],
"view_component_version": ["~> 4.0"],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would it be feasible to test against both 3.x and 4.x?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I believe it is possible, however it's more complex to support both. Is there a reason we can't just bump the version?

Copy link
Copy Markdown
Contributor

@sandbergja sandbergja Aug 1, 2025

Choose a reason for hiding this comment

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

I thought it would be nice for ease of upgrading (i.e. a blacklight application can upgrade blacklight 8 -> 9, and then upgrade view_component 3 -> 4 separately, rather than having them be coupled and do both upgrades at once).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It looks like some of the tests would have to be conditional on what version of view_component is running. 😢

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@sandbergja what do you think of this approach?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks great to me! Thanks @jcoyne !

Copy link
Copy Markdown
Member

@jrochkind jrochkind Aug 2, 2025

Choose a reason for hiding this comment

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

While the tests now allow both (love it, for exact reason @sandbergja says), it doesn't look like the matrix was changed to test both?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think it was @jrochkind : on the most recent commit on main, I see this job, which says "Installing view_component 3.23.2" in the logs for the Install dependencies step, and this job, which says "Installing view_component 4.0.0"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Aha, one with ruby 3.3 and one with 3.4. I was misdirected by this one line changing from ViewComponent 3 to 4 instead of expanding to test both, but now I see, thank you for checking!

Copy link
Copy Markdown
Contributor

@sandbergja sandbergja left a comment

Choose a reason for hiding this comment

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

Thanks, @jcoyne !

@sandbergja sandbergja merged commit a308d50 into main Aug 2, 2025
12 checks passed
@sandbergja sandbergja deleted the view-component4 branch August 2, 2025 04:44
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