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

Hide empty Items in a LegacyStack #10072

Closed
craigmichaelmartin opened this issue Aug 15, 2023 · 1 comment
Closed

Hide empty Items in a LegacyStack #10072

craigmichaelmartin opened this issue Aug 15, 2023 · 1 comment

Comments

@craigmichaelmartin
Copy link
Contributor

Issue summary

Hey team! Thanks for all your work on Polaris! This is a bit of an Issue / Feature Request hybrid.

Do you think there would be any appetite for hiding empty Polaris-LegacyStack__Item?

Actual behavior

I've seen a number of places internally where we use a pattern I had never seen before - in JSX doing {renderSomething()} instead of making a Something components and using <Something />. This is done inside <LegacyStack> components so that renderSomething() has the ability to directly return null (or a component); whereas even if <Something /> returns null, the Something component is still in the component tree and an Item is rendered for it.

Here is an example where we are seeing too much spacing due to an empty item from a component which returned null:

Screenshot 2023-08-15 at 4 04 09 PM Screenshot 2023-08-15 at 4 27 43 PM

Expected behavior

It seems that hiding empty Items in a LegacyStack would be helpful, but I am sure there are many tradeoffs to consider! I'm happy to open a PR if this seem legitimate. Thanks!

Copy link
Contributor

Hi! We noticed there hasn’t been activity on this issue in a while. After 30 days, it will close automatically.

If it’s still relevant, or you have updates, comment and let us know. And don’t worry, you can always re-open later if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant