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
refactor(overlay): make interaction controllers more lazy #4319
Conversation
Lighthouse scores
What is this?Lighthouse scores comparing the documentation site built from the PR ("Branch") to that of the production documentation site ("Latest") and the build currently on Transfer Size
Request Count
|
Tachometer resultsChromeaction-bar permalinkbasic-test
action-menu permalinktest-basic
test-directive permalink
test-lazy permalink
test-open-close-directive permalink
test-open-close permalink
combobox permalinkbasic-test
light-dom-test permalink
menu permalinktest-basic
overlay permalinkbasic-test
directive-test permalink
element-test permalink
lazy-test permalink
picker permalinkbasic-test
popover permalinktest-basic
split-button permalinkbasic-test
tooltip permalinktest-basic
test-directive permalink
test-element permalink
test-lazy permalink
truncated permalinkbasic-test
Firefoxaction-bar permalinkbasic-test
action-menu permalinktest-basic
test-directive permalink
test-lazy permalink
test-open-close-directive permalink
test-open-close permalink
combobox permalinkbasic-test
light-dom-test permalink
menu permalinktest-basic
overlay permalinkbasic-test
directive-test permalink
element-test permalink
lazy-test permalink
picker permalinkbasic-test
popover permalinktest-basic
split-button permalinkbasic-test
tooltip permalinktest-basic
test-directive permalink
test-element permalink
test-lazy permalink
truncated permalinkbasic-test
|
d9d34de
to
62ce3a9
Compare
@@ -384,7 +386,10 @@ export class AbstractOverlay extends SpectrumElement { | |||
return overlay; | |||
} | |||
|
|||
static applyOptions(overlay: Overlay, options: OverlayOptions): void { | |||
static applyOptions( | |||
overlay: AbstractOverlay, |
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.
Just for curiosity which subclasses or properties we are trying to bring in by changing to AbstractOverlay from 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.
An Overlay
is an AbstractOverlay
but AbstractOverlay
comes with less transient dependencies, so there is less JS loaded when using this class in overlay-trigger-directive.ts
this.overlay.open = open; | ||
return; | ||
} | ||
if (!open) { |
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.
can we keep this above line 42?
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.
If there is a value for this.overlay
we want to apply it. If there isn't a value, and the state is closed, this is the same as having no Overlay at all, so we early return. I can add some comments on this.
62ce3a9
to
5873eec
Compare
5873eec
to
f2a7dfa
Compare
Description
Allow an interaction controller to be created without requiring the presence of an Overlay
How has this been tested?
Types of changes
Checklist