Releases: ViewComponent/view_component
v3.23.2
-
Include .tt files in published gem. Fixes templates not being available when using generators.
Florian Aßmann
v3.23.1
-
Restore Rake tasks in published gem.
Franz Liedke
v3.23.0
-
Add docs about Slack channel in Ruby Central workspace. (Join us! #oss-view-component). Email [email protected] for an invite.
*Joel Hawksley
-
Do not include internal
DocsBuilderComponent
orYARD::MattrAccessorHandler
in published gem.Joel Hawksley
-
Only lock to
concurrent-ruby
1.3.4
for Rails 6.1.Joel Hawksley
-
Fix generation of ViewComponent documentation that was broken due to HTML safety issues.
Simon Fish
-
Add documentation on how ViewComponent works.
Joel Hawksley
-
Clarify that
config.use_deprecated_instrumentation_name
will be removed in v4.Joel Hawksley
-
Run RSpec tests in CI.
Joel Hawksley
4.0.0.alpha5
-
BREAKING:
config.view_component_path
is nowconfig.generate.path
, as components have long since been able to exist in any directory.Joel Hawksley
-
BREAKING: Remove broken integration with
rails stats
that ignored components outside ofapp/components
.Joel Hawksley
-
Add internal optimization for Ruby object shapes.
Adam Hess, Joel Hawksley
4.0.0.alpha4
-
BREAKING: Remove default initializer from
ViewComponent::Base
. Previously,ViewComponent::Base
defined a catch-all initializer that allowed components without an initializer defined to be passed arbitrary arguments.Joel Hawksley
-
Graduate
SlotableDefault
to be included by default.Joel Hawksley
-
Fix bug in
SlotableDefault
where default couldn't be overridden when content was passed as a block.Bill Watts, Joel Hawksley
4.0.0.alpha3
-
BREAKING: Remove dependency on
ActionView::Base
, eliminating the need for capture compatibility patch.Cameron Dutro
4.0.0.alpha2
-
Add
#current_template
accessor andTemplate#path
for diagnostic usage.Joel Hawksley
4.0.0.alpha1
Almost six years after releasing v1.0.0, we're proud to ship the first alpha release of ViewComponent 4. This release marks a shift towards a Long Term Support model for the project, having reached significant feature maturity. While contributions are always welcome, we're unlikely to accept further breaking changes or major feature additions.
Please test this release and report any issues to this repository.
-
BREAKING:
--inline
generator option now generates inline template. Use--call
to generate#call
method.Joel Hawksley
-
BREAKING: Remove
use_deprecated_instrumentation_name
configuration option. Events will always userender.view_component
name.Joel Hawksley
-
BREAKING: Remove
preview_source
functionality. Consider using Lookbook instead.Joel Hawksley
-
BREAKING: Use
Nokogiri::HTML5
instead ofNokogiri::HTML4
for test helpers.Noah Silvera, Joel Hawksley
-
BREAKING: Move generators to a ViewComponent namespace.
Before, ViewComponent generators pollute the generator namespace with a bunch of top level items, and claim the generic "component" name.
Now, generators live in a "view_component" module/namespace, so what was before
rails g component
is nowrails g view_component:component
.Paul Sadauskas
-
BREAKING: Require non-EOL Rails (
>= 7.1.0
).Joel Hawksley
-
BREAKING: Require non-EOL Ruby (
>= 3.2.0
).Joel Hawksley
-
BREAKING: Remove
render_component
andrender
monkey patch configured withrender_monkey_patch_enabled
.Joel Hawksley
-
BREAKING: Remove support for variant names containing
.
to be consistent with Rails.Stephen Nelson
-
BREAKING: Use ActionView's
lookup_context
for picking templates instead of the request format.3.15 added support for using templates that match the request format, i.e. if
/resource.csv
is requested then
ViewComponents would pick_component.csv.erb
over_component.html.erb
.With this release, the request format is no longer considered and instead ViewComponent will use the Rails logic
for picking the most appropriate template type, i.e. the csv template will be used if it matches theAccept
header
or because the controller uses arespond_to
block to pick the response format.Stephen Nelson
-
BREAKING: Rename internal methods to have
__vc_
prefix if they shouldn't be used by consumers. Make internal constants private. MakeCollection#components
,Slotable#register_polymorphic_slot
private. Remove unusedComponentError
class.Joel Hawksley
-
Fix bug where request-aware helpers did not work outside of the request context.
Joel Hawksley, Stephen Nelson
-
ViewComponentsSystemTestController
should not be useable outside of test environmentJoel Hawksley, Stephen Nelson
-
Remove unnecessary ENABLE_RELOADING test suite flag.
Joel Hawksley
-
Add test coverage for uncovered code.
Joel Hawksley
-
Remove unnecessary
#format
methods that returnednil
.Joel Hawksley
-
Clean up project dependencies, relaxing versions of development gems.
Joel Hawksley
-
Test against
turbo-rails
v2
.Joel Hawksley
-
Test against
rspec-rails
v7
.Joel Hawksley
-
Remove unnecessary usage of
ruby2_keywords
.Joel Hawksley
-
Remove unnecessary
respond_to
checks.Tiago Menegaz, Joel Hawksley
-
Do not include internal
DocsBuilderComponent
orYARD::MattrAccessorHandler
in published gem.Joel Hawksley
-
Only lock to
concurrent-ruby
1.3.4
for Rails 6.1.Joel Hawksley
-
Fix generation of ViewComponent documentation that was broken due to HTML safety issues.
Simon Fish
-
Add documentation on how ViewComponent works.
Joel Hawksley
-
Clarify that
config.use_deprecated_instrumentation_name
will be removed in v4.Joel Hawksley
-
Run RSpec tests in CI.
Joel Hawksley
v3.22.0
-
Rewrite
ViewComponents at GitHub
documentation as more generalBest practices
.Phil Schalm, Joel Hawksley
-
Add unused mechanism for inheriting config from parent modules to enable future engine-local configuration.
Simon Fish
-
Improve handling of malformed component edge case when mocking components in tests.
Martin Meyerhoff, Joel Hawksley
-
Clarify error message about render-dependent logic.
Error messages about render-dependent logic were sometimes inaccurate, saying
during initialization
despite also being raised after a component had been initialized but before it was rendered.Joel Hawksley
-
Remove JS and CSS docs as they proved difficult to maintain and lacked consensus.
Joel Hawksley
-
Do not prefix release tags with
v
, per recommendation from @bkuhlmann.Joel Hawksley
-
Add ruby 3.4 support to CI.
Reegan Viljoen
-
Add HomeStyler AI to list of companies using ViewComponent.
JP Balarini
-
Add Content Harmony & Learn To Be to list of companies using ViewComponent.
Kane Jamison
v3.21.0
-
Updates testing docs to include an example of how to use with RSpec.
Rylan Bowers
-
Add
--skip-suffix
option to component generator.KAWAKAMI Moeki
-
Add FreeATS to list of companies using ViewComponent.
Ilia Liamshin
-
Ensure HTML output safety wrapper is used for all inline templates.
Joel Hawksley
-
Expose
.identifier
method as part of public API.Joel Hawksley
-
Add rails 8 support to CI.
Reegan Viljoen
-
Updates ActionText compatibility documentation to reference
rich_textarea_tag
for Rails 8.0 support.Alvin Crespo