Skip to content

Releases: ViewComponent/view_component

v2.36.0

28 Jul 17:58
e1c2217
Compare
Choose a tag to compare
  • Add slot_type helper method.

    Jon Palmer

  • Add test case for rendering a ViewComponent with slots in a controller.

    Simon Fish

  • Add example ViewComponent to documentation landing page.

    Joel Hawksley

  • Set maximum line length to 120.

    Joel Hawksley

  • Setting a collection slot with the plural setter (component.items(array) for renders_many :items) returns the array of slots.

    Jon Palmer

  • Update error messages to be more descriptive and helpful.

    Joel Hawksley

  • Raise an error if the slot name for renders_many is :contents

    Simon Fish

v2.35.0

02 Jul 21:22
3a6a2d7
Compare
Choose a tag to compare
  • Only load assets for Preview source highlighting if previews are enabled.

    Joel Hawksley

  • Fix references to moved documentation files.

    Richard Macklin

  • Ensure consistent indentation with Rubocop.

    Joel Hawksley

  • Bump activesupport upper bound from < 7.0 to < 8.0.

    Richard Macklin

  • Add ERB Lint for a few basic rules.

    Joel Hawksley

  • Sort gemspec dependencies alphabetically.

    Joel Hawksley

  • Lock method_source at 1.0 to avoid open-ended dependency.

    Joel Hawksley

  • Require all PRs to include changelog entries.

    Joel Hawksley

  • Rename test app and move files under /test/sandbox.

    Matt-Yorkley

  • Make view_component_path config option available on ViewComponent::Base.

    Matt-Yorkley

  • Add @boardfish to Triage.

    Joel Hawksley

  • Adds support to change default components path (app/components) with config.view_component.view_component_path.

    lfalcao

  • Rename private instance variables (such as @variant) to reduce potential conflicts with subclasses.

    Joel Hawksley

  • Add documentation for configuration options.

    Joel Hawksley

  • Add view helper preview_source for rendering a source code preview below previews.

  • Add config option config.view_component.show_previews_source for enabling the source preview.

    Johannes Engl

  • Add documentation for compatibility with ActionText.

    Jared Planter

v2.34.0

09 Jun 23:06
460d743
Compare
Choose a tag to compare
  • Add the ability to enable ActiveSupport notifications (!render.view_component event) with config.view_component.instrumentation_enabled.

    Svyatoslav Kryukov

  • Add Generators page to documentation.

    Hans Lemuet

  • Fix bug where ViewComponents did not work in ActionMailers.

    dark-panda

v2.33.0

02 Jun 22:00
8db6f29
Compare
Choose a tag to compare
  • Add support for _iteration parameter when rendering in a collection

    Will Cosgrove

  • Don't raise an error when rendering empty components.

    Alex Robbin

v2.32.0

21 May 18:43
b436bd2
Compare
Choose a tag to compare
  • Enable previews by default in test environment.

    Edouard Piron

  • Fix test helper compatibility with Rails 7.0, TestRequest, and TestSession.

    Leo Correa

  • Add experimental _output_postamble lifecyle method.

    Joel Hawksley

  • Add compatibility notes on FAQ.

    Matheus Richard

  • Add Bridgetown on Compatibility documentation.

    Matheus Richard

  • Are you interested in building the future of ViewComponent? GitHub is looking to hire a Senior Engineer to work on Primer ViewComponents and ViewComponent. Apply here: US/Canada / Europe. Feel free to reach out to joelhawksley@github.com with any questions.

    Joel Hawksley

v2.31.1

27 Apr 21:29
5be9d67
Compare
Choose a tag to compare
  • Fix DEPRECATION WARNING: before_render_check when compiling ViewComponent::Base

    Dave Kroondyk

v2.31.0

26 Apr 18:05
73051f6
Compare
Choose a tag to compare
  • Add #with_content to allow setting content without a block.

    Jordan Raine, Manuel Puyol

  • Add with_request_url test helper.

    Mario Schüttel

  • Improve feature parity with Rails translations

    • Don't create a translation backend if the component has no translation file

    • Mark translation keys ending with html as HTML-safe

    • Always convert keys to String

    • Support multiple keys

      Elia Schito

  • Fix errors on asset_url helpers when asset_host has no protocol.

    Elia Schito

  • Prevent slots from overriding the #content method when registering a slot with that name.

    Blake Williams

  • Deprecate with_slot in favor of the new slots API.

    Manuel Puyol

v2.29.0

02 Apr 18:44
36f4ecb
Compare
Choose a tag to compare
  • Allow Slot lambdas to share data from the parent component and allow chaining on the returned component.

    Sjors Baltus, Blake Williams

  • Experimental: Add ViewComponent::Translatable

    • t and translate now will look first into the sidecar YAML translations file.
    • helpers.t and I18n.t still reference the global Rails translation files.
    • l and localize will still reference the global Rails translation files.

    Elia Schito

  • Fix rendering output of pass through slots when using HAML.

    Alex Robbin, Blake Williams

  • Experimental: call ._sidecar_files to fetch the sidecar files for a given list of extensions, e.g. passing ["yml", "yaml"].

    Elia Schito

  • Fix bug where a single jbuilder template matched multiple template handlers.

    Niels Slot

v2.28.0

16 Mar 15:48
9f813e8
Compare
Choose a tag to compare
  • Include SlotableV2 by default in Base. Note: It's no longer necessary to include ViewComponent::SlotableV2 to use Slots.

    Joel Hawksley

  • Prepend Preview routes instead of appending, accounting for cases where host application has catchall route.

    Joel Hawksley

  • Fix bug where blocks passed to lambda slots will render incorrectly in certain situations.

    Blake Williams

v2.27.0

08 Mar 19:53
c44f940
Compare
Choose a tag to compare
  • Allow customization of the controller used in component tests.

    Alex Robbin

  • Generate preview at overridden path if one exists when using --preview flag.

    Nishiki Liu