Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/flat-masks-sniff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/polaris': patch
---

Fixed `ActionList` item `suffix` having extra padding when wrapped
2 changes: 1 addition & 1 deletion polaris-react/src/components/ActionList/ActionList.scss
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
// We need the negative margin to ensure that the image does not set
// the minimum height of the action item.
// stylelint-disable -- generated by polaris-migrator DO NOT COPY
margin: calc(-0.5 * var(--pc-action-list-image-size)) var(--p-space-4)
margin: calc(-0.5 * var(--pc-action-list-image-size)) 0
calc(-0.5 * var(--pc-action-list-image-size)) 0;
// stylelint-enable
background-size: cover;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,15 @@ export function Item({
);

const suffixMarkup = suffix && (
<Box paddingInlineStart="4">
<Box>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can Box be removed completely now?

Copy link
Contributor Author

@Ipriyankrajai Ipriyankrajai Mar 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes @kyledurand, we can remove Box as Suffix is already wrapped in span.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @kyledurand, I made changes as you suggested. Added a commit and pushed it to the main branch(i.e. same branch I created pr). But for some reason, I'm unable to see my commit here. Can you help me with this issue?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you create a new pull request for this change? That will run all the necessary checks including chromatic and make sure we don't cause any visual regressions

<span className={styles.Suffix}>{suffix}</span>
</Box>
);

const textMarkup = <span className={styles.Text}>{contentMarkup}</span>;

const contentElement = (
<Inline blockAlign="center">
<Inline blockAlign="center" gap="4">
{prefixMarkup}
{textMarkup}
{badgeMarkup}
Expand Down