Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Officially add null as Badge status option #2612

Merged
merged 2 commits into from
Feb 4, 2025

Conversation

NathanJolly
Copy link
Contributor

@NathanJolly NathanJolly commented Feb 4, 2025

Part of https://github.com/Shopify/pos-next-react-native/issues/32885

Background

Badge has a prop called status that is optional. Typically, removing this prop should hide the icon, but something about the extensibility bridge retains the last-known value instead. This workaround allows partners to hide the icon, and is already in use per Shopify guidance.

Solution

This adds null as an officially supported badge status type so that folks know it's OK to use.

🎩

Set a Badge's status prop to something other than undefined or null.
Verify the status icon appears.
Set the Badge's status prop to null.
Verify the status icon disappears.

Checklist

  • I have 🎩'd these changes
  • I have updated relevant documentation

@NathanJolly NathanJolly self-assigned this Feb 4, 2025

This comment has been minimized.

Copy link
Contributor

@vctrchu vctrchu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something worthy to be added quickly to the sandbox?

@NathanJolly
Copy link
Contributor Author

Something worthy to be added quickly to the sandbox?

Yes, I have the sandbox changes ready to go to support this, just need this version to go out so I can install it on the sandbox! https://github.com/Shopify/pos-e2e-ui-extension/pull/new/njo/badgescreen-status-null

@NathanJolly NathanJolly force-pushed the njo/pos-add-banner-status-none branch from 440845a to 6298921 Compare February 4, 2025 17:31
@NathanJolly NathanJolly merged commit bc9af28 into unstable Feb 4, 2025
6 checks passed
@NathanJolly NathanJolly deleted the njo/pos-add-banner-status-none branch February 4, 2025 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants