Skip to content

Bump view_component from 4.0.0.rc5 to 4.0.0 #3616

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

Merged
merged 1 commit into from
Aug 7, 2025

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Aug 4, 2025

Bumps view_component from 4.0.0.rc5 to 4.0.0.

Release notes

Sourced from view_component's releases.

4.0.0

Two years after releasing 3.0.0 and almost six years since 1.0.0, we're proud to ship ViewComponent 4. This release marks a shift towards a Long Term Support model for the project, having reached significant feature maturity. While contributions are always welcome, we're unlikely to accept further breaking changes or major feature additions.

Please report any issues at https://github.com/ViewComponent/view_component/issues.

Breaking changes (production)

  • Remove dependency on ActionView::Base, eliminating the need for capture compatibility patch. In some edge cases, this change may require switching to use the helpers. proxy.

  • Require non-EOL Rails (>= 7.1.0) and Ruby (>= 3.2.0).

  • Remove render_component and render monkey patch configured with render_monkey_patch_enabled.

  • Remove deprecated use_helper(s). Use include MyHelper or helpers. proxy instead.

  • Support compatibility with Dry::Initializer. As a result, EmptyOrInvalidInitializerError will no longer be raised.

  • Remove default initializer from ViewComponent::Base. Previously, ViewComponent::Base defined a catch-all initializer that allowed components without an initializer defined to be passed arbitrary arguments.

  • Remove use_deprecated_instrumentation_name configuration option. Events will always use render.view_component name.

  • Remove unnecessary #format methods that returned nil.

  • Remove support for variant names containing . to be consistent with Rails.

  • Rename internal methods to have __vc_ prefix if they shouldn't be used by consumers. Make internal constants private. Make Collection#components, Slotable#register_polymorphic_slot private. Remove unused ComponentError class.

  • Use ActionView's lookup_context for picking templates instead of the request format.

    3.15 added support for using templates that match the request format, that is if /resource.csv is requested then ViewComponents would pick _component.csv.erb over _component.html.erb.

    With this release, the request format is no longer considered and instead ViewComponent will use the Rails logic for picking the most appropriate template type, that is the csv template will be used if it matches the Accept header or because the controller uses a respond_to block to pick the response format.

Breaking changes (dev/test)

  • Rename config.generate.component_parent_class to config.generate.parent_class.

  • Remove config.test_controller in favor of vc_test_controller_class test helper method.

  • config.component_parent_class is now config.generate.component_parent_class, moving the generator-specific option to the generator configuration namespace.

  • Move previews-related configuration (enabled, route, paths, default_layout, controller) to under previews namespace.

  • config.view_component_path is now config.generate.path, as components have long since been able to exist in any directory.

  • --inline generator option now generates inline template. Use --call to generate #call method.

  • Remove broken integration with rails stats that ignored components outside of app/components.

  • Remove preview_source functionality. Consider using Lookbook instead.

  • Use Nokogiri::HTML5 instead of Nokogiri::HTML4 for test helpers.

  • Move generators to a ViewComponent namespace.

    Before, ViewComponent generators pollute the generator namespace with a bunch of top level items, and claim the generic "component" name.

    Now, generators live in a "view_component" module/namespace, so what was before rails g component is now rails g view_component:component.

New features

  • Add SystemSpecHelpers for use with RSpec.
  • Add support for including Turbo::StreamsHelper.
  • Add template annotations for components with def call.
  • Graduate SlotableDefault to be included by default.
  • Add #current_template accessor and Template#path for diagnostic usage.
  • Reduce string allocations during compilation.

... (truncated)

Changelog

Sourced from view_component's changelog.

4.0.0

Two years after releasing 3.0.0 and almost six years since 1.0.0, we're proud to ship ViewComponent 4. This release marks a shift towards a Long Term Support model for the project, having reached significant feature maturity. While contributions are always welcome, we're unlikely to accept further breaking changes or major feature additions.

Please report any issues at https://github.com/ViewComponent/view_component/issues.

Breaking changes (production)

  • Remove dependency on ActionView::Base, eliminating the need for capture compatibility patch. In some edge cases, this change may require switching to use the helpers. proxy.

  • Require non-EOL Rails (>= 7.1.0) and Ruby (>= 3.2.0).

  • Remove render_component and render monkey patch configured with render_monkey_patch_enabled.

  • Remove deprecated use_helper(s). Use include MyHelper or helpers. proxy instead.

  • Support compatibility with Dry::Initializer. As a result, EmptyOrInvalidInitializerError will no longer be raised.

  • Remove default initializer from ViewComponent::Base. Previously, ViewComponent::Base defined a catch-all initializer that allowed components without an initializer defined to be passed arbitrary arguments.

  • Remove use_deprecated_instrumentation_name configuration option. Events will always use render.view_component name.

  • Remove unnecessary #format methods that returned nil.

  • Remove support for variant names containing . to be consistent with Rails.

  • Rename internal methods to have __vc_ prefix if they shouldn't be used by consumers. Make internal constants private. Make Collection#components, Slotable#register_polymorphic_slot private. Remove unused ComponentError class.

  • Use ActionView's lookup_context for picking templates instead of the request format.

    3.15 added support for using templates that match the request format, that is if /resource.csv is requested then ViewComponents would pick _component.csv.erb over _component.html.erb.

    With this release, the request format is no longer considered and instead ViewComponent will use the Rails logic for picking the most appropriate template type, that is the csv template will be used if it matches the Accept header or because the controller uses a respond_to block to pick the response format.

Breaking changes (dev/test)

  • Rename config.generate.component_parent_class to config.generate.parent_class.

  • Remove config.test_controller in favor of vc_test_controller_class test helper method.

  • config.component_parent_class is now config.generate.component_parent_class, moving the generator-specific option to the generator configuration namespace.

  • Move previews-related configuration (enabled, route, paths, default_layout, controller) to under previews namespace.

  • config.view_component_path is now config.generate.path, as components have long since been able to exist in any directory.

  • --inline generator option now generates inline template. Use --call to generate #call method.

  • Remove broken integration with rails stats that ignored components outside of app/components.

  • Remove preview_source functionality. Consider using Lookbook instead.

  • Use Nokogiri::HTML5 instead of Nokogiri::HTML4 for test helpers.

  • Move generators to a ViewComponent namespace.

    Before, ViewComponent generators pollute the generator namespace with a bunch of top level items, and claim the generic "component" name.

    Now, generators live in a "view_component" module/namespace, so what was before rails g component is now rails g view_component:component.

New features

  • Add SystemSpecHelpers for use with RSpec.
  • Add support for including Turbo::StreamsHelper.
  • Add template annotations for components with def call.
  • Graduate SlotableDefault to be included by default.
  • Add #current_template accessor and Template#path for diagnostic usage.

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added bundler Gemfile dependencies dependencies Pull requests that update a dependency file skip changeset Pull requests that don't change the library output labels Aug 4, 2025
@dependabot dependabot bot requested a review from a team as a code owner August 4, 2025 12:35
@dependabot dependabot bot requested a review from joshblack August 4, 2025 12:35
Copy link

changeset-bot bot commented Aug 4, 2025

⚠️ No Changeset found

Latest commit: e3a8b9b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Bumps [view_component](https://github.com/viewcomponent/view_component) from 4.0.0.rc5 to 4.0.0.
- [Release notes](https://github.com/viewcomponent/view_component/releases)
- [Changelog](https://github.com/ViewComponent/view_component/blob/main/docs/CHANGELOG.md)
- [Commits](ViewComponent/view_component@v4.0.0.rc5...v4.0.0)

---
updated-dependencies:
- dependency-name: view_component
  dependency-version: 4.0.0
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/bundler/view_component-4.0.0 branch from baa602e to e3a8b9b Compare August 4, 2025 18:11
@joshblack joshblack requested a review from jonrohan August 4, 2025 22:20
Copy link
Member

@joshblack joshblack left a comment

Choose a reason for hiding this comment

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

LGTM but wanted to confirm with you @jonrohan 👀

@jonrohan jonrohan added this pull request to the merge queue Aug 7, 2025
Merged via the queue into main with commit 82e18c0 Aug 7, 2025
28 checks passed
@jonrohan jonrohan deleted the dependabot/bundler/view_component-4.0.0 branch August 7, 2025 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bundler Gemfile dependencies dependencies Pull requests that update a dependency file skip changeset Pull requests that don't change the library output
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants