Skip to content

Commit c696930

Browse files
authored
release v3.0.0 (#1711)
[Closes #1629]
1 parent e4927ec commit c696930

File tree

5 files changed

+76
-9
lines changed

5 files changed

+76
-9
lines changed

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
view_component (3.0.0.rc6)
4+
view_component (3.0.0)
55
activesupport (>= 5.2.0, < 8.0)
66
concurrent-ruby (~> 1.0)
77
method_source (~> 1.0)

docs/CHANGELOG.md

Lines changed: 72 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,81 @@ nav_order: 5
1010

1111
## main
1212

13-
* Add Topkey to list of companies using ViewComponent.
13+
### v3.0.0
1414

15-
*Bryan Beshore*
15+
1,000+ days and 100+ releases later, the 200+ contributors to ViewComponent are proud to ship v3.0.0!
16+
17+
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 :heart:
18+
19+
This release makes the following breaking changes, many of which have long been deprecated:
20+
21+
* BREAKING: Remove deprecated slots setter methods. Use `with_SLOT_NAME` instead.
22+
23+
*Joel Hawksley*
24+
25+
* BREAKING: Remove deprecated SlotsV1 in favor of current SlotsV2.
26+
27+
*Joel Hawksley*
28+
29+
* BREAKING: Remove deprecated `content_areas` feature. Use Slots instead.
30+
31+
*Joel Hawksley*
32+
33+
* BREAKING: Remove deprecated support for loading ViewComponent engine manually. Make sure `require "view_component/engine"` is removed from `Gemfile`.
34+
35+
*Joel Hawksley*
36+
37+
* BREAKING: Remove deprecated `generate_*` methods. Use `generate.*` instead.
38+
39+
*Joel Hawksley*
40+
41+
* BREAKING: Remove deprecated `with_variant` method.
1642

17-
* Add OBLSK & PLT4M to list of companies using ViewComponent.
43+
*Joel Hawksley*
44+
45+
* BREAKING: Remove deprecated `rendered_component` in favor of `rendered_content`.
46+
47+
*Joel Hawksley*
48+
49+
* BREAKING: Remove deprecated `config.preview_path` in favor of `config.preview_paths`.
50+
51+
*Joel Hawksley*
1852

19-
*Mike Munroe*
53+
* BREAKING: Support Ruby 2.7+ instead of 2.4+
54+
55+
*Joel Hawksley*
56+
57+
* BREAKING: Remove deprecated `before_render_check`.
58+
59+
*Joel Hawksley*
60+
61+
* BREAKING: Change counter variable to start iterating from `0` instead of `1`.
62+
63+
*Frank S*
64+
65+
* BREAKING: `#SLOT_NAME` getter no longer accepts arguments. This change was missed as part of the earlier deprecation in `3.0.0.rc1`.
66+
67+
*Joel Hawksley*
68+
69+
* BREAKING: Raise `TranslateCalledBeforeRenderError`, `ControllerCalledBeforeRenderError`, or `HelpersCalledBeforeRenderError` instead of `ViewContextCalledBeforeRenderError`.
70+
71+
*Joel Hawksley*
72+
73+
* BREAKING: Raise `SlotPredicateNameError`, `RedefinedSlotError`, `ReservedSingularSlotNameError`, `ContentSlotNameError`, `InvalidSlotDefinitionError`, `ReservedPluralSlotNameError`, `ContentAlreadySetForPolymorphicSlotErrror`, `SystemTestControllerOnlyAllowedInTestError`, `SystemTestControllerNefariousPathError`, `NoMatchingTemplatesForPreviewError`, `MultipleMatchingTemplatesForPreviewError`, `DuplicateContentError`, `EmptyOrInvalidInitializerError`, `MissingCollectionArgumentError`, `ReservedParameterError`, `InvalidCollectionArgumentError`, `MultipleInlineTemplatesError`, `MissingPreviewTemplateError`, `DuplicateSlotContentError` or `NilWithContentError` instead of generic error classes.
74+
75+
*Joel Hawksley*
76+
77+
* BREAKING: Rename `SlotV2` to `Slot` and `SlotableV2` to `Slotable`.
78+
79+
*Joel Hawksley*
80+
81+
* BREAKING: Incorporate `PolymorphicSlots` into `Slotable`. To migrate, remove any references to `PolymorphicSlots` as they are no longer necessary.
82+
83+
*Joel Hawksley*
84+
85+
* 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.
86+
87+
*Joel Hawksley*
2088

2189
### v3.0.0.rc6
2290

docs/_data/library.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version: 3.0.0.rc6
1+
version: 3.0.0

lib/view_component/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module VERSION
55
MAJOR = 3
66
MINOR = 0
77
PATCH = 0
8-
PRE = "rc6"
8+
PRE = nil
99

1010
STRING = [MAJOR, MINOR, PATCH, PRE].compact.join(".")
1111
end

test/sandbox/test/rendering_test.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,14 +348,13 @@ def test_that_it_has_a_version_number
348348
assert_kind_of Integer, ::ViewComponent::VERSION::MINOR
349349
refute_nil ::ViewComponent::VERSION::PATCH
350350
assert_kind_of Integer, ::ViewComponent::VERSION::PATCH
351-
refute_nil ::ViewComponent::VERSION::PRE
352351

353352
version_string = [
354353
::ViewComponent::VERSION::MAJOR,
355354
::ViewComponent::VERSION::MINOR,
356355
::ViewComponent::VERSION::PATCH,
357356
::ViewComponent::VERSION::PRE
358-
].join(".")
357+
].compact.join(".")
359358
assert_equal version_string, ::ViewComponent::VERSION::STRING
360359
end
361360

0 commit comments

Comments
 (0)