1,000+ days and 100+ releases later, the 200+ contributors to ViewComponent are proud to ship v3.0.0!
We're so grateful for all the work of community members to get us to this release. Whether it’s filing bug reports, designing APIs in long-winded discussion threads, or writing code itself, ViewComponent is built by the community, for the community. We couldn’t be more proud of what we’re building together ❤️
This release makes the following breaking changes, many of which have long been deprecated:
-
BREAKING: Remove deprecated slots setter methods. Use
with_SLOT_NAME
instead.Joel Hawksley
-
BREAKING: Remove deprecated SlotsV1 in favor of current SlotsV2.
Joel Hawksley
-
BREAKING: Remove deprecated
content_areas
feature. Use Slots instead.Joel Hawksley
-
BREAKING: Remove deprecated support for loading ViewComponent engine manually. Make sure
require "view_component/engine"
is removed fromGemfile
.Joel Hawksley
-
BREAKING: Remove deprecated
generate_*
methods. Usegenerate.*
instead.Joel Hawksley
-
BREAKING: Remove deprecated
with_variant
method.Joel Hawksley
-
BREAKING: Remove deprecated
rendered_component
in favor ofrendered_content
.Joel Hawksley
-
BREAKING: Remove deprecated
config.preview_path
in favor ofconfig.preview_paths
.Joel Hawksley
-
BREAKING: Support Ruby 2.7+ instead of 2.4+
Joel Hawksley
-
BREAKING: Remove deprecated
before_render_check
.Joel Hawksley
-
BREAKING: Change counter variable to start iterating from
0
instead of1
.Frank S
-
BREAKING:
#SLOT_NAME
getter no longer accepts arguments. This change was missed as part of the earlier deprecation in3.0.0.rc1
.Joel Hawksley
-
BREAKING: Raise
TranslateCalledBeforeRenderError
,ControllerCalledBeforeRenderError
, orHelpersCalledBeforeRenderError
instead ofViewContextCalledBeforeRenderError
.Joel Hawksley
-
BREAKING: Raise
SlotPredicateNameError
,RedefinedSlotError
,ReservedSingularSlotNameError
,ContentSlotNameError
,InvalidSlotDefinitionError
,ReservedPluralSlotNameError
,ContentAlreadySetForPolymorphicSlotErrror
,SystemTestControllerOnlyAllowedInTestError
,SystemTestControllerNefariousPathError
,NoMatchingTemplatesForPreviewError
,MultipleMatchingTemplatesForPreviewError
,DuplicateContentError
,EmptyOrInvalidInitializerError
,MissingCollectionArgumentError
,ReservedParameterError
,InvalidCollectionArgumentError
,MultipleInlineTemplatesError
,MissingPreviewTemplateError
,DuplicateSlotContentError
orNilWithContentError
instead of generic error classes.Joel Hawksley
-
BREAKING: Rename
SlotV2
toSlot
andSlotableV2
toSlotable
.Joel Hawksley
-
BREAKING: Incorporate
PolymorphicSlots
intoSlotable
. To migrate, remove any references toPolymorphicSlots
as they are no longer necessary.Joel Hawksley
-
BREAKING: Rename private TestHelpers#controller, #build_controller, #request, and #preview_class to avoid conflicts. Note: While these methods were undocumented and marked as private, they were accessible in tests. As such, we're considering this to be a breaking change.
Joel Hawksley