View Component Versions Save

A framework for building reusable, testable & encapsulated view components in Ruby on Rails.

v3.12.1

1 week ago
  • Ensure content is rendered correctly for forwarded slots.

    Cameron Dutro

v3.12.0

1 week ago
  • Remove offline links from resources.

    Paulo Henrique Meneses

  • Fix templates not being correctly populated when caller location label has a prefix.

    On the upstream version of Ruby, method owners are now included in backtraces as prefixes. This caused the call stack filtering to not work as intended and thus source_location to be incorrect for child ViewComponents, consequently not populating templates correctly.

    Allan Pires, Jason Kim

  • Use component path for generating RSpec files.

    When generating new RSpec files for components, the generator will use the view_component_path value in the config to decide where to put the new spec file. For instance, if the view_component_path option has been changed to app/views/components, the generator will put the spec file in spec/views/components. If the view_component_path doesn't start with app/, then the generator will fall back to spec/components/.

    This feature is enabled via the config.view_component.generate.use_component_path_for_rspec_tests option, defaulting to false. The default will change to true in ViewComponent v4.

    William Mathewson

v3.11.0

2 months ago
  • Fix running non-integration tests under Rails main.

    Cameron Dutro

  • Better name and link for Avo.

    Adrian Marin

  • Document using rack-mini-profiler with ViewComponent.

    Thomas Carr

  • Move dependencies to gemspec.

    Joel Hawksley

  • Include ViewComponent::UseHelpers by default.

    Reegan Viljoen

  • Bump puma in Gemfile.lock.

    Cameron Dutro

  • Add Keenly to users list.

    Vinoth

v3.10.0

3 months ago
  • Fix html escaping in #call for non-strings.

    Reegan Viljoen, Cameron Dutro

  • Add output_preamble to match output_postamble, using the same safety checks.

    Kali Donovan, Michael Daross

  • Exclude html escaping of I18n reserved keys with I18n::RESERVED_KEYS rather than I18n.reserved_keys_pattern.

    Nick Coyne

  • Update CI configuration to use Appraisal.

    Hans Lemuet, Simon Fish

v2.83.0

3 months ago
  • Ensure HTML output safety.

    Cameron Dutro

v3.9.0

3 months ago
  • Don’t break rails stats if ViewComponent path is missing.

    Claudio Baccigalupo

  • Add deprecation warnings for EOL ruby and Rails versions and patches associated with them.

    Reegan Viljoen

  • Add support for Ruby 3.3.

    *Reegan Viljoen*
    
  • Allow translations to be inherited and overridden in subclasses.

    Elia Schito

  • Resolve console warnings when running test suite.

    Joel Hawksley

  • Fix spelling in a local variable.

    Olle Jonsson

  • Avoid duplicating rendered string when output_postamble is blank.

    Mitchell Henke

  • Ensure HTML output safety.

    Cameron Dutro

v3.8.0

4 months ago
  • Use correct value for the config.action_dispatch.show_exceptions config option for edge Rails.

    Cameron Dutro

  • Remove unsupported versions of Rails & Ruby from CI matrix.

    Reegan Viljoen

  • Raise error when uncountable slot names are used in renders_many

    Hugo Chantelauze Reegan Viljoen

  • Replace usage of String#ends_with? with String#end_with? to reduce the dependency on ActiveSupport core extensions.

    halo

  • Don't add ActionDispatch::Static middleware unless public_file_server.enabled.

    Daniel Gonzalez Reegan Viljoen

  • Resolve an issue where slots starting with call would cause a NameError

    Blake Williams

  • Add use_helper API.

    Reegan Viljoen

  • Fix bug where the Rails module wasn't being searched from the root namespace.

    Zenéixe

  • Fix bug where #with_request_url, set the incorrect request.fullpath.

    Nachiket Pusalkar

  • Allow setting method when using the with_request_url test helper.

    Andrew Duthie

v3.7.0

5 months ago
  • Support Rails 7.1 in CI.

    Reegan Viljoen Cameron Dutro

  • Document the capture compatibility patch on the Known issues page.

    Simon Fish

  • Add Simundia to list of companies using ViewComponent.

    Alexandre Ignjatovic

  • Reduce UnboundMethod objects by memoizing initialize_parameters.

    Rainer Borene

  • Improve docs about inline templates interpolation.

    Hans Lemuet

  • Update generators.md to clarify the way of changing config.view_component.view_component_path.

    Shozo Hatta

  • Attempt to fix Ferrum timeout errors by creating driver with unique name.

    Cameron Dutro

v3.6.0

7 months ago
  • Refer to helpers in NameError message in development and test environments.

    Simon Fish

  • Fix API documentation and revert unnecessary change in preview.rb.

    Richard Macklin

  • Initialize ViewComponent::Config with defaults before framework load.

    Simon Fish

  • Add 3.2 to the list of Ruby CI versions

    Igor Drozdov

  • Stop running PVC's docs:preview rake task in CI, as the old docsite has been removed.

    Cameron Dutro

  • Minor testing documentation improvement.

    Travis Gaff

  • Add SearchApi to users list.

    Sebastjan Prachovskij

  • Fix #with_request_url to ensure request.query_parameters is an instance of ActiveSupport::HashWithIndifferentAccess.

    milk1000cc

  • Add PeopleForce to list of companies using ViewComponent.

    Volodymyr Khandiuk

v3.4.0

9 months ago
  • Avoid including Rails url_helpers into Preview class when they're not defined.

    Richard Macklin

  • Allow instrumentation to be automatically included in Server-Timing headers generated by Rails. To enable this set the config config.use_deprecated_instrumentation_name = false. The old key !render.view_component is deprecated: update ActiveSupport::Notification subscriptions to render.view_component.

    Travis Gaff