-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix truncate issue for text in ContextualSaveBar #11625
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
Conversation
f09650f to
5159480
Compare
| & [class*='Polaris-Icon__Svg'], | ||
| & [class*='Icon-Svg'] { | ||
| & [class*='Polaris-Icon__Svg'] { | ||
| fill: var(--p-color-text-inverse); | ||
| } | ||
| & [class*='Polaris-Icon'] { | ||
| flex-shrink: 0; /* Prevents the icon from shrinking */ | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sam-b-rose is there a reason we have [class*='Icon-Svg']? We couldn't see it's usage in contextual save bar examples. It was added in an button PR here: #9817
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sam-b-rose is out of office, but I can ship a fix later if we think this is needed once confirmed.
polaris-react/src/components/Frame/components/ContextualSaveBar/ContextualSaveBar.module.scss
Outdated
Show resolved
Hide resolved
polaris-react/src/components/Frame/components/ContextualSaveBar/ContextualSaveBar.module.scss
Outdated
Show resolved
Hide resolved
alex-page
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question for @sam-b-rose around the icon class name. Not blocking feel free to ship.
5f84c35 to
6abb1bc
Compare
Fixes Co-authored-by: Alex Page <hi@alexpage.dev> Fixes Co-authored-by: Alex Page <hi@alexpage.dev>
d896088 to
f2f6d86
Compare
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @shopify/polaris-icons@8.5.0 ### Minor Changes - [#11639](#11639) [`4db32af27`](4db32af) Thanks [@ardakaracizmeli](https://github.com/ardakaracizmeli)! - Added a new icon: ArrowDiagonal ### Patch Changes - [#11633](#11633) [`8a9225306`](8a92253) Thanks [@heyjoethomas](https://github.com/heyjoethomas)! - Update mobile icon design ## @shopify/polaris@12.18.0 ### Minor Changes - [#11625](#11625) [`9aed8c18f`](9aed8c1) Thanks [@sainihas](https://github.com/sainihas)! - Fix truncate issue for text in ContextualSaveBar - [#11604](#11604) [`376e6ded7`](376e6de) Thanks [@mrcthms](https://github.com/mrcthms)! - Updated IndexFilters to better support a configuration of only search and sort - [#11613](#11613) [`92d02613b`](92d0261) Thanks [@lgriffee](https://github.com/lgriffee)! - Deprecated `heading2xl` and `heading3xl` variants in `Text` component - [#11611](#11611) [`b79741cf8`](b79741c) Thanks [@kyledurand](https://github.com/kyledurand)! - Added `size` prop to `Tag` ### Patch Changes - [#11624](#11624) [`b60ba0710`](b60ba07) Thanks [@lgriffee](https://github.com/lgriffee)! - Reverted application of native mobile styles to Button component - [#11628](#11628) [`bef27c076`](bef27c0) Thanks [@ardakaracizmeli](https://github.com/ardakaracizmeli)! - Fixed an issue where a border displayed between the main content of the frame and the sidebar - Updated dependencies \[[`4db32af27`](4db32af), [`8a9225306`](8a92253)]: - @shopify/polaris-icons@8.5.0 ## polaris.shopify.com@0.63.1 ### Patch Changes - Updated dependencies \[[`b60ba0710`](b60ba07), [`4db32af27`](4db32af), [`9aed8c18f`](9aed8c1), [`376e6ded7`](376e6de), [`8a9225306`](8a92253), [`92d02613b`](92d0261), [`b79741cf8`](b79741c), [`bef27c076`](bef27c0)]: - @shopify/polaris@12.18.0 - @shopify/polaris-icons@8.5.0 Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
### WHY are these changes introduced? Fixes an issue where the text in contextual save bar was not truncating and instead overflows by pushing the actions outside the viewport. | Before | After | | ------------- | ------------- | |  |  | ### WHAT is this pull request doing? * [`polaris-react/src/components/Frame/components/ContextualSaveBar/ContextualSaveBar.module.scss`](diffhunk://#diff-654612881065e78ef49ae5b04a227d423e5dd71663e4128c00bb39cac649fccdR73-R82): Added `overflow: hidden;` and `margin-right: var(--p-space-200);` to improve the layout and spacing of the component. Also added `flex-shrink: 0;` to prevent the icon from shrinking. ### How to 🎩 🖥 [Local development instructions](https://github.com/Shopify/polaris/blob/main/README.md#install-dependencies-and-build-workspaces) 🗒 [General tophatting guidelines](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md) 📄 [Changelog guidelines](https://github.com/Shopify/polaris/blob/main/.github/CONTRIBUTING.md#changelog) ### 🎩 checklist - [x] Tested a [snapshot](https://github.com/Shopify/polaris/blob/main/documentation/Releasing.md#-snapshot-releases) - [x] Tested on [mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing) - [x] Tested on [multiple browsers](https://help.shopify.com/en/manual/shopify-admin/supported-browsers) - [x] Tested for [accessibility](https://github.com/Shopify/polaris/blob/main/documentation/Accessibility%20testing.md) - [x] Updated the component's `README.md` with documentation changes - [x] [Tophatted documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md) changes in the style guide Co-authored-by: Alex Page <hi@alexpage.dev>
WHY are these changes introduced?
Fixes an issue where the text in contextual save bar was not truncating and instead overflows by pushing the actions outside the viewport.
WHAT is this pull request doing?
polaris-react/src/components/Frame/components/ContextualSaveBar/ContextualSaveBar.module.scss: Addedoverflow: hidden;andmargin-right: var(--p-space-200);to improve the layout and spacing of the component. Also addedflex-shrink: 0;to prevent the icon from shrinking.How to 🎩
🖥 Local development instructions
🗒 General tophatting guidelines
📄 Changelog guidelines
🎩 checklist
README.mdwith documentation changes