-
Notifications
You must be signed in to change notification settings - Fork 235
fix(overlay-trigger): update overlay-trigger interactions type #5806
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
🦋 Changeset detectedLatest commit: 85aaf9a The changes in this PR will be included in the next version bump. This PR includes changesets to release 84 packages
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 |
📚 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 resultsChromeoverlay permalinkbasic-test
directive-test permalink
element-test permalink
lazy-test permalink
Firefoxoverlay permalinkbasic-test
directive-test permalink
element-test permalink
lazy-test permalink
|
Pull Request Test Coverage Report for Build 18740821736Details
💛 - Coveralls |
this.innerTrigger = this.testDiv.querySelector( | ||
'#inner-trigger' | ||
) as OverlayTrigger; | ||
)! as OverlayTrigger; |
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.
By casting these, it will offer us correct Intellisense.
'inline' | 'modal' | 'replace' | ||
>; | ||
await elementUpdated(this.outerTrigger); | ||
const outerTrigger = this.outerTrigger as OverlayTrigger; |
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.
Casting this means that if we ever pass a type that’s not valid, the next line will throw TS error and test will fail.
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.
LGTM!
Description
Updated the type property in
OverlayTrigger
class to acceptOverlayTypes
instead of the more restrictiveOverlayTriggerInteractions
. This change expands the allowed values from 'modal' to all overlay types ('auto', 'hint', 'manual', 'modal', 'page') for the click content. Also updated the documentation to reflect this.What I changed:
OverlayTriggerInteractions
toTriggerInteractions
OVERLAY_TYPES
const array for runtime use and to have a single source of truth, also to use in the...Motivation and context
The previous definition was incorrect.
Related issue(s)
Author's checklist
Reviewer's checklist
patch
,minor
, ormajor
featuresManual review test cases