-
Notifications
You must be signed in to change notification settings - Fork 116
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
Overlay component #1401
Overlay component #1401
Conversation
🦋 Changeset detectedLatest commit: 17fe2ed The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
dbe2867
to
c4fffc2
Compare
26828d0
to
25a9550
Compare
4dfe3b7
to
40f3649
Compare
7a4f00d
to
eeeff72
Compare
|
adf56aa
to
4e2b3e7
Compare
Testing something with the preview deploy, I'm gonna close this and reopen it. I want to see if that fixes the weird asset caching |
Pull request was closed
This is no longer needed
try { | ||
if (node.matches(componentSelector) || node.querySelectorAll(`:scope > ${componentSelector}`).length > 0) { | ||
return true; | ||
} | ||
} catch (e) { | ||
return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed because :open
is not currently a valid selector. The CSS parser in the browser will safely ignore this rule, but matches
/qSA
will throw. Given these are CSS selectors only, we just want to return false instead of throw.
Its still not working right for me when I test the deploy 😦 is it just me?! Am I cursed? CleanShot.2023-02-23.at.09.37.21.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 Excited to ship this and keep iterating!
This is the initial implementation of the
Primer::Alpha::Overlay
component done in #1214.This is largely based off of
Primer::Alpha::Dialog
but with various tweaks to improve ergonomics and make it more generically applicable to overlays. In addition it builds upon the work we've done in https://github.com/oddbird/popup-polyfill to build a polyfill for the popup API.This doesn't implement the oddbird polyfill, and instead ships a custom element in order to provide the same popup APIs. This will allow us to expedite shipping this, and work on migrating to the polyfill piecemeal.