Skip to content

Releases: ViewComponent/view_component

v2.41.0

21 Oct 18:26
c35300b

Choose a tag to compare

  • Add sprockets-rails development dependency to fix test suite failures when using rails@main.

    Blake Williams

  • Fix Ruby indentation warning.

    Blake Williams

  • Add --parent generator option to specify the parent class.

  • Add config option config.view_component.component_parent_class to change it project-wide.

    Hans Lemuet

  • Update docs to add example for using Devise helpers in tests.

    Matthew Rider

  • Fix bug where with_collection_parameter did not inherit from parent component.

    Will Drexler, Christian Campoli

  • Allow query parameters in with_request_url test helper.

    Javi Martín

  • Add "how to render a component to a string" to FAQ.

    Hans Lemuet

  • Add #render_in to API docs.

    Hans Lemuet

  • Forward keyword arguments from slot wrapper to component instance.

    Cameron Dutro

v2.40.0

09 Sep 16:16
551a519

Choose a tag to compare

  • Replace antipatterns section in the documentation with best practices.

    Blake Williams

  • Add components to rails stats task.

    Nicolas Brousse

  • Fix bug when using Slim and writing a slot whose block evaluates to nil.

    Yousuf Jukaku

  • Add documentation for test helpers.

    Joel Hawksley

v2.39.0

31 Aug 19:43
1c2cf9c

Choose a tag to compare

  • Clarify documentation of with_variant as an override of Action Pack.

    Blake Williams, Cameron Dutro, Joel Hawksley

  • Update docs page to be called Javascript and CSS, rename Building ViewComponents to Guide.

    Joel Hawksley

  • Deprecate Base#with_variant.

    Cameron Dutro

  • Error out in the CI if docs/api.md has to be regenerated.

    Dany Marcoux

v2.38.0

12 Aug 21:53
a1e1ffe

Choose a tag to compare

  • Add --stimulus flag to the component generator. Generates a Stimulus controller alongside the component.

  • Add config option config.view_component.generate_stimulus_controller to always generate a Stimulus controller.

    Sebastien Auriault

v2.37.0

09 Aug 21:35
bf134e8

Choose a tag to compare

  • Clarify slots example in docs to reduce naming confusion.

    Joel Hawksley, Blake Williams

  • Fix error in documentation for render_many passthrough slots.

    Ollie Nye

  • Add test case for conflict with internal @variant variable.

    David Backeus

  • Document decision to not change naming convention recommendation to remove -Component suffix.

    Joel Hawksley

  • Fix typo in documentation.

    Ryo.gift

  • Add inline template example to benchmark script.

    Andrew Tait

  • Fix benchmark scripts.

    Andrew Tait

  • Run benchmarks in CI.

    Joel Hawksley

v2.36.0

28 Jul 17:58
e1c2217

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

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

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

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

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 [email protected] with any questions.

    Joel Hawksley