You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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!
The text was updated successfully, but these errors were encountered:
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 thatrenderSomething()
has the ability to directly return null (or a component); whereas even if<Something />
returns null, theSomething
component is still in the component tree and anItem
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:
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!
The text was updated successfully, but these errors were encountered: