Skip to content

Commit 8686a5d

Browse files
authored
use ViewComponent 4.0.0.rc1 (#3562)
1 parent 9cdefbb commit 8686a5d

File tree

7 files changed

+13
-9
lines changed

7 files changed

+13
-9
lines changed

.changeset/mighty-cobras-bake.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@primer/view-components": patch
3+
---
4+
5+
Use ViewComponent 4.0.0.rc1

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ gem "lookbook", "~> 2.3.11"
3737
if ENV["VIEW_COMPONENT_PATH"]
3838
gem "view_component", path: ENV["VIEW_COMPONENT_PATH"]
3939
else
40-
gem "view_component", "4.0.0.alpha6"
40+
gem "view_component", "4.0.0.rc1"
4141
end
4242

4343
gem "kramdown", "~> 2.5"

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ GEM
282282
unicode-emoji (4.0.4)
283283
uri (1.0.3)
284284
useragent (0.16.11)
285-
view_component (4.0.0.alpha6)
285+
view_component (4.0.0.rc1)
286286
activesupport (>= 7.1.0, < 8.1)
287287
concurrent-ruby (~> 1)
288288
vite_rails (3.0.19)
@@ -349,7 +349,7 @@ DEPENDENCIES
349349
sprockets-rails
350350
thor
351351
timecop
352-
view_component (= 4.0.0.alpha6)
352+
view_component (= 4.0.0.rc1)
353353
vite_rails (~> 3.0)
354354
webmock
355355
yard (~> 0.9.37)

app/lib/primer/experimental_slot_helpers.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def add_polymorphic_slot_type(slot_name:, type:, callable:)
1313
slot_def = registered_slots[slot_name]
1414
raise "Unknown slot '#{slot_name}'" unless slot_def
1515

16-
poly_def = define_slot(
16+
poly_def = __vc_define_slot(
1717
type,
1818
collection: slot_def[:collection],
1919
callable: callable
@@ -22,7 +22,7 @@ def add_polymorphic_slot_type(slot_name:, type:, callable:)
2222
registered_slots[slot_name][:renderable_hash][type] = poly_def
2323

2424
define_method(:"with_#{type}") do |**system_arguments, &block|
25-
set_slot(slot_name, poly_def, **system_arguments, &block)
25+
__vc_set_slot(slot_name, poly_def, **system_arguments, &block)
2626
end
2727
end
2828
end

demo/Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ gem "puma", "~> 6.6.0"
3737
gem "bootsnap", ">= 1.4.2", require: false
3838

3939
gem "primer_view_components", path: "../"
40-
gem "view_component", "4.0.0.alpha6"
40+
gem "view_component", "4.0.0.rc1"
4141
gem "lookbook", "~> 2.3.11" unless rails_version.to_f < 7
4242

4343
gem "vite_rails", "~> 3.0"

demo/Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ GEM
346346
railties (>= 7.1.0)
347347
tzinfo (2.0.6)
348348
concurrent-ruby (~> 1.0)
349-
view_component (4.0.0.alpha6)
349+
view_component (4.0.0.rc1)
350350
activesupport (>= 7.1.0, < 8.1)
351351
concurrent-ruby (~> 1)
352352
vite_rails (3.0.19)
@@ -401,7 +401,7 @@ DEPENDENCIES
401401
sprockets-rails
402402
stimulus-rails
403403
turbo-rails
404-
view_component (= 4.0.0.alpha6)
404+
view_component (= 4.0.0.rc1)
405405
vite_rails (~> 3.0)
406406

407407
BUNDLED WITH

demo/config/application.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ class Application < Rails::Application
3434
config.view_component.previews.enabled = true
3535
config.view_component.previews.controller = "PreviewController"
3636
config.view_component.previews.paths << Rails.root.join("..", "previews")
37-
config.view_component.show_previews = true
3837

3938
config.autoload_paths << Rails.root.join("..", "test", "test_helpers", "components")
4039

0 commit comments

Comments
 (0)