Skip to content
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

fix(accordion): ensure disableContentPadding works with subtle variant #6728

Merged
merged 1 commit into from
May 24, 2024

Conversation

nuria1110
Copy link
Contributor

fix #6723

Proposed behaviour

disableContentPadding prop removes padding in "subtle" variant.

Current behaviour

disableContentPadding prop has no effect on "subtle" variant.

Checklist

  • Commits follow our style guide
  • Related issues linked in commit messages if required
  • Screenshots are included in the PR if useful
  • All themes are supported if required
  • Unit tests added or updated if required
  • Playwright automation tests added or updated if required
  • Storybook added or updated if required
  • Translations added or updated (including creating or amending translation keys table in storybook) if required
  • Typescript d.ts file added or updated if required
  • Related docs have been updated if required

QA

  • Tested in provided StackBlitz sandbox/Storybook
  • Add new Playwright test coverage if required
  • Carbon implementation matches Design System/designs
  • UI Tests GitHub check reviewed if required

Additional context

Testing instructions

@@ -111,519 +107,3 @@ export const Grouped = ({ ...args }) => (
);

Grouped.storyName = "grouped";

Copy link
Contributor

Choose a reason for hiding this comment

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

praise(non-blocking): nice bit of tidying up here 😄

${({ disableContentPadding }) =>
disableContentPadding &&
css`
padding: 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion(non-blocking): I see that we've used the Design Tokens elsewhere in this file to specify values. Might be nice to update this value too whilst we're moving this code block.

Suggested change
padding: 0;
padding: var(--spacing000);

Copy link
Contributor

Choose a reason for hiding this comment

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

For consistency sake I think it's a fair argument but it is a strange design token when you think about it. When would 0 spacing ever need to be changed from 0? Not entirely sure why that exists, I guess maybe there's a world when you decide 0 spacing should actually be a little spacing...?

@@ -7,28 +7,6 @@ import { Checkbox } from "../checkbox";
import { Dl, Dt, Dd } from "../definition-list";
import Link from "../link/link.component";

export const Grouped = () => (
Copy link
Contributor

Choose a reason for hiding this comment

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

question(non-blocking): was this meant to be deleted? We have a Chromatic snapshot capturing this test story that is all.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I deleted this as it seemed copied over from the test stories and was not being used anywhere, I also don't think we have any snapshots for this component as its set to disableSnapshot: true on the test stories.

nineteen88
nineteen88 previously approved these changes May 16, 2024
${({ disableContentPadding }) =>
disableContentPadding &&
css`
padding: 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

For consistency sake I think it's a fair argument but it is a strange design token when you think about it. When would 0 spacing ever need to be changed from 0? Not entirely sure why that exists, I guess maybe there's a world when you decide 0 spacing should actually be a little spacing...?

DipperTheDan
DipperTheDan previously approved these changes May 17, 2024
@nuria1110 nuria1110 marked this pull request as ready for review May 17, 2024 09:19
@nuria1110 nuria1110 requested review from a team as code owners May 17, 2024 09:19
@nuria1110 nuria1110 dismissed stale reviews from DipperTheDan and nineteen88 via a2f4292 May 17, 2024 14:21
Fixes issue where disableContentPadding prop had no effect in subtle variant.

fix #6723
@nuria1110 nuria1110 merged commit 391267d into master May 24, 2024
21 checks passed
@nuria1110 nuria1110 deleted the FE-6569 branch May 24, 2024 08:54
@carbonci
Copy link
Collaborator

🎉 This PR is included in version 135.1.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Accordeon with Subtle Variant - Can not reduce the padding under the last content
5 participants