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

Dialog: Add sx styles back to the footer styled-component & add visual regression tests for both Dialogs #3935

Merged
merged 4 commits into from
Nov 13, 2023

Conversation

broccolinisoup
Copy link
Member

@broccolinisoup broccolinisoup commented Nov 13, 2023

Caught an issue on the dotcom integration tests where our dialog was showing the footer when it is not supposed to. (file reference). It turns out the sx prop wasn't applied in the below code. I think #3918 introduced a regression. I believe removing the sx styles from the footer styled-component wasn't intentional.

<Dialog.Footer sx={{display: displayMode === DisplayMode.IssueCreation ? 'flex' : 'none'}}>
     <CreateIssueFooter onClose={() => onSafeClose()} />
</Dialog.Footer>
Before After
prc story that shows the dialog button has a white background, because sx styles are not applied prc story that shows the dialog button has a yellow background, because sx styles are applied

Changelog

New

Added visual regression tests for Dialog and Dialog1. (We should be able to catch these issues on our end before merged now 🤗)

Changed

Added the sx styles back to the styled footer.

Removed

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan

Testing & Reviewing

Can be looked into the custom rendering story and make sure the sx styles are applied.

Merge checklist

Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.

Copy link

changeset-bot bot commented Nov 13, 2023

🦋 Changeset detected

Latest commit: f2375ad

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Nov 13, 2023

size-limit report 📦

Path Size
dist/browser.esm.js 104.21 KB (+0.01% 🔺)
dist/browser.umd.js 104.75 KB (+0.01% 🔺)

@github-actions github-actions bot temporarily deployed to storybook-preview-3935 November 13, 2023 03:10 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-3935 November 13, 2023 03:12 Inactive
@broccolinisoup broccolinisoup changed the title y Dialog: Add sx styles back to the footer styled-component & add visual regression tests for both Dialogs Nov 13, 2023
@broccolinisoup broccolinisoup marked this pull request as ready for review November 13, 2023 03:35
@broccolinisoup broccolinisoup requested review from a team and pksjce November 13, 2023 03:35
Copy link
Contributor

@dylanatsmith dylanatsmith left a comment

Choose a reason for hiding this comment

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

Oof, sorry about this! Good catch.

Copy link
Member

@joshblack joshblack left a comment

Choose a reason for hiding this comment

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

These should help with the timeouts 🤞

e2e/components/Dialog.test.ts Outdated Show resolved Hide resolved
e2e/components/Dialog.test.ts Outdated Show resolved Hide resolved
script/generate-e2e-tests.js Outdated Show resolved Hide resolved
Co-authored-by: Josh Black <joshblack@github.com>
Copy link
Collaborator

@pksjce pksjce left a comment

Choose a reason for hiding this comment

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

Love the tests! 🥳

@broccolinisoup broccolinisoup added this pull request to the merge queue Nov 13, 2023
Merged via the queue into main with commit 8970272 Nov 13, 2023
29 checks passed
@broccolinisoup broccolinisoup deleted the bs/add-sx-back-to-dialog-footer branch November 13, 2023 23:07
@primer primer bot mentioned this pull request Nov 13, 2023
@broccolinisoup broccolinisoup mentioned this pull request Nov 13, 2023
4 tasks
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.

4 participants