-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix(material/slider) Update slider to use injected document #18275
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
Conversation
Update Angular Material `slider` component to inject reference to document instead of accessing global variable. This allows for rendering the slider in contexts where the document is dynamically provided. This change follows the pattern used in Cdk OverlayContainer.
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 probably won't do much, because there's some logic in the slider that depends on getBoundingClientRect
which won't work on a stubbed-out document anyway.
In the slider, |
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
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.
Overall looks good, just a couple comments
Move document injection to last parameter of constructor to prevent causing API breaking changes. Also, fix minor formatting issue on import statement.
Looks good, just run this to update the API golden file:
|
Update slider API golden file to reflect document parameter being added to the constructor
Update Angular Material `slider` component to inject reference to document instead of accessing global variable. This allows for rendering the slider in contexts where the document is dynamically provided. This change follows the pattern used in Cdk OverlayContainer.
Update Angular Material `slider` component to inject reference to document instead of accessing global variable. This allows for rendering the slider in contexts where the document is dynamically provided. This change follows the pattern used in Cdk OverlayContainer. (cherry picked from commit 3bae800)
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Update Angular Material
slider
component to inject referenceto document instead of accessing global variable. This allows for
rendering the slider in contexts where the document is dynamically
provided. This change follows the pattern used in Cdk OverlayContainer.