From 2f436437ecc833e19000639f08a2ef87a23b245e Mon Sep 17 00:00:00 2001 From: Mark Date: Tue, 29 Oct 2024 12:06:40 -0400 Subject: [PATCH] Change name of rails subcomponents --- .../{detail_area.html.erb => detail.html.erb} | 0 .../pb_timeline/{detail_area.rb => detail.rb} | 2 +- .../docs/_timeline_with_children.html.erb | 16 ++++++++-------- .../docs/_timeline_with_children.md | 2 +- .../pb_kits/playbook/pb_timeline/item.html.erb | 18 +++++++++--------- .../app/pb_kits/playbook/pb_timeline/item.rb | 6 +++--- .../{date_area.html.erb => label.html.erb} | 0 .../pb_timeline/{date_area.rb => label.rb} | 2 +- .../{node_area.html.erb => step.html.erb} | 0 .../pb_timeline/{node_area.rb => step.rb} | 2 +- 10 files changed, 24 insertions(+), 24 deletions(-) rename playbook/app/pb_kits/playbook/pb_timeline/{detail_area.html.erb => detail.html.erb} (100%) rename playbook/app/pb_kits/playbook/pb_timeline/{detail_area.rb => detail.rb} (80%) rename playbook/app/pb_kits/playbook/pb_timeline/{date_area.html.erb => label.html.erb} (100%) rename playbook/app/pb_kits/playbook/pb_timeline/{date_area.rb => label.rb} (83%) rename playbook/app/pb_kits/playbook/pb_timeline/{node_area.html.erb => step.html.erb} (100%) rename playbook/app/pb_kits/playbook/pb_timeline/{node_area.rb => step.rb} (91%) diff --git a/playbook/app/pb_kits/playbook/pb_timeline/detail_area.html.erb b/playbook/app/pb_kits/playbook/pb_timeline/detail.html.erb similarity index 100% rename from playbook/app/pb_kits/playbook/pb_timeline/detail_area.html.erb rename to playbook/app/pb_kits/playbook/pb_timeline/detail.html.erb diff --git a/playbook/app/pb_kits/playbook/pb_timeline/detail_area.rb b/playbook/app/pb_kits/playbook/pb_timeline/detail.rb similarity index 80% rename from playbook/app/pb_kits/playbook/pb_timeline/detail_area.rb rename to playbook/app/pb_kits/playbook/pb_timeline/detail.rb index 03f8ba521f..810248dae4 100644 --- a/playbook/app/pb_kits/playbook/pb_timeline/detail_area.rb +++ b/playbook/app/pb_kits/playbook/pb_timeline/detail.rb @@ -2,7 +2,7 @@ module Playbook module PbTimeline - class DetailArea < Playbook::KitBase + class Detail < Playbook::KitBase def classname generate_classname("pb_timeline_item_right_block") end diff --git a/playbook/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.html.erb b/playbook/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.html.erb index f0673f67ea..1725989c17 100644 --- a/playbook/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.html.erb +++ b/playbook/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.html.erb @@ -1,17 +1,17 @@ <%= pb_rails("timeline", props: {orientation: "horizontal", show_date: true}) do %> <%= pb_rails("timeline/item", props: { line_style: "solid"}) do |item| %> - <% item.date_area do %> - <%= pb_rails("timeline/date_area") do %> + <% item.label do %> + <%= pb_rails("timeline/label") do %> <%= pb_rails("title", props: { text: "Any Kit Here", size: 2 }) %> <% end %> <% end %> - <% item.node_area do %> - <%= pb_rails("timeline/node_area", props: { icon: 'check', icon_color: 'teal' }) %> + <% item.step do %> + <%= pb_rails("timeline/step", props: { icon: 'check', icon_color: 'teal' }) %> <% end %> - <% item.detail_area do %> + <% item.detail do %> <%= pb_rails("title_detail", props: { title: "Jackson Heights", detail: "37-27 74th Street" @@ -20,13 +20,13 @@ <% end %> <%= pb_rails("timeline/item", props: { line_style: "dotted"}) do |item| %> - <% item.node_area do %> - <%= pb_rails("timeline/node_area") do %> + <% item.step do %> + <%= pb_rails("timeline/step") do %> <%= pb_rails("pill", props: { text: "Any Kit" , variant: "success" }) %> <% end %> <% end %> - <% item.detail_area do %> + <% item.detail do %> <%= pb_rails("title_detail", props: { title: "Greenpoint", detail: "81 Gate St Brooklyn" diff --git a/playbook/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.md b/playbook/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.md index c7cc6e9680..5341c5e6c7 100644 --- a/playbook/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.md +++ b/playbook/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_children.md @@ -1,4 +1,4 @@ -You can use whatever kit you want for the date area of the timeline item, the node area, and the content area at the bottom or left. +You can use whatever kit you want for the label, step, or detail sections of a timeline's event item. Checkout the code in this example to see the children kits in action. diff --git a/playbook/app/pb_kits/playbook/pb_timeline/item.html.erb b/playbook/app/pb_kits/playbook/pb_timeline/item.html.erb index f7270fa077..8f7153b22b 100644 --- a/playbook/app/pb_kits/playbook/pb_timeline/item.html.erb +++ b/playbook/app/pb_kits/playbook/pb_timeline/item.html.erb @@ -1,20 +1,20 @@ <%= pb_content_tag do %> - <% if date_area %> - <%= date_area %> + <% if label %> + <%= label %> <% else %> - <%= pb_rails("timeline/date_area", props: { date: date }) %> + <%= pb_rails("timeline/label", props: { date: date }) %> <% end %> - <% if node_area %> - <%= node_area %> + <% if step %> + <%= step %> <% else %> - <%= pb_rails("timeline/node_area", props: { icon: icon, icon_color: icon_color }) %> + <%= pb_rails("timeline/step", props: { icon: icon, icon_color: icon_color }) %> <% end %> - <% if detail_area %> - <%= detail_area %> + <% if detail%> + <%= detail%> <% else %> - <%= pb_rails("timeline/detail_area") do %> + <%= pb_rails("timeline/detail") do %> <%= content %> <% end %> <% end %> diff --git a/playbook/app/pb_kits/playbook/pb_timeline/item.rb b/playbook/app/pb_kits/playbook/pb_timeline/item.rb index 40c7ec2453..9a954cc413 100644 --- a/playbook/app/pb_kits/playbook/pb_timeline/item.rb +++ b/playbook/app/pb_kits/playbook/pb_timeline/item.rb @@ -13,9 +13,9 @@ class Item < Playbook::KitBase values: %w[solid dotted], default: "solid" - renders_one :date_area - renders_one :node_area - renders_one :detail_area + renders_one :label + renders_one :step + renders_one :detail def classname generate_classname("pb_timeline_item_kit", line_style) diff --git a/playbook/app/pb_kits/playbook/pb_timeline/date_area.html.erb b/playbook/app/pb_kits/playbook/pb_timeline/label.html.erb similarity index 100% rename from playbook/app/pb_kits/playbook/pb_timeline/date_area.html.erb rename to playbook/app/pb_kits/playbook/pb_timeline/label.html.erb diff --git a/playbook/app/pb_kits/playbook/pb_timeline/date_area.rb b/playbook/app/pb_kits/playbook/pb_timeline/label.rb similarity index 83% rename from playbook/app/pb_kits/playbook/pb_timeline/date_area.rb rename to playbook/app/pb_kits/playbook/pb_timeline/label.rb index dd9f1e022c..bfb74a469f 100644 --- a/playbook/app/pb_kits/playbook/pb_timeline/date_area.rb +++ b/playbook/app/pb_kits/playbook/pb_timeline/label.rb @@ -2,7 +2,7 @@ module Playbook module PbTimeline - class DateArea < Playbook::KitBase + class Label < Playbook::KitBase prop :date def classname diff --git a/playbook/app/pb_kits/playbook/pb_timeline/node_area.html.erb b/playbook/app/pb_kits/playbook/pb_timeline/step.html.erb similarity index 100% rename from playbook/app/pb_kits/playbook/pb_timeline/node_area.html.erb rename to playbook/app/pb_kits/playbook/pb_timeline/step.html.erb diff --git a/playbook/app/pb_kits/playbook/pb_timeline/node_area.rb b/playbook/app/pb_kits/playbook/pb_timeline/step.rb similarity index 91% rename from playbook/app/pb_kits/playbook/pb_timeline/node_area.rb rename to playbook/app/pb_kits/playbook/pb_timeline/step.rb index 90357ae7e6..a80d28d51a 100644 --- a/playbook/app/pb_kits/playbook/pb_timeline/node_area.rb +++ b/playbook/app/pb_kits/playbook/pb_timeline/step.rb @@ -2,7 +2,7 @@ module Playbook module PbTimeline - class NodeArea < Playbook::KitBase + class Step < Playbook::KitBase prop :icon, type: Playbook::Props::String prop :icon_color, type: Playbook::Props::Enum, values: %w[default royal blue purple teal red yellow green],