From 43aaf102dc18e14b42418e760631901a6b37593d Mon Sep 17 00:00:00 2001 From: River Lynn Parrhesia Bailey Date: Wed, 10 Aug 2022 08:49:01 -0500 Subject: [PATCH 01/13] added changeset --- .changeset/silver-rice-lie.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/silver-rice-lie.md diff --git a/.changeset/silver-rice-lie.md b/.changeset/silver-rice-lie.md new file mode 100644 index 0000000000..57e6b99bb5 --- /dev/null +++ b/.changeset/silver-rice-lie.md @@ -0,0 +1,5 @@ +--- +'@primer/view-components': patch +--- + +updating slot use for components in the beta/ folder From 50761752fe77766af825ea331e34d2951bff5178 Mon Sep 17 00:00:00 2001 From: River Lynn Parrhesia Bailey Date: Wed, 10 Aug 2022 08:49:18 -0500 Subject: [PATCH 02/13] updating slot use for the borderbox header --- app/components/primer/beta/border_box/header.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/components/primer/beta/border_box/header.rb b/app/components/primer/beta/border_box/header.rb index 00edcc3d42..77d4daeaae 100644 --- a/app/components/primer/beta/border_box/header.rb +++ b/app/components/primer/beta/border_box/header.rb @@ -5,7 +5,7 @@ module Beta class BorderBox # `BorderBox::Header` is used inside `BorderBox` to render its header slot. # - # @accessibility When using `header.title`, set `tag` to one of `h1`, `h2`, `h3`, etc. based on what is appropriate for the page context. <%= link_to_heading_practices %> + # @accessibility When using `header.with_title`, set `tag` to one of `h1`, `h2`, `h3`, etc. based on what is appropriate for the page context. <%= link_to_heading_practices %> class Header < Primer::Component TITLE_TAG_FALLBACK = :h2 TITLE_TAG_OPTIONS = [:h1, TITLE_TAG_FALLBACK, :h3, :h4, :h5, :h6].freeze @@ -32,7 +32,7 @@ class Header < Primer::Component # # @example with title # <%= render(Primer::Beta::BorderBox::Header.new) do |h| %> - # <% h.title(tag: :h3) do %>I am a title<% end %> + # <% h.with_title(tag: :h3) do %>I am a title<% end %> # <% end %> # # @param system_arguments [Hash] <%= link_to_system_arguments_docs %> From 15b1b0b022ff56167ff7450c7e78615a6e3c8d8b Mon Sep 17 00:00:00 2001 From: River Lynn Parrhesia Bailey Date: Wed, 10 Aug 2022 08:50:32 -0500 Subject: [PATCH 03/13] updating slot use for auto complete --- app/components/primer/beta/auto_complete.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/components/primer/beta/auto_complete.rb b/app/components/primer/beta/auto_complete.rb index 67c5b66719..87443ced4a 100644 --- a/app/components/primer/beta/auto_complete.rb +++ b/app/components/primer/beta/auto_complete.rb @@ -95,7 +95,7 @@ class AutoComplete < Primer::Component # Display any Octicon as a leading visual within the field # @code # <%= render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", src: "/auto_complete", input_id:"input-id-1", list_id: "list-id-1")) do |c| %> - # <% c.leading_visual_icon(icon: :search) %> + # <% c.with_leading_visual_icon(icon: :search) %> # <% end %> # # @example Trailing action @@ -109,7 +109,7 @@ class AutoComplete < Primer::Component # A non-visible label may be rendered with `visually_hide_label: true`, but it is highly discouraged. See <%= link_to_accessibility %>. # @code # <%= render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "fruits-input--custom-results-1", list_id: "fruits-popup--custom-result-1", src: "/auto_complete", visually_hide_label: true)) do |c| %> - # <% c.leading_visual_icon(icon: :search) %> + # <% c.with_leading_visual_icon(icon: :search) %> # <% end %> # # @example Full width field @@ -117,7 +117,7 @@ class AutoComplete < Primer::Component # To allow field to span width of its container, set `full_width` to `true`. # @code # <%= render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "fruits-input--custom-results-2", list_id: "fruits-popup--custom-results-2", src: "/auto_complete", full_width: true)) do |c| %> - # <% c.leading_visual_icon(icon: :search) %> + # <% c.with_leading_visual_icon(icon: :search) %> # <% end %> # # @example Inset variant @@ -125,7 +125,7 @@ class AutoComplete < Primer::Component # Use the `inset` variant to change the input background color to be subtle. # @code # <%= render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "fruits-input--custom-results-2", list_id: "fruits-popup--custom-results-2", src: "/auto_complete", inset: true)) do |c| %> - # <% c.leading_visual_icon(icon: :search) %> + # <% c.with_leading_visual_icon(icon: :search) %> # <% end %> # # @example Monospace variant @@ -133,17 +133,17 @@ class AutoComplete < Primer::Component # Use the `monospace` variant to change the input font family. # @code # <%= render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "fruits-input--custom-results-2", list_id: "fruits-popup--custom-results-2", src: "/auto_complete", monospace: true)) do |c| %> - # <% c.leading_visual_icon(icon: :search) %> + # <% c.with_leading_visual_icon(icon: :search) %> # <% end %> # # @example With custom classes for the input # <%= render(Primer::Beta::AutoComplete.new(label_text: "Fruits", src: "/auto_complete", input_id: "fruits-input--custom-input", list_id: "fruits-popup--custom-input")) do |c| %> - # <% c.input(classes: "custom-class") %> + # <% c.with_input(classes: "custom-class") %> # <% end %> # # @example With custom classes for the results # <%= render(Primer::Beta::AutoComplete.new(label_text: "Fruits", src: "/auto_complete", input_id: "fruits-input--custom-results", list_id: "fruits-popup--custom-results")) do |c| %> - # <% c.results(classes: "custom-class") %> + # <% c.with_results(classes: "custom-class") %> # <% end %> # # @param label_text [String] The label of the input. From 77b2b7ab31baedffb50229c4e9dca843e5c5323f Mon Sep 17 00:00:00 2001 From: River Lynn Parrhesia Bailey Date: Wed, 10 Aug 2022 08:51:21 -0500 Subject: [PATCH 04/13] updating slot use for avatar stack --- app/components/primer/beta/avatar_stack.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/components/primer/beta/avatar_stack.rb b/app/components/primer/beta/avatar_stack.rb index 8fffb5f03d..c958f16314 100644 --- a/app/components/primer/beta/avatar_stack.rb +++ b/app/components/primer/beta/avatar_stack.rb @@ -21,23 +21,23 @@ class AvatarStack < Primer::Component # @example Default # <%= render(Primer::Beta::AvatarStack.new) do |c| %> - # <% c.avatar(src: "http://placekitten.com/200/200", alt: "@kittenuser") %> - # <% c.avatar(src: "http://placekitten.com/200/200", alt: "@kittenuser") %> - # <% c.avatar(src: "http://placekitten.com/200/200", alt: "@kittenuser") %> + # <% c.with_avatar(src: "http://placekitten.com/200/200", alt: "@kittenuser") %> + # <% c.with_avatar(src: "http://placekitten.com/200/200", alt: "@kittenuser") %> + # <% c.with_avatar(src: "http://placekitten.com/200/200", alt: "@kittenuser") %> # <% end %> # # @example Align right # <%= render(Primer::Beta::AvatarStack.new(align: :right)) do |c| %> - # <% c.avatar(src: "http://placekitten.com/200/200", alt: "@kittenuser") %> - # <% c.avatar(src: "http://placekitten.com/200/200", alt: "@kittenuser") %> - # <% c.avatar(src: "http://placekitten.com/200/200", alt: "@kittenuser") %> + # <% c.with_avatar(src: "http://placekitten.com/200/200", alt: "@kittenuser") %> + # <% c.with_avatar(src: "http://placekitten.com/200/200", alt: "@kittenuser") %> + # <% c.with_avatar(src: "http://placekitten.com/200/200", alt: "@kittenuser") %> # <% end %> # # @example With tooltip # <%= render(Primer::Beta::AvatarStack.new(tooltipped: true, body_arguments: { label: 'This is a tooltip!' })) do |c| %> - # <% c.avatar(src: "http://placekitten.com/200/200", alt: "@kittenuser") %> - # <% c.avatar(src: "http://placekitten.com/200/200", alt: "@kittenuser") %> - # <% c.avatar(src: "http://placekitten.com/200/200", alt: "@kittenuser") %> + # <% c.with_avatar(src: "http://placekitten.com/200/200", alt: "@kittenuser") %> + # <% c.with_avatar(src: "http://placekitten.com/200/200", alt: "@kittenuser") %> + # <% c.with_avatar(src: "http://placekitten.com/200/200", alt: "@kittenuser") %> # <% end %> # # @param tag [Symbol] <%= one_of(Primer::Beta::AvatarStack::TAG_OPTIONS) %> From a7c748730c7556828e1af58917dee22e152bb2e2 Mon Sep 17 00:00:00 2001 From: River Lynn Parrhesia Bailey Date: Wed, 10 Aug 2022 08:52:34 -0500 Subject: [PATCH 05/13] updating slot use for blank slate --- app/components/primer/beta/blankslate.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/components/primer/beta/blankslate.rb b/app/components/primer/beta/blankslate.rb index e31f490bf1..1e99349920 100644 --- a/app/components/primer/beta/blankslate.rb +++ b/app/components/primer/beta/blankslate.rb @@ -120,7 +120,7 @@ class Blankslate < Primer::Component # Add a [SpinnerComponent](https://primer.style/view-components/components/spinner) to the blankslate in place of an icon. # @code # <%= render Primer::Beta::Blankslate.new do |c| %> - # <% c.visual_spinner(size: :large) %> + # <% c.with_visual_spinner(size: :large) %> # <% c.heading(tag: :h2).with_content("Title") %> # <% c.description { "Description"} %> # <% end %> @@ -130,7 +130,7 @@ class Blankslate < Primer::Component # Add an `image` to give context that an Octicon couldn't. # @code # <%= render Primer::Beta::Blankslate.new do |c| %> - # <% c.visual_image(src: "https://github.githubassets.com/images/modules/site/features/security-icon.svg", alt: "Security - secure vault") %> + # <% c.with_visual_image(src: "https://github.githubassets.com/images/modules/site/features/security-icon.svg", alt: "Security - secure vault") %> # <% c.heading(tag: :h2).with_content("Title") %> # <% c.description { "Description"} %> # <% end %> From 35e3270e3b8114b0e3fd644053423e039d17b182 Mon Sep 17 00:00:00 2001 From: River Lynn Parrhesia Bailey Date: Wed, 10 Aug 2022 08:53:56 -0500 Subject: [PATCH 06/13] updating slot use for bread crumbs --- app/components/primer/beta/breadcrumbs.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/components/primer/beta/breadcrumbs.rb b/app/components/primer/beta/breadcrumbs.rb index a54ae162c5..dbc6025ff7 100644 --- a/app/components/primer/beta/breadcrumbs.rb +++ b/app/components/primer/beta/breadcrumbs.rb @@ -33,9 +33,9 @@ class Breadcrumbs < Primer::Component # @example Basic # <%= render(Primer::Beta::Breadcrumbs.new) do |component| %> - # <% component.item(href: "/") do %>Home<% end %> - # <% component.item(href: "/about") do %>About<% end %> - # <% component.item(href: "/about/team") do %>Team<% end %> + # <% component.with_item(href: "/") do %>Home<% end %> + # <% component.with_item(href: "/about") do %>About<% end %> + # <% component.with_item(href: "/about/team") do %>Team<% end %> # <% end %> # # @param system_arguments [Hash] <%= link_to_system_arguments_docs %> From 0785056776d628c6af37e1266479b519e0f79968 Mon Sep 17 00:00:00 2001 From: River Lynn Parrhesia Bailey Date: Wed, 10 Aug 2022 08:54:31 -0500 Subject: [PATCH 07/13] updating slot use for button group --- app/components/primer/beta/button_group.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/components/primer/beta/button_group.rb b/app/components/primer/beta/button_group.rb index d530fc017d..64b8faca4a 100644 --- a/app/components/primer/beta/button_group.rb +++ b/app/components/primer/beta/button_group.rb @@ -19,20 +19,20 @@ class ButtonGroup < Primer::Component # @example Default # # <%= render(Primer::Beta::ButtonGroup.new) do |component| %> - # <% component.button { "Default" } %> - # <% component.button(scheme: :primary) { "Primary" } %> - # <% component.button(scheme: :danger) { "Danger" } %> - # <% component.button(scheme: :outline) { "Outline" } %> - # <% component.button(classes: "custom-class") { "Custom class" } %> + # <% component.with_button { "Default" } %> + # <% component.with_button(scheme: :primary) { "Primary" } %> + # <% component.with_button(scheme: :danger) { "Danger" } %> + # <% component.with_button(scheme: :outline) { "Outline" } %> + # <% component.with_button(classes: "custom-class") { "Custom class" } %> # <% end %> # # @example Sizes # # <%= render(Primer::Beta::ButtonGroup.new(size: :small)) do |component| %> - # <% component.button { "Default" } %> - # <% component.button(scheme: :primary) { "Primary" } %> - # <% component.button(scheme: :danger) { "Danger" } %> - # <% component.button(scheme: :outline) { "Outline" } %> + # <% component.with_button { "Default" } %> + # <% component.with_button(scheme: :primary) { "Primary" } %> + # <% component.with_button(scheme: :danger) { "Danger" } %> + # <% component.with_button(scheme: :outline) { "Outline" } %> # <% end %> # # @param variant [Symbol] DEPRECATED. <%= one_of(Primer::ButtonComponent::SIZE_OPTIONS) %> From 6df97ef8f794e96056cdf673495abb973232bbb5 Mon Sep 17 00:00:00 2001 From: River Lynn Parrhesia Bailey Date: Wed, 10 Aug 2022 08:56:42 -0500 Subject: [PATCH 08/13] updating slot use for flash --- app/components/primer/beta/flash.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/primer/beta/flash.rb b/app/components/primer/beta/flash.rb index 1d5bac880b..05c56107f4 100644 --- a/app/components/primer/beta/flash.rb +++ b/app/components/primer/beta/flash.rb @@ -42,7 +42,7 @@ class Flash < Primer::Component # @example With actions # <%= render(Primer::Beta::Flash.new) do |component| %> # This is a flash message with actions! - # <% component.action do %> + # <% component.with_action do %> # <%= render(Primer::ButtonComponent.new(size: :small)) { "Take action" } %> # <% end %> # <% end %> From e344f5050a4de125c1a3dc43602e48aa4ebd0829 Mon Sep 17 00:00:00 2001 From: River Lynn Parrhesia Bailey Date: Wed, 10 Aug 2022 08:57:30 -0500 Subject: [PATCH 09/13] updating slot use for truncate --- app/components/primer/beta/truncate.rb | 34 +++++++++++++------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/app/components/primer/beta/truncate.rb b/app/components/primer/beta/truncate.rb index c5a4ae669d..d62a2d5256 100644 --- a/app/components/primer/beta/truncate.rb +++ b/app/components/primer/beta/truncate.rb @@ -19,49 +19,49 @@ class Truncate < Primer::Component # # @example Multiple items # <%= render(Primer::Beta::Truncate.new) do |component| %> - # <% component.item do %>really-long-repository-owner-name<% end %> - # <% component.item(font_weight: :bold) do %> + # <% component.with_item do %>really-long-repository-owner-name<% end %> + # <% component.with_item(font_weight: :bold) do %> # <%= render(Primer::BaseComponent.new(tag: :span, font_weight: :normal)) { "/" } %> really-long-repository-name # <% end %> # <% end %> # # @example Advanced multiple items # <%= render(Primer::Beta::Truncate.new(tag: :ol)) do |component| %> - # <% component.item(tag: :li) do %>primer<% end %> - # <% component.item(tag: :li, priority: true) do %>/ css<% end %> - # <% component.item(tag: :li) do %>/ Issues<% end %> - # <% component.item(tag: :li) do %>/ #123 —<% end %> - # <% component.item(tag: :li, priority: true) do %> + # <% component.with_item(tag: :li) do %>primer<% end %> + # <% component.with_item(tag: :li, priority: true) do %>/ css<% end %> + # <% component.with_item(tag: :li) do %>/ Issues<% end %> + # <% component.with_item(tag: :li) do %>/ #123 —<% end %> + # <% component.with_item(tag: :li, priority: true) do %> # Visual bug on primer.style found in lists # <% end %> # <% end %> # # @example Expand on hover or focus # <%= render(Primer::Beta::Truncate.new) do |component| %> - # <% component.item(tag: :a, href: "#", expandable: true) do %>really-long-repository-owner-name<% end %> - # <% component.item(tag: :a, href: "#", expandable: true) do %>really-long-repository-owner-name<% end %> - # <% component.item(tag: :a, href: "#", expandable: true) do %>really-long-repository-owner-name<% end %> - # <% component.item(tag: :a, href: "#", expandable: true) do %>really-long-repository-owner-name<% end %> + # <% component.with_item(tag: :a, href: "#", expandable: true) do %>really-long-repository-owner-name<% end %> + # <% component.with_item(tag: :a, href: "#", expandable: true) do %>really-long-repository-owner-name<% end %> + # <% component.with_item(tag: :a, href: "#", expandable: true) do %>really-long-repository-owner-name<% end %> + # <% component.with_item(tag: :a, href: "#", expandable: true) do %>really-long-repository-owner-name<% end %> # <% end %> # # @example Max widths # <%= render(Primer::Beta::Truncate.new) do |component| %> - # <% component.item(max_width: 300, expandable: true) do %>branch-name-that-is-really-long-branch-name-that-is-really-long-branch-name-that-is-really-long<% end %> - # <% component.item(max_width: 200, expandable: true) do %>branch-name-that-is-really-long-branch-name-that-is-really-long-branch-name-that-is-really-long<% end %> - # <% component.item(max_width: 100, expandable: true) do %>branch-name-that-is-really-long-branch-name-that-is-really-long-branch-name-that-is-really-long<% end %> + # <% component.with_item(max_width: 300, expandable: true) do %>branch-name-that-is-really-long-branch-name-that-is-really-long-branch-name-that-is-really-long<% end %> + # <% component.with_item(max_width: 200, expandable: true) do %>branch-name-that-is-really-long-branch-name-that-is-really-long-branch-name-that-is-really-long<% end %> + # <% component.with_item(max_width: 100, expandable: true) do %>branch-name-that-is-really-long-branch-name-that-is-really-long-branch-name-that-is-really-long<% end %> # <% end %> # # @example Max widths on new lines # <%= render(Primer::Beta::Truncate.new) do |component| %> - # <% component.item(max_width: 300, expandable: true) do %>branch-name-that-is-really-long-branch-name-that-is-really-long-branch-name-that-is-really-long<% end %> + # <% component.with_item(max_width: 300, expandable: true) do %>branch-name-that-is-really-long-branch-name-that-is-really-long-branch-name-that-is-really-long<% end %> # <% end %> #
# <%= render(Primer::Beta::Truncate.new) do |component| %> - # <% component.item(max_width: 200, expandable: true) do %>branch-name-that-is-really-long-branch-name-that-is-really-long-branch-name-that-is-really-long<% end %> + # <% component.with_item(max_width: 200, expandable: true) do %>branch-name-that-is-really-long-branch-name-that-is-really-long-branch-name-that-is-really-long<% end %> # <% end %> #
# <%= render(Primer::Beta::Truncate.new) do |component| %> - # <% component.item(max_width: 100, expandable: true) do %>branch-name-that-is-really-long-branch-name-that-is-really-long-branch-name-that-is-really-long<% end %> + # <% component.with_item(max_width: 100, expandable: true) do %>branch-name-that-is-really-long-branch-name-that-is-really-long-branch-name-that-is-really-long<% end %> # <% end %> # # @param system_arguments [Hash] <%= link_to_system_arguments_docs %> From 98ed5edf0684ce593e3c4874592c04c689e1ab91 Mon Sep 17 00:00:00 2001 From: River Lynn Parrhesia Bailey Date: Wed, 10 Aug 2022 09:35:58 -0500 Subject: [PATCH 10/13] resetting .leading_visual_icon --- app/components/primer/beta/auto_complete.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/components/primer/beta/auto_complete.rb b/app/components/primer/beta/auto_complete.rb index 87443ced4a..9c6c67d013 100644 --- a/app/components/primer/beta/auto_complete.rb +++ b/app/components/primer/beta/auto_complete.rb @@ -95,7 +95,7 @@ class AutoComplete < Primer::Component # Display any Octicon as a leading visual within the field # @code # <%= render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", src: "/auto_complete", input_id:"input-id-1", list_id: "list-id-1")) do |c| %> - # <% c.with_leading_visual_icon(icon: :search) %> + # <% c.leading_visual_icon(icon: :search) %> # <% end %> # # @example Trailing action @@ -109,7 +109,7 @@ class AutoComplete < Primer::Component # A non-visible label may be rendered with `visually_hide_label: true`, but it is highly discouraged. See <%= link_to_accessibility %>. # @code # <%= render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "fruits-input--custom-results-1", list_id: "fruits-popup--custom-result-1", src: "/auto_complete", visually_hide_label: true)) do |c| %> - # <% c.with_leading_visual_icon(icon: :search) %> + # <% c.leading_visual_icon(icon: :search) %> # <% end %> # # @example Full width field @@ -117,7 +117,7 @@ class AutoComplete < Primer::Component # To allow field to span width of its container, set `full_width` to `true`. # @code # <%= render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "fruits-input--custom-results-2", list_id: "fruits-popup--custom-results-2", src: "/auto_complete", full_width: true)) do |c| %> - # <% c.with_leading_visual_icon(icon: :search) %> + # <% c.leading_visual_icon(icon: :search) %> # <% end %> # # @example Inset variant @@ -125,7 +125,7 @@ class AutoComplete < Primer::Component # Use the `inset` variant to change the input background color to be subtle. # @code # <%= render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "fruits-input--custom-results-2", list_id: "fruits-popup--custom-results-2", src: "/auto_complete", inset: true)) do |c| %> - # <% c.with_leading_visual_icon(icon: :search) %> + # <% c.leading_visual_icon(icon: :search) %> # <% end %> # # @example Monospace variant @@ -133,7 +133,7 @@ class AutoComplete < Primer::Component # Use the `monospace` variant to change the input font family. # @code # <%= render(Primer::Beta::AutoComplete.new(label_text: "Select a fruit", input_id: "fruits-input--custom-results-2", list_id: "fruits-popup--custom-results-2", src: "/auto_complete", monospace: true)) do |c| %> - # <% c.with_leading_visual_icon(icon: :search) %> + # <% c.leading_visual_icon(icon: :search) %> # <% end %> # # @example With custom classes for the input From a0bf34589acbf5101e3f0dbe5afe07d766b98979 Mon Sep 17 00:00:00 2001 From: River Lynn Parrhesia Bailey Date: Wed, 10 Aug 2022 09:42:08 -0500 Subject: [PATCH 11/13] correcting blank slate --- app/components/primer/beta/blankslate.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/components/primer/beta/blankslate.rb b/app/components/primer/beta/blankslate.rb index 1e99349920..e31f490bf1 100644 --- a/app/components/primer/beta/blankslate.rb +++ b/app/components/primer/beta/blankslate.rb @@ -120,7 +120,7 @@ class Blankslate < Primer::Component # Add a [SpinnerComponent](https://primer.style/view-components/components/spinner) to the blankslate in place of an icon. # @code # <%= render Primer::Beta::Blankslate.new do |c| %> - # <% c.with_visual_spinner(size: :large) %> + # <% c.visual_spinner(size: :large) %> # <% c.heading(tag: :h2).with_content("Title") %> # <% c.description { "Description"} %> # <% end %> @@ -130,7 +130,7 @@ class Blankslate < Primer::Component # Add an `image` to give context that an Octicon couldn't. # @code # <%= render Primer::Beta::Blankslate.new do |c| %> - # <% c.with_visual_image(src: "https://github.githubassets.com/images/modules/site/features/security-icon.svg", alt: "Security - secure vault") %> + # <% c.visual_image(src: "https://github.githubassets.com/images/modules/site/features/security-icon.svg", alt: "Security - secure vault") %> # <% c.heading(tag: :h2).with_content("Title") %> # <% c.description { "Description"} %> # <% end %> From 880d10616aefbd3f9ece4c21cff37c848b792b33 Mon Sep 17 00:00:00 2001 From: River Lynn Parrhesia Bailey Date: Wed, 10 Aug 2022 09:46:21 -0500 Subject: [PATCH 12/13] added missing status :beta to header --- app/components/primer/beta/border_box/header.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/components/primer/beta/border_box/header.rb b/app/components/primer/beta/border_box/header.rb index 77d4daeaae..a66820a98d 100644 --- a/app/components/primer/beta/border_box/header.rb +++ b/app/components/primer/beta/border_box/header.rb @@ -7,6 +7,8 @@ class BorderBox # # @accessibility When using `header.with_title`, set `tag` to one of `h1`, `h2`, `h3`, etc. based on what is appropriate for the page context. <%= link_to_heading_practices %> class Header < Primer::Component + status :beta + TITLE_TAG_FALLBACK = :h2 TITLE_TAG_OPTIONS = [:h1, TITLE_TAG_FALLBACK, :h3, :h4, :h5, :h6].freeze From b01662c5995ddda9d889cd477760fd950e22c347 Mon Sep 17 00:00:00 2001 From: Actions Auto Build Date: Wed, 10 Aug 2022 14:47:43 +0000 Subject: [PATCH 13/13] docs: build docs --- static/statuses.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/statuses.json b/static/statuses.json index 79f495a10c..87f6972b92 100644 --- a/static/statuses.json +++ b/static/statuses.json @@ -19,7 +19,7 @@ "Primer::Beta::BaseButton": "beta", "Primer::Beta::Blankslate": "beta", "Primer::Beta::BorderBox": "beta", - "Primer::Beta::BorderBox::Header": "alpha", + "Primer::Beta::BorderBox::Header": "beta", "Primer::Beta::Breadcrumbs": "beta", "Primer::Beta::Breadcrumbs::Item": "alpha", "Primer::Beta::ButtonGroup": "beta",