Shopify / polaris

Shopifyโ€™s design system to help us work together to build a great experience for all of our merchants.
https://polaris.shopify.com
Other
5.82k stars 1.18k forks source link

[polaris.shopify.com] Feedback (on /components/layout-and-structure/inline) #8772

Open artyrcheek opened 1 year ago

artyrcheek commented 1 year ago

The old Stack component would give us options for distribution, are we just supposed to create our own flex divs for that now?!

chloerice commented 1 year ago

Hi @artyrcheek ๐Ÿ‘‹๐Ÿฝ The LegacyStack.distribution prop handled horizontal alignment, which maps to the Inline.align prop or the AlphaStack.inlineAlign prop on the new components.

artyrcheek commented 1 year ago

My bad!

chloerice commented 1 year ago

No worries at all!! There's a learning curve with these new components.

RienNeVaPlus commented 1 year ago

The old Stack component allowed it's children to fill. Is this still possible?

<LegacyStack>
    <LegacyStack.Item fill>Filling child</LegacyStack.Item>
    <Button>Pushed to right side</Button>
</LegacyStack>
peylun commented 1 year ago

Bumping the above, it is a pretty common use case at least for our app where we would need a section that fills the remaining space: image

Is it possible for e.g. HorizontalStack to allow specification of flex to allow greater flexibility (we could then set to 1 for the fill item in this case)? We couldn't currently move from LegacyStack to HorizontalStack unless we do custom styling. That said, HorizontalStack / VerticalStack fixed some of the issues on LegacyStack and I really like it~

RienNeVaPlus commented 1 year ago

This is how I ended up doing it:

The