4.0.0.alpha1
Pre-releaseAlmost 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:
--inlinegenerator option now generates inline template. Use--callto generate#callmethod.Joel Hawksley
-
BREAKING: Remove
use_deprecated_instrumentation_nameconfiguration option. Events will always userender.view_componentname.Joel Hawksley
-
BREAKING: Remove
preview_sourcefunctionality. Consider using Lookbook instead.Joel Hawksley
-
BREAKING: Use
Nokogiri::HTML5instead ofNokogiri::HTML4for 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 componentis 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_componentandrendermonkey 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_contextfor picking templates instead of the request format.3.15 added support for using templates that match the request format, i.e. if
/resource.csvis requested then
ViewComponents would pick_component.csv.erbover_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 theAcceptheader
or because the controller uses arespond_toblock 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_slotprivate. Remove unusedComponentErrorclass.Joel Hawksley
-
Fix bug where request-aware helpers did not work outside of the request context.
Joel Hawksley, Stephen Nelson
-
ViewComponentsSystemTestControllershould 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
#formatmethods that returnednil.Joel Hawksley
-
Clean up project dependencies, relaxing versions of development gems.
Joel Hawksley
-
Test against
turbo-railsv2.Joel Hawksley
-
Test against
rspec-railsv7.Joel Hawksley
-
Remove unnecessary usage of
ruby2_keywords.Joel Hawksley
-
Remove unnecessary
respond_tochecks.Tiago Menegaz, Joel Hawksley
-
Do not include internal
DocsBuilderComponentorYARD::MattrAccessorHandlerin published gem.Joel Hawksley
-
Only lock to
concurrent-ruby1.3.4for 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_namewill be removed in v4.Joel Hawksley
-
Run RSpec tests in CI.
Joel Hawksley