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
Schedule two-weeks and monthly view #4318
base: dev
Are you sure you want to change the base?
Schedule two-weeks and monthly view #4318
Conversation
// wait until a scroll to the "Rotations" happened | ||
setTimeout(() => { | ||
setIsOpen(true); | ||
}, 100); |
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.
Why do we need to wait for a scroll to happen on Rotations Form? Maybe add a comment to indicate the reason? Seems very hackish, is it guaranteed to work all the times for 100ms?
@@ -18,6 +18,10 @@ export const waitForElement = (selector: string) => { | |||
}); | |||
}; | |||
|
|||
export const scrollToElement = (element: Element, behavior: ScrollBehavior = 'instant' as ScrollBehavior) => { | |||
document.getElementById('rotations').scrollIntoView({ behavior, block: 'center' }); |
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 should use the element instead, right?
@@ -100,27 +101,25 @@ class _Rotations extends Component<RotationsProps, RotationsState> { | |||
|
|||
return ( | |||
<> | |||
<div className={cx('root')}> | |||
<div id="rotations" className={cx('root')}> |
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 namepsace these ids to be part of grafana oncall only maybe? Or even better, could we instead access these elements through refs so that we don't use ids?
What this PR does
Update layers visualisation
Which issue(s) this PR closes
https://github.com/grafana/oncall-private/issues/2667
Checklist
pr:no public docs
PR label added if not required)release:
). These labels dictate how your PR willshow up in the autogenerated release notes.