Skip to content

Add check for responsive in roundStyle #7187

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

Merged
merged 9 commits into from
Apr 11, 2024
Merged

Conversation

britt6612
Copy link
Collaborator

What does this PR do?

fixes Box round prop not respecting responsive

Where should the reviewer start?

styles.js

What testing has been done on this PR?

locally

How should this be manually tested?

    <Box pad="medium" gap="small">
      <Box pad="large" border="all" round="large">
        <Heading>Responsive Box</Heading>
      </Box>

      <Box responsive={false} pad="large" border="all" round="large">
        <Heading>Non-Responsive Box</Heading>
        <Paragraph>round with string prop ❌</Paragraph>
      </Box>

      <Box
        responsive={false}
        pad="large"
        border="all"
        round={{ corner: "top", size: "large" }}
      >
        <Heading>Non-Responsive Box</Heading>
        <Paragraph>round with object prop ✅</Paragraph>
      </Box>
    </Box>

Do Jest tests follow these best practices?

  • screen is used for querying.
  • The correct query is used. (Refer to this list of queries)
  • asFragment() is used for snapshot testing.

Any background context you want to provide?

see issue #6445

For Skeleton there was ${(props) => props.round && roundStyle(props.round, props.responsive, props.theme)}
however there is no responsive prop on Skeleton so just changed to true

What are the relevant issues?

closes #6445

Screenshots (if appropriate)

Do the grommet docs need to be updated?

no

Should this PR be mentioned in the release notes?

yes

Is this change backwards compatible or is it a breaking change?

backwards compatible

@britt6612 britt6612 requested a review from taysea April 4, 2024 19:04
@taysea taysea changed the title add check for responsive Add check for responsive in roundStyle Apr 9, 2024
@britt6612 britt6612 requested a review from taysea April 11, 2024 03:02
Copy link
Collaborator

@taysea taysea left a comment

Choose a reason for hiding this comment

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

Thank you!

@taysea taysea requested a review from jcfilben April 11, 2024 15:20
@jcfilben
Copy link
Collaborator

In the PR description it says the docs do not need to be updated for this change but I think we would need to update the responsive prop documentation

@britt6612
Copy link
Collaborator Author

In the PR description it says the docs do not need to be updated for this change but I think we would need to update the responsive prop documentation

I can update!

Copy link
Collaborator

@jcfilben jcfilben left a comment

Choose a reason for hiding this comment

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

Looks good!

@taysea taysea merged commit f9fc3ac into grommet:master Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Box "round" prop not respecting whether its responsive
3 participants