gems view_component 4.2.0

one day ago
  • 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

Don't miss a new view_component release

NewReleases is sending notifications on new releases.