-
Notifications
You must be signed in to change notification settings - Fork 85
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(NcAppSidebar): make closing animation less glitchy #5608
Conversation
594d829
to
32c0bc2
Compare
Wouldn't |
No, it would keep a large empty place when the sidebar is closing and then immediately resize page content. An alternative could be to use absolute position together with translate, so sidebar would open on top of page content without an empty space. However, it would also make content resize immediately. So I used the same approach as we are using now on NcAppNavigation. We could go with an alternative solution if there are performance issues. |
@Antreesy see also gifs here: #5389 (review) |
@@ -1116,11 +1116,21 @@ export default { | |||
</script> | |||
|
|||
<style lang="scss"> | |||
// Allows to use transition over a custom CSS property (CSS Variable) | |||
// Ignored on old browsers resulting in slightly noticeable jump | |||
@property --app-sidebar-offset { |
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.
fancy!
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.
Doesn't work in Firefox, except nightly build. But when it doesn't work, it's just a little more jumping
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.
Looks smooth when testing
Signed-off-by: Grigorii K. Shartsev <[email protected]>
32c0bc2
to
6291ce1
Compare
Rebased onto |
Snapshots should be updated. Previously they had no close button because it has I'll upload new snapshots when I have a stable internet connection. |
Signed-off-by: Grigorii K. Shartsev <[email protected]>
/backport to next |
It worked for me in files, but now testing in talk it seems that the sidebar does not close anymore @ShGKme Screen.Recording.2024-05-20.at.12.27.39.mov |
☑️ Resolves
width
butmax-width
animated. It means that ifmax-width: 500px
and the current width is27vw = 400px
- there is no animation for the first100px
making a delay--app-sidebar-offset
changes too immediate, making a jump effect🖼️ Screenshots
🚧 Tasks
--app-sidebar-offset
margin
instead ofmax-width
🏁 Checklist
next
requested with a Vue 3 upgrade