-
Notifications
You must be signed in to change notification settings - Fork 49
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
Scroll to Bottom: Function in modal blog view #977
base: master
Are you sure you want to change the base?
Scroll to Bottom: Function in modal blog view #977
Conversation
…prilSylph#976)" This reverts commit 41f58fa.
Issue with this: because the button color is now customized by the user theme (?), the button color will desync when navigating to a different blog in the modal.
|
There must be a better way to do this.
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.
Nice, it works.
Some details I care about, though:
- Showing both the regular scroll to top button and the blog view one at the same time is kinda weird. Let's hide the regular button when the blog view modal is open.
- Only showing the blog view scroll to bottom button when the blog view scroll to top button is visible doesn't make sense to me. Let's match the behaviour of the regular one, where it is shown regardless of scroll position.
- The active
--yellow
can't be expected to always contrast against the button's background colour... could we... change the button's background colour to--black
when scrolling?- I was initially thinking we use the same colour as the BG but apply an invert colours filter on the SVG, but that's probably really weird-looking.
Oh, definitely. Not immediately sure how to do that, so if anyone has any ideas, hit me up.
You know, I'm not actually sure how to do that either? |
Note: This can probably take advantage of |
still trying to find a better method for this
Yeah, I don't think this is really possible without changing the Tumblr code's handling of the |
Co-Authored-By: April Sylph <[email protected]>
Description
This adds scroll to bottom functionality in the mobile blog view. To do so, it adds a duplicate of the round "Back to top" button that's specific to the modal blog view container, and adjusts the scrolled element and observed element in
startScrolling
depending upon the presence or absence of the modal.It also replaces the
checkForButtonRemoved
pageModification callback with a check during thescrollToBottom
function.Testing steps
todo: write all of the tests that this stops scrolling when you would expect it to