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

Separating anchored position and Overlay class #2088

Merged
merged 5 commits into from
Jun 23, 2023
Merged

Conversation

jonrohan
Copy link
Member

@jonrohan jonrohan commented Jun 22, 2023

Authors: Please fill out this form carefully and completely.

Reviewers: By approving this Pull Request you are approving the code change, as well as its deployment and mitigation plans.
Please read this description carefully. If you feel there is anything unclear or missing, please ask for updates.

What are you trying to accomplish?

Dialog overlay wasn't scrolling the body and fixing the header/footer properly. When the revert is applied, it's reverting to display: block; instead of the display: flex that it needs to be. I originally tried to fix this by seeing if there was a better option for display: revert; but that leads to other problems with the overlay not disappearing.

@supports selector(:popover-open) {
  .Overlay[popover]:not(.\:popover-open) {
    display: revert;
  }
}

Screenshots

Before
image

After
image

Demo

Integration

No

List the issues that this change affects.

Closes https://github.com/github/primer/issues/2375

Risk Assessment

  • Low risk the change is small, highly observable, and easily rolled back.
  • Medium risk changes that are isolated, reduced in scope or could impact few users. The change will not impact library availability.
  • High risk changes are those that could impact customers and SLOs, low or no test coverage, low observability, or slow to rollback.

What approach did you choose and why?

Anything you want to highlight for special attention from reviewers?

Accessibility

  • Fixes axe scan violation - This change fixes an existing axe scan violation.
  • No new axe scan violation - This change does not introduce any new axe scan violations.
  • New axe violation - This change introduces a new axe scan violation. Please describe why the violation cannot be resolved below.

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Added/updated previews (Lookbook)
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

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

@jonrohan jonrohan requested a review from a team as a code owner June 22, 2023 21:51
@jonrohan jonrohan requested review from a team, lukasoppermann and camertron June 22, 2023 21:51
@changeset-bot
Copy link

changeset-bot bot commented Jun 22, 2023

🦋 Changeset detected

Latest commit: f566a4f

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

This PR includes changesets to release 1 package
Name Type
@primer/view-components Minor

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

@jonrohan jonrohan temporarily deployed to preview June 22, 2023 21:51 — with GitHub Actions Inactive
@github-actions
Copy link
Contributor

Uh oh! @jonrohan, the image you shared is missing helpful alt text. Check your pull request body.

Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image.

Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.

@github-actions github-actions bot added css Pull requests that update CSS code javascript Pull requests that update Javascript code ruby Pull requests that update Ruby code labels Jun 22, 2023
@jonrohan jonrohan temporarily deployed to github-pages June 22, 2023 21:55 — with GitHub Actions Inactive
@jonrohan jonrohan temporarily deployed to preview June 22, 2023 23:08 — with GitHub Actions Inactive
@jonrohan jonrohan temporarily deployed to github-pages June 22, 2023 23:13 — with GitHub Actions Inactive
@github-actions
Copy link
Contributor

Uh oh! @jonrohan, the image you shared is missing helpful alt text. Check your pull request body.

Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image.

Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.

'Overlay--anchorSide-outsideLeft',
'Overlay--anchorSide-outsideRight'
)
this.classList.add(`Overlay--anchorAlign-${anchorAlign}`, `Overlay--anchorSide-${anchorSide}`)
Copy link
Member

Choose a reason for hiding this comment

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

These will change as getAnchoredPosition falls back to other sides so we might want to thoroughly test this and make sure it isn't regressing.

Copy link
Member Author

Choose a reason for hiding this comment

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

I couldn't find these classes in PVC or dotcom codebases. Maybe they were leftover from another iteration? I can pull into a separate PR if we want to test this change more thoroughly

Copy link
Member

Choose a reason for hiding this comment

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

Must be a holdover then. Go ahead and 🔥 🔥 🔥

@jonrohan jonrohan temporarily deployed to github-pages June 23, 2023 15:18 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css Pull requests that update CSS code javascript Pull requests that update Javascript code minor release ruby Pull requests that update Ruby code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants