Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Deprecation warnings #2676

Closed
xjunior opened this issue Aug 2, 2023 · 1 comment
Closed

Deprecation warnings #2676

xjunior opened this issue Aug 2, 2023 · 1 comment

Comments

@xjunior
Copy link
Contributor

xjunior commented Aug 2, 2023

Describe the bug

While running specs for nitro-id, I encountered a few deprecation warnings that were coming straight from Playbook:

Prop Warning: Playbook::PbBody::Body Kit: The prop 'status' is deprecated and will be removed in a future release!

playbook/app/pb_kits/playbook/pb_stat_change/stat_change.html.erb:5:      <%= pb_rails("body", props: { status: object.status }) do %>
playbook/app/pb_kits/playbook/pb_select/select.html.erb:13:      <%= pb_rails("body", props: { status: "negative", text: object.error }) %>
playbook/app/pb_kits/playbook/pb_select/select.html.erb:31:      <%= pb_rails("body", props: { status: "negative", text: object.error }) %>
playbook/app/pb_kits/playbook/pb_checkbox/checkbox.html.erb:18:    <%= pb_rails("body", props: { status: object.checkbox_label_status, text: object.text, dark: object.dark, margin_right: object.form_spacing ? "xs" : "" }) %>
playbook/app/pb_kits/playbook/pb_radio/radio.html.erb:16:    <%= pb_rails("body", props: { status: object.body_status, text: object.text, dark: object.dark }) %>
playbook/app/pb_kits/playbook/pb_text_input/text_input.html.erb:18:    <%= pb_rails("body", props: {dark: object.dark, status: "negative", text: object.error}) if object.error %>
playbook/app/pb_kits/playbook/pb_textarea/textarea.html.erb:11:      <%= pb_rails("body", props: { dark: object.dark, status: "negative", text: object.error }) %>
playbook/app/pb_kits/playbook/pb_textarea/textarea.html.erb:28:             <%= pb_rails("body", props: { dark: object.dark, status: "negative", text: object.error }) %>
playbook/app/pb_kits/playbook/pb_textarea/textarea.html.erb:35:        <%= pb_rails("body", props: { dark: object.dark, status: "negative", text: object.error }) %>

Prop Warning: Playbook::PbFlex::Flex Kit: The prop 'vertical' is deprecated and will be removed in a future release!

playbook/app/pb_kits/playbook/pb_label_value/label_value.html.erb:8:        <%= pb_rails("flex", props: {inline: true, vertical: "center"}) do %>
playbook/app/pb_kits/playbook/pb_label_value/label_value.html.erb:14:                <%= pb_rails("flex", props: {inline: true, vertical: "center"}) do %>
playbook/app/pb_kits/playbook/pb_date_range_stacked/date_range_stacked.html.erb:6:    <%= pb_rails("flex", props: {vertical: "center"}) do %>
playbook/app/pb_kits/playbook/pb_filter/filter.html.erb:6:      <%= pb_rails("flex", props: { orientation: "row", padding_right: "lg", vertical: "center" }) do %>
playbook/app/pb_kits/playbook/pb_filter/filter.html.erb:55:        <%= pb_rails("flex", props: {orientation: "row", vertical: "center", spacing: "between", classname: "filter-bottom"}) do %>
playbook/app/pb_kits/playbook/pb_filter/filter.html.erb:57:            <%= pb_rails("flex", props: {orientation: "row", vertical: "center"}) do %>
playbook/app/pb_kits/playbook/pb_date_time_stacked/date_time_stacked.html.erb:7:  <%= pb_rails("flex", props: {classname: "flex-container", vertical: "stretch"}) do %>
playbook/app/pb_kits/playbook/pb_selectable_card/selectable_card.html.erb:15:        <%= pb_rails("flex", props: { vertical: "center" }) do %>
playbook/app/pb_kits/playbook/pb_text_input/add_on.html.erb:1:<%= pb_rails("flex", props: { classname: "add-on-#{alignment} #{border_css}", vertical: "center"}) do %>
playbook/app/pb_kits/playbook/pb_textarea/textarea.html.erb:26:        <%= pb_rails("flex", props: { spacing: "between", vertical: "center" }) do %>
playbook/app/pb_kits/playbook/pb_collapsible/collapsible_main.html.erb:7:    <%= pb_rails("flex", props: {vertical: "center", spacing: "between", cursor: "pointer"}) do %>

Prop Warning: Playbook::PbFlex::Flex Kit: The prop 'spacing' is deprecated and will be removed in a future release!

playbook/app/pb_kits/playbook/pb_dialog/dialog_footer.html.erb:7:        <%= pb_rails("flex", props: { classname:object.classname, spacing:"between", padding_x:"sm", padding:"sm", padding_bottom:"sm" }) do %>
playbook/app/pb_kits/playbook/pb_dialog/dialog_header.html.erb:6:        <%= pb_rails("flex", props: {classname:object.classname, spacing:"between", padding:"sm", align:"center"}) do %>
playbook/app/pb_kits/playbook/pb_filter/filter.html.erb:55:        <%= pb_rails("flex", props: {orientation: "row", vertical: "center", spacing: "between", classname: "filter-bottom"}) do %>
playbook/app/pb_kits/playbook/pb_textarea/textarea.html.erb:26:        <%= pb_rails("flex", props: { spacing: "between", vertical: "center" }) do %>
playbook/app/pb_kits/playbook/pb_collapsible/collapsible_main.html.erb:7:    <%= pb_rails("flex", props: {vertical: "center", spacing: "between", cursor: "pointer"}) do %>

Expected behavior

Once a prop is deprecated to the outside world, I would expect their usage to be eliminated from Playbook, so it doesn't trigger warnings in other apps.

@co1in-1ewis
Copy link
Contributor

Closed in favor of PLAY-961.

github-merge-queue bot pushed a commit that referenced this issue Sep 19, 2023
[PLAY-961](https://nitro.powerhrg.com/runway/backlog_items/PLAY-961)

This PR turns off deprecation warnings to solve [issue
2676](#2676)


**Screenshots:** Screenshots to visualize your addition/change


**How to test?** Steps to confirm the desired behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See addition/change


#### Checklist:
- [ ] **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.
- [ ] **DEPLOY** I have added the `milano` label to show I'm ready for a
review.
- [ ] **TESTS** I have added test coverage to my code.

Co-authored-by: Jasper Furniss <jasper.furniss@powerhrg.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants