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.74k stars 1.17k forks source link

[Page Actions] not collapsing into more actions on initial render #11442

Closed perrupa closed 1 week ago

perrupa commented 7 months ago

Issue summary

Page actions don't collapse into "More actions" on initial render. This is causing layout issues when a page has many actions.

reflow

If a re-render is triggered (e.g. by a resize), the component collapses the actions into "more actions" as expected.

Expected behavior

Component will render and hide actions in more items if there is not enough room.

image

Actual behavior

The component doesn't collapse the actions until the browser window is resized or a state-change triggers a re-render.

image

Steps to reproduce the problem

  1. Visit app-details for an App (the page has many app actions)
  2. resize the browser to trigger a "reflow"

Reduced test case

The best way to get your bug fixed is to provide a reduced test case. This CodeSandbox template is a great starting point.

TODO: I tihnk the app details example in web is pretty straight-forward, but I can put this together later when I have more time if helpful 👌

Specifications

Related issues

perrupa commented 7 months ago

We tried to force this pre-render collapse by putting our secondary actions in a "more actions" actionGroup which worked!

However opening the actionGroup triggers another collapse 🤣

reflow-with-groups

perrupa commented 7 months ago

Another example of inconsistent collapsing

https://github.com/Shopify/polaris/assets/1577452/714d4b20-70fa-4403-b697-12944fcebf91

github-actions[bot] commented 1 month ago

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.