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

Fix Dashboard Scrolling When the Calendar is Opened #8000

Merged
merged 1 commit into from
Jul 25, 2024

Conversation

jrjohnson
Copy link
Member

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.

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.
@jrjohnson jrjohnson marked this pull request as ready for review July 25, 2024 00:00
@jrjohnson jrjohnson requested a review from stopfstedt as a code owner July 25, 2024 00:00
Copy link
Member

@stopfstedt stopfstedt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@stopfstedt
Copy link
Member

@dartajax please have a look at this as well.

@stopfstedt stopfstedt removed the request for review from dartajax July 25, 2024 00:16
Copy link
Member

@dartajax dartajax left a 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

@dartajax
Copy link
Member

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?

Copy link
Member

@dartajax dartajax left a 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?

Copy link
Member

@dartajax dartajax left a 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

@dartajax dartajax enabled auto-merge July 25, 2024 20:06
@dartajax dartajax merged commit f40b4ea into ilios:master Jul 25, 2024
63 of 70 checks passed
@jrjohnson jrjohnson deleted the calendar-scroll branch July 25, 2024 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants