Skip to content

Commit

Permalink
[PLAY-1751] Convert Kits to Use pb_content_tag (File Upload, Filter, …
Browse files Browse the repository at this point in the history
…Form Group, and Form Pill) (#4153)

**What does this PR do?** A clear and concise description with your
runway ticket url.
Update File Upload, Filter, Form Group, and Form Pill kits to no longer
use "content_tag" and use our new "pb_content_tag".

**How to test?** Steps to confirm the desired behavior:
1. Test Rails File Upload, Filter, Form Group, and Form Pill kits on
Playbook website.
2. Test uses on Nitro.

#### Checklist:
- [x] **LABELS** Add a label: `enhancement`, `bug`, `improvement`, `new
kit`, `deprecated`, or `breaking`. See [Changelog &
Labels](https://github.com/powerhome/playbook/wiki/Changelog-&-Labels)
for details.
- [x] **DEPLOY** I have added the `milano` label to show I'm ready for a
review.
  • Loading branch information
kangaree authored Jan 30, 2025
1 parent 0719f7c commit 5d4493b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
<%= content_tag("div",
aria: object.aria,
class: object.classname,
data: object.data,
id: object.id,
**combined_html_options) do %>
<%= pb_content_tag(:div) do %>
<%= pb_rails("form_group", props: {cursor: "pointer", full_width: object.full_width}) do %>
<label
for="upload-<%= object.id %>"
Expand Down
6 changes: 1 addition & 5 deletions playbook/app/pb_kits/playbook/pb_filter/filter.html.erb
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(:div) do %>
<%= object.wrapper do %>
<%= pb_rails("flex", props: { orientation: "row", padding_right: "lg", vertical: "center" }) do %>
<% if (object.template != "sort_only") %>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
<%= content_tag(:div,
aria: object.aria,
class: object.classname,
data: object.data,
id: object.id,
**combined_html_options) do %>
<%= pb_content_tag(:div) do %>
<%= content.presence %>
<% end %>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%= content_tag(:div, id: object.id, data: object.data, class: object.classname + object.size_class, tabindex: object.tabindex, **combined_html_options) do %>
<%= pb_content_tag(:div, class: object.classname + object.size_class, tabindex: object.tabindex) do %>
<% if object.name.present? %>
<%= pb_rails("avatar", props: { name: object.name, image_url: object.avatar_url, size: "xxs" }) %>
<% if object.truncate %>
Expand Down

0 comments on commit 5d4493b

Please sign in to comment.