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

sidebar animation improvement #43

Open
ThaUnknown opened this issue Sep 17, 2020 · 9 comments
Open

sidebar animation improvement #43

ThaUnknown opened this issue Sep 17, 2020 · 9 comments
Labels
v1 Version 1.x.x

Comments

@ThaUnknown
Copy link

the sidebar animation looks poor because of how much its moved offscreen, this can easily be fixed with:

.page-wrapper.with-sidebar[data-sidebar-hidden]>.sidebar {
    left: calc(-1 *var(--sidebar-width));
}
@halfmoonui
Copy link
Owner

Good point, I will also test this out.

@halfmoonui
Copy link
Owner

Hey, I was going to patch this out in v1.1.1, but after testing it, I found that the sidebar animation is still a bit jarring, especially when the page has a lot of content and iFrames (such as in the docs website). Do you perhaps have any other suggestion for this? I think the cubic-bezier function may be causing the delay.

@ThaUnknown
Copy link
Author

ThaUnknown commented Oct 9, 2020

sorry for the late reply, however, I couldn't find any issues with this?
video

@halfmoonui
Copy link
Owner

Do you have a powerful computer? Could be possible that the device I am using for testing is a bit slow. After some more testing, I have found the linear function to be the least jarring so far (coupled with your change in this issue).

@ThaUnknown
Copy link
Author

Do you have a powerful computer? Could be possible that the device I am using for testing is a bit slow. After some more testing, I have found the linear function to be the least jarring so far (coupled with your change in this issue).

yeah, to say I have a powerful machine is an understatement, this is most likely a CSS performance issue since it changes the dom layout a lot during that animation

@ThaUnknown
Copy link
Author

however on my mid-range phone it doesnt seem to be an issue at all either, what browser did you use?

@halfmoonui
Copy link
Owner

It's good that you bring this up because on phones, the sidebar changes to the overlay type, which is really smooth. The main issue seems to happen when the sidebar is the default type, and especially full-height.

@ThaUnknown
Copy link
Author

It's good that you bring this up because on phones, the sidebar changes to the overlay type, which is really smooth. The main issue seems to happen when the sidebar is the default type, and especially full-height.

again, I'm not able to reproduce any of the issues you're having so idk how to help

@ThaUnknown
Copy link
Author

ThaUnknown commented Jan 10, 2021

@halfmoonui , will using the will-change css property help? from what I tested it could help a lot, could you try it on your hardware? here's an article on it: https://developers.google.com/web/fundamentals/design-and-ux/animations/animations-and-performance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v1 Version 1.x.x
Projects
None yet
Development

No branches or pull requests

2 participants