Skip to content
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

Open
wants to merge 20 commits into
base: dev
Choose a base branch
from

Conversation

maskin25
Copy link
Member

@maskin25 maskin25 commented May 7, 2024

What this PR does

Update layers visualisation

Which issue(s) this PR closes

https://github.com/grafana/oncall-private/issues/2667

Checklist

  • Unit, integration, and e2e (if applicable) tests updated
  • Documentation added (or pr:no public docs PR label added if not required)
  • Added the relevant release notes label (see labels prefixed w/ release:). These labels dictate how your PR will
    show up in the autogenerated release notes.

@maskin25 maskin25 added involved:Frontend release:enhancement PR will be added to "Exciting New Features 🎉" section of release notes labels May 24, 2024
@maskin25 maskin25 self-assigned this May 24, 2024
@maskin25 maskin25 marked this pull request as ready for review May 24, 2024 12:48
@maskin25 maskin25 requested a review from a team as a code owner May 24, 2024 12:48
@maskin25 maskin25 added the pr:no public docs Added to a PR that does not require public documentation updates label May 24, 2024
@maskin25 maskin25 changed the title Update layers visualization Schedule two-weeks and monthly view May 24, 2024
// wait until a scroll to the "Rotations" happened
setTimeout(() => {
setIsOpen(true);
}, 100);
Copy link
Member

@teodosii teodosii May 24, 2024

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' });
Copy link
Member

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')}>
Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
involved:Frontend pr:no public docs Added to a PR that does not require public documentation updates release:enhancement PR will be added to "Exciting New Features 🎉" section of release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants