Skip to content

Releases: ViewComponent/view_component

4.6.0

30 Mar 16:04
3e18099

Choose a tag to compare

  • Add view_identifier to the render.view_component instrumentation event payload, containing the path to the component's template file (e.g. app/components/my_component.html.erb). For components using inline render methods, view_identifier will be nil.

    GitHub Copilot

  • Replace deprecated require_dependency with require in preview loading.

    GitHub Copilot

  • Return html_safe empty string from render_in when render? is false.

    GitHub Copilot

4.5.0

26 Feb 17:47
e55c22f

Choose a tag to compare

  • Fix initialization ordering issue causing missing asset errors in Sprockets.

    Cameron Dutro

4.4.0

12 Feb 20:41
9bc0171

Choose a tag to compare

  • Fix segfaults when Ruby coverage is enabled.

    George Holborn, Joel Hawksley

  • Add protocol parameter to with_request_url test helper to enable testing with HTTPS protocol.

    Joel Hawksley

4.3.0

11 Feb 20:40

Choose a tag to compare

  • Fix load order issues for 3rd-party template handlers.

    Cameron Dutro

  • Fix segfault when Ruby coverage is enabled with Rails 8.1 ERB templates.

    George Holborn

  • Automatically merge dependabot PRs.

    Joel Hawksley

  • Use Ruby 4.0.0 in CI and dev.

    Joel Hawksley

4.2.0

09 Jan 21:02

Choose a tag to compare

  • Fix translation scope resolution in deeply nested component blocks (3+ levels). Translations called inside deeply nested slot blocks using renders_many/renders_one were incorrectly resolving to an intermediate component's scope instead of the partial's scope where the block was defined. The fix captures the virtual path at block definition time and restores it during block execution, ensuring translations always resolve relative to where the block was created regardless of nesting depth.

    Nathaniel Watts

  • Allow render_inline with Nokogiri::HTML5 to parse more arbitrary content including bare table content otherwise illegal fragments like <td>.

    Jonathan Rochkind

  • Remove known issue from docs as ActiveScaffold is now compatible with ViewComponent.

    David Löwenfels

  • Add test to document the current behavior for resolving relative translation keys within partial blocks. When rendering a partial, relative translation keys are resolved relative to the partial's own path rather than the caller’s path. This test ensures that this behavior remains consistent.

    Oussama Hilal

  • Allow I18n calls in render?.

    23tux

  • ViewComponent now works without rails and railties gems loaded, enabling compatibility with Bridgetown 2.0.

    Tom Lord

  • Capture partial block in the component's context, allowing access to the component instance inside the block.

    23tux

  • Add after_compile class method hook to enable extensions to run logic after component compilation.

    Jose Solás

  • Fix outdated reference to preview layout configuration in docs.

    Lucas Geron

  • Allow ruby-head CI job to fail without failing workflow.

    Hakan Ensari

  • Fix bug where error line numbers were incorrect in Rails 8.1.

    Joel Hawksley

  • Remove < 8.2 upper bound for activesupport and actionview dependencies.

    Hans Lemuet

  • Test compatibility with Herb/ReActionView.

    Joel Hawksley

  • Remove Who Uses ViewComponent section from docs.

    Joel Hawksley

4.1.1

11 Nov 14:31
3743d2b

Choose a tag to compare

  • Add Consultport to list of companies using ViewComponent.

    Sebastian Nepote

  • Resolve deprecation warning for ActiveSupport::Configurable.

    Simon Fish

  • Make ViewComponent::VERSION accessible to other gems by default.

    Hans Lemuet

  • Added Reinvented Hospitality to the list of companies using ViewComponent.

    Torgil Zechel

3.24.0

11 Nov 20:24
ad294b6

Choose a tag to compare

  • Add Rails 8.1 support to ViewComponent v3.

    Hans Lemuet

4.1.0

22 Oct 23:23
5ebefb3

Choose a tag to compare

  • Add Rails 8.1 support.

    Hans Lemuet

  • Add Carwow to list of companies using ViewComponent.

    Tom Lord

Full Changelog: v4.0.2...v4.1.0

4.0.2

15 Aug 05:42
4bbea1c

Choose a tag to compare

What's Changed

Full Changelog: v4.0.1...v4.0.2

4.0.1

05 Aug 20:03
1ed16e3

Choose a tag to compare

  • Conditionally add the ViewComponent::Base#format method back for Rails 7.1 only.

  • Compute and check lockfiles into source control.

  • Constrain Rails versions in gemfiles to only allow the patch version to vary, eg. ~> 7.1.0 instead of ~> 7.1.

    Cameron Dutro

  • Setup Trusted Publishing to RubyGems to improve software supply chain safety.

    Hans Lemuet