Skip to content

Releases: ViewComponent/view_component

v1.14.0

03 Mar 19:51
da516ce
Compare
Choose a tag to compare
  • Rename ActionView::Component::Base to ViewComponent::Base

    Joel Hawksley

This release renames the bulk of the library to the ViewComponent
namespace, preserving backward compatibility with
ActionView::Component::Base and the associated base classes for now.
This change will allow users of the library to migrate to the next
major version ahead of the major v2 release.

What's changing in the migration

  1. ActionView::Component::Base is now ViewComponent::Base.
  2. Components can only be rendered with render(MyComponent.new) syntax.
  3. Validations are no longer supported by default.

How to migrate to ViewComponent

  1. In application.rb, require view_component/engine
  2. Update components to inherit from ViewComponent::Base.
  3. Update component tests to inherit from ViewComponent::TestCase.
  4. Update component previews to inherit from ViewComponent::Preview.
  5. Include ViewComponent::TestHelpers in your test suite.

v1.13.0

02 Mar 17:11
cd69596
Compare
Choose a tag to compare
  • Allow components to be rendered inside controllers.

    Joel Hawksley

  • Improve backtraces from exceptions raised in templates.

    Blake Williams

v1.12.0

26 Feb 14:45
4ef8152
Compare
Choose a tag to compare
  • Revert: Remove initializer requirement for Ruby 2.7+

    Joel Hawksley

  • Restructure Railtie into Engine

    Sean Doyle

  • Allow components to override before_render_check

    Joel Hawksley

v1.11.1

19 Feb 23:48
971109e
Compare
Choose a tag to compare
  • Relax Capybara requirement.

    Joel Hawksley

v1.11.0

19 Feb 22:52
3906ed4
Compare
Choose a tag to compare
  • Add support for Capybara matchers.

    Joel Hawksley

  • Add erb, haml, & slim template generators

    Asger Behncke Jacobsen

v1.10.0

14 Feb 22:54
0ce7bd4
Compare
Choose a tag to compare
  • Deprecate all render syntaxes except for render(MyComponent.new(foo: :bar))

    Joel Hawksley

Note: To avoid deprecation warnings, it's recommended to update your application to use the render(MyComponent.new(foo: :bar) syntax before upgrading to this version.

v1.9.0

14 Feb 22:06
12f52a4
Compare
Choose a tag to compare
  • Remove initializer requirement for Ruby 2.7+

    Dylan Clark

Note: We will soon be deprecating several render syntaxes. Read more here: #206

v1.8.1

24 Jan 18:35
4935a06
Compare
Choose a tag to compare
  • Run validation checks before calling #render?.

    Ash Wilson

v1.8.0

23 Jan 17:52
4c002e9
Compare
Choose a tag to compare
  • Remove the unneeded ComponentExamplesController and simplify preview rendering.

    Jon Palmer

  • Add #render? hook to easily allow components to be no-ops.

    Kyle Fox

  • Don't assume ApplicationController exists.

    Jon Palmer

  • Allow some additional checks to overrided render?

    Sergey Malykh

  • Fix generator placing namespaced components in the root directory.

    Asger Behncke Jacobsen

  • Fix cache test.

    Sergey Malykh

v1.7.0

09 Jan 23:21
765afb3
Compare
Choose a tag to compare
  • Simplify validation of templates and compilation.

    Jon Palmer

  • Add support for multiple content areas.

    Jon Palmer