Skip to content

Commit

Permalink
[PLAY-1445] Use New Content Tag (#3548)
Browse files Browse the repository at this point in the history
A 2nd attempt of #3497

Reverts #3518
  • Loading branch information
markdoeswork authored Jul 25, 2024
1 parent 735f1d0 commit 2723df4
Show file tree
Hide file tree
Showing 15 changed files with 17 additions and 92 deletions.
13 changes: 2 additions & 11 deletions playbook/app/pb_kits/playbook/pb_background/background.html.erb
Original file line number Diff line number Diff line change
@@ -1,23 +1,14 @@
<% if object.image_url.present? %>
<%= content_tag(object.tag,
aria: object.aria,
data: object.data,
id: object.id,
class: object.classname,
<%= pb_content_tag(object.tag,
style: "background-image: url('#{object.image_url}');
background-repeat: #{object.background_repeat};
background-size: #{object.background_size};
background-position: #{object.background_position};",
**combined_html_options
) do %>
<%= content.presence %>
<% end %>
<% else %>
<%= content_tag(object.tag,
aria: object.aria,
data: object.data,
id: object.id,
class: object.classname,
<%= pb_content_tag(object.tag,
style: object.custom_background_color
) do %>
<%= content.presence %>
Expand Down
7 changes: 1 addition & 6 deletions playbook/app/pb_kits/playbook/pb_body/body.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
<%= content_tag(object.tag,
aria: object.aria,
id: object.id,
data: object.data,
class: object.classname,
**combined_html_options) do %>
<%= pb_content_tag(object.tag) do %>
<%= object.content %>
<% end %>
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
<%= content_tag(:div,
id: object.id,
data: object.data,
class: object.classname,
aria: object.aria,
**combined_html_options) do%>
<%= pb_content_tag do%>
<%= content_tag(object.link ? 'a' : 'span', class: 'bread_crumb_item', href: object.link) do %>
<%= content.presence %>
<% end %>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
<%= content_tag(:nav,
aria: object.aria,
id: object.id,
data: object.data,
class: object.classname,
**combined_html_options) do %>
<%= pb_content_tag(:nav) do %>
<%= content.presence %>
<% end %>
7 changes: 1 addition & 6 deletions playbook/app/pb_kits/playbook/pb_caption/caption.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
<%= content_tag(object.tag,
aria: object.aria,
id: object.id,
data: object.data,
class: object.classname,
**combined_html_options) do %>
<%= pb_content_tag(object.tag) do %>
<%= content.presence || object.text %>
<% end %>
8 changes: 1 addition & 7 deletions playbook/app/pb_kits/playbook/pb_card/card.html.erb
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
<%= content_tag(object.tag,
id: object.id,
data: object.data,
class: object.classname,
aria: object.aria,
dark: object.dark,
**combined_html_options) do %>
<%= pb_content_tag(object.tag) do %>
<%= content.presence %>
<% end %>

Expand Down
7 changes: 1 addition & 6 deletions playbook/app/pb_kits/playbook/pb_detail/detail.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
<%= content_tag(object.tag,
aria: object.aria,
class: object.classname,
data: object.data,
id: object.id,
**combined_html_options) do %>
<%= pb_content_tag(object.tag) do %>
<%= object.content %>
<% end %>
7 changes: 1 addition & 6 deletions playbook/app/pb_kits/playbook/pb_dialog/dialog.html.erb
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
<div class="pb_dialog_wrapper_rails <%= object.full_height_style %>" data-overlay-click= <%= object.overlay_close %> >
<%= content_tag(:dialog,
aria: object.aria,
data: object.data,
id: object.id,
class: object.classname,
**combined_html_options) do %>
<%= pb_content_tag(:dialog) do %>
<% if object.status === "" && object.title %>
<%= pb_rails("dialog/dialog_header", props: { title: object.title, id: object.id }) %>
<% end %>
Expand Down
7 changes: 1 addition & 6 deletions playbook/app/pb_kits/playbook/pb_dialog/dialog_body.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
<%= content_tag(:div,
id: object.id,
data: object.data,
class: object.classname,
aria: object.aria,
**combined_html_options) do %>
<%= pb_content_tag do %>
<%= content.presence || object.text %>
<% end %>
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<%= content_tag(:div,
id: object.id,
data: object.data,
aria: object.aria,
**combined_html_options) do %>
<%= pb_content_tag(:div, class: "") do %>
<% 'excluded classname?' %>
<% if object.confirm_button && object.cancel_button %>
<div class="dialog-pseudo-footer"></div>
<%= pb_rails("flex", props: { classname:object.classname, spacing:"between", padding_x:"sm", padding:"sm", padding_bottom:"sm" }) do %>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
<%= content_tag(:div,
id: object.id,
data: object.data,
class: object.sticky_header,
aria: object.aria,
**combined_html_options) do %>
<%= pb_content_tag(:div, class: object.sticky_header) do %>
<%= pb_rails("flex", props: {classname:object.classname, spacing:"between", padding:"sm", align:"center"}) do %>
<%= content.presence || object.title %>

Expand Down
6 changes: 1 addition & 5 deletions playbook/app/pb_kits/playbook/pb_flex/flex.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
<%= content_tag(:div,
id: object.id,
data: object.data,
class: object.classname,
**combined_html_options) do %>
<%= pb_content_tag do %>
<%= content.presence %>
<% end %>
7 changes: 1 addition & 6 deletions playbook/app/pb_kits/playbook/pb_hashtag/hashtag.html.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
<%= content_tag(:span,
aria: object.aria,
class: object.classname,
data: object.data,
id: object.id,
**combined_html_options) do %>
<%= pb_content_tag(:span) do %>
<%= link_to object.url, target: object.link_option do %>
<%= pb_rails("badge", props: { dark: object.dark, variant: "primary", text: object.hashtag_text }) %>
<% end %>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
<%= content_tag(:span,
id: object.id,
data: object.data,
class: object.classname,
**combined_html_options) do %>
<%= pb_content_tag(:span) do %>
<mark>
<%= content.presence || object.text %>
</mark>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
<%= content_tag(:div,
id: object.id,
data: object.data,
class: object.classname,
**combined_html_options) do %>
<%= pb_content_tag do %>
<%= pb_rails("home_address_street/#{emphasis}_emphasis", props: object.send("#{emphasis}_emphasis_props")) %>
<% end %>

0 comments on commit 2723df4

Please sign in to comment.