Releases: ViewComponent/view_component
v1.14.0
-
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
ActionView::Component::Base
is nowViewComponent::Base
.- Components can only be rendered with
render(MyComponent.new)
syntax. - Validations are no longer supported by default.
How to migrate to ViewComponent
- In
application.rb
, requireview_component/engine
- Update components to inherit from
ViewComponent::Base
. - Update component tests to inherit from
ViewComponent::TestCase
. - Update component previews to inherit from
ViewComponent::Preview
. - Include
ViewComponent::TestHelpers
in your test suite.
v1.13.0
-
Allow components to be rendered inside controllers.
Joel Hawksley
-
Improve backtraces from exceptions raised in templates.
Blake Williams
v1.12.0
-
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
-
Relax Capybara requirement.
Joel Hawksley
v1.11.0
-
Add support for Capybara matchers.
Joel Hawksley
-
Add erb, haml, & slim template generators
Asger Behncke Jacobsen
v1.10.0
-
Deprecate all
render
syntaxes except forrender(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
v1.8.1
-
Run validation checks before calling
#render?
.Ash Wilson
v1.8.0
-
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
-
Simplify validation of templates and compilation.
Jon Palmer
-
Add support for multiple content areas.
Jon Palmer