-
Notifications
You must be signed in to change notification settings - Fork 230
chore: testing overlay fixes #5625
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
base: main
Are you sure you want to change the base?
Conversation
|
📚 Branch Preview🔍 Visual Regression Test ResultsWhen a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:
Deployed to Azure Blob Storage: If the changes are expected, update the |
Tachometer resultsCurrently, no packages are changed by this PR... |
@@ -171,6 +171,7 @@ | |||
"@spectrum-web-components/reactive-controllers": "1.7.0", | |||
"@spectrum-web-components/shared": "1.7.0", | |||
"@spectrum-web-components/theme": "1.7.0", | |||
"@spectrum-web-components/underlay": "1.7.0", | |||
"focus-trap": "^7.6.4" | |||
}, | |||
"types": "./src/index.d.ts", |
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.
Expected object keys to be in specified order. 'types' should be before 'dependencies'.
reviewdog suggestion error
GitHub comment range and suggestion line range must be same. L177-L177 v.s. L153-L177return fragment.children[0] as HTMLElement; | ||
}; | ||
|
||
const openModalOverlay = async (event: Event) => { |
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.
Missing return type on function.
container?.insertAdjacentElement('afterend', overlay); | ||
}; | ||
|
||
const openAutoOverlay = async (event: Event) => { |
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.
Missing return type on function.
if (this.type === 'modal' || this.type === 'page') { | ||
if ( | ||
(this.type === 'modal' || this.type === 'page') && | ||
this.receivesFocus !== '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.
Move this condition to the initialFocus instead, because we want to have focus trap anyway
@@ -431,10 +432,8 @@ export class Overlay extends ComputedOverlayBase { | |||
|
|||
switch (this.type) { | |||
case 'modal': | |||
return 'auto'; | |||
case 'page': | |||
return 'manual'; |
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 changed, but github diff doesn't show it
@@ -213,11 +237,29 @@ class OverlayStack { | |||
const path = event.composedPath(); | |||
this.stack.forEach((overlayEl) => { | |||
const inPath = path.find((el) => el === overlayEl); | |||
|
|||
// Check if the trigger element is inside this overlay |
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.
dubious if needed
return 'manual'; | ||
case 'hint': |
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.
I changed hint to be hint, because why not?
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.
maybe we can't do this because previously multiple hints could be open by using hint it closes the previous open hint
Description
Motivation and context
Related issue(s)
Screenshots (if appropriate)
Author's checklist
Reviewer's checklist
patch
,minor
, ormajor
featuresManual review test cases
Descriptive Test Statement
Descriptive Test Statement
Device review