-
Notifications
You must be signed in to change notification settings - Fork 27
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
Fix Dashboard Scrolling When the Calendar is Opened #8000
Conversation
Instead of scrolling the calendar element into view I've used the scrolling container element itself to scroll to the position of the first event. This happens anytime the events list is updated. The offsetTop property on an element uses a feature called offsetParent which discovers the nearest ancestor element with a relative or absolute position. I've added that positioning property to the scrolling container so it is correctly identified as the offsetParent.
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
@dartajax please have a look at this as well. |
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.
that's quite nice indeed
In regression testing, testing the learner group calendar, I noticed that on demo currently the user is routed down to the calendar when the "Show Calendar" button is pressed. This is the preferred behavior. In this netlify PR version, this does not happen. It should - this constitutes a change request from me. @jrjohnson? |
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.
In regression testing, testing the learner group calendar, I noticed that on demo currently the user is routed down to the calendar when the "Show Calendar" button is pressed. This is the preferred behavior. In this netlify PR version, this does not happen. It should - this constitutes a change request from me. @jrjohnson?
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.
gonna put in a new ticket for my change request which is outside the scope of this one - and I approve of this one
This should resolve the jump of the entire page when the calendar is opened. Instead of scrolling the calendar element into view I've used the scrolling container element itself to scroll to the position of the first event. This happens anytime the events list is updated.
The offsetTop property on an element uses a feature called offsetParent which discovers the nearest ancestor element with a relative or absolute position. I've added that positioning property to the scrolling container so it is correctly identified as the offsetParent.
Refs: ilios/ilios#4838 ilios/ilios#4867 which have both been closed in other ways, but should be re-tested to ensure I didn't break them more.