polaris icon indicating copy to clipboard operation
polaris copied to clipboard

Page component max width on the subTitle

Open Vanley opened this issue 1 year ago • 5 comments

Summary

There is newly introduced change https://github.com/Shopify/polaris/pull/11567 to the subTitle in the Page component which is setting max-width to 45ch which in bigger screen resolution creates unpleasant line break.

Expected behavior

SubTitle should be allowed to grow if there are no buttons on the right.

Actual behavior

On bigger screen resolutions width limit in this form creates awkward line break with lots of empty space. image

Steps to reproduce

Use React Page Component with subTitle longer than 45 characters. https://polaris.shopify.com/sandbox?code=N4IgLgFgpgtlDOIBcBtEAbA9gYwIbqiSgDsQBdAGhAHcBLAE0kVQHYA2ADjIF8g

Are you using React components?

None

Polaris version number

12.14.0+

Browser

any

Device

any

Vanley avatar Feb 13 '24 11:02 Vanley

Related to this change https://github.com/Shopify/polaris/pull/11567 @raphaelghub @mrcthms

Vanley avatar Feb 13 '24 11:02 Vanley

still valid with Polaris version 12.19.0

Vanley avatar Feb 27 '24 09:02 Vanley

@Vanley i was having the same issue but i believe this was fixed in 12.17.0! https://github.com/Shopify/polaris/pull/11602 for reference

pritika55 avatar Feb 27 '24 16:02 pritika55

@pritika55 it fixing some, but sadly not all. When there is at least one action button on the right then subtitle is still only 45ch in size. Which on medium and bigger screens subtitle is wrapped to second line leaving lots of empty space on the right side as per https://polaris.shopify.com/sandbox?code=N4IgLgFgpgtlDOIBcBtEAbA9gYwIbqiSgDsQBdAGhAHcBLAE0kVQHYA2ADjIF8g

Vanley avatar Feb 27 '24 16:02 Vanley