-
Notifications
You must be signed in to change notification settings - Fork 713
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
Hides app bars on scroll down and show on scroll up #11551
Hides app bars on scroll down and show on scroll up #11551
Conversation
Build Artifacts
|
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.
Hi @akolson, thank you, it's looking great overall.
I haven't tested, just reviewed code. I noticed two performance issues that would be good to deal with.
" it seems it only works for predetermined widths and heights." What do you mean by that? I think it's okay to use your current implementation, asking only to understand this utility better. |
@akolson As you mentioned, it'd be good to have input from @jtamiace and @tomiwaoLE, particularly on the transition. I'd rather not us adding more customized transition (there are many inconsistent transitions scattered across the whole Kolibri), that's why I created |
@akolson Did you copy it from another place or is it brand new? |
@MisRob the transition is specific to the app bars and bottom bars only. For the case of my comment on
You need to set the width and height for the target container and also set an overflow. In our context, the width and height of the container is determined at runtime and thus doesn't seem to work. Here is an example |
Ah I see, that's good to know, thank you. It may be that they need to have width and height set in advance to be able to do calculations. |
Yes that was my understanding of the issue |
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.
Thank you @akolson, looking good to me now. I also appreciate some little tweaks you did to naming, it all feels very clear now. As soon as QA confirms, we can merge.
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.
Hi @akolson when I am using an actual touch screen device if I go to the Library page and scroll quickly all the way down to the bottom of the page the screen starts to flicker:
2023-12-01_17-22-15.mp4
The bottom bar is not always displayed back when I am at Device > Settings (when the 'Set storage limit for auto-download...' is selected):
2023-12-01_19-53-45.mp4
Hi @pcenov for the first video, it doesn't look like the view displayed is that of the app and thus doesn't have the bottom bar. |
Looking into issue 2. Thanks |
For 2. It turns out that checking the "Set storage limit..." has a behavior that conflicts with the new implementation. See below; clarification also needed here cc @marcellamaki Set.storoage.limit.scroll.behavior.mov |
@akolson - to make sure I'm understanding correctly, is it that on the down scroll, the save changes button is covered a bit, and you have to "scroll extra" (for lack of a better term) so that it appears? If so, I think we should just add a bit of extra height on the bottom of the screen in this scenario. If I'm not understanding, let me know and we can go from there. Thank you! |
I am not too sure about the motivation around its implementation but I suspect that it is as you mention. The bigger issue here is that the two implementations(particularly when "set storage limit.." is set) may not exist together with the new(this Pr) since the behavior of one cancels out the behavior of the other thus the bug Peter reported. |
Hi @akolson - sorry, I had uploaded a video for a different PR. I've now uploaded the correct video which is observed on an an Android phone with the Kolibri .apk app installed. |
Thanks @pcenov. Let me investigate what could be causing the flicker! |
@jtamiace any thought on how we should proceed with the two conflicting behaviors as discovered with #11551 (comment)? |
Hi @akolson , is it KTransition that is causing the bottom bar to not appear, or the entire 'set storage limit' feature? I'm not sure I understand why these behaviors are conflicting, and also not sure if I have the technical knowledge to find a solution making both behaviors possible at the same time. I do think the bottom bar needs to be visible on the Device > Settings page even while the 'set storage limit' option is active, since without it, the user would not be able to navigate elsewhere in the app (at least not without using the Android back button or other non-ideal means). I also think it's important for the behavior of the bottom app bar to be consistent with other locations that it appears in the app. |
Okay - @akolson and @pcenov, I've dug into this a little bit to try to figure out a way forward, and I think the bar disappearing with the selection of the setting was a pre-existing bug and not a problem with this PR. Samson - it seems like the If it does turn out to be this straightforward, I think it would be reasonable to include this in the scope of this PR, Samson. Otherwise, I can open a follow up issue and I feel confident one of our community contributors would love to pick it up :D |
Just a note that |
Thanks @marcellamaki @jtamiace this makes sense now. |
Hi @pcenov!
has been fixed. Screen.Recording.2023-12-12.at.22.55.04.movAlso, I tried to replicate
after the fix for issue 2, but all seems fine now. Please let me know if this isn't the case . |
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.
Thanks for the updates here @akolson - the additional code changes seem good to me. As soon as Peter approves on the manual QA side, 👍
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.
Hi @akolson, I confirm that the issue at Device > Settings is fixed now.
The flicker issue at the Library page is still happening though and I am able to replicate it in all my Android phones plus in Android Studio using a device emulator. To replicate it you just need to have enough content at the Library page and quickly scroll down until you reach the bottom of the page.
@pcenov - have you encountered this on any other builds? I recall several months ago we had an issue where the content cards on the library and topics pages were flickering, and I'm curious if that has come back. It's possible that it is caused by these changes, but also it might be separate, but easily noticed here with the type of testing you are doing. If you are able to see it present in any other testing, letting us know would be helpful for focusing in on the problem. Thank you so much! |
Hi @marcellamaki, no I've not encountered that issue in other builds and it's also not present in the latest Beta 10 Android app so it seems that it's caused by the changes made here. |
.v-enter-to { | ||
opacity: 1; | ||
} | ||
|
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.
It looks like the above custom transition animation(from L218 to L241) is causing the glitches on scroll. The obvious work around for this is get rid of the transition animation and keep it simple. @marcellamaki any additional thoughts?
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 sounds like a great, simple solution @akolson - let's do that!
HI @pcenov the issue has been fixed as shown in the attached video. Screen.Recording.2023-12-19.at.09.41.37.mov |
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.
Thanks @akolson - I confirm that this is working correctly now. Good to go!
Hi @akolson and @marcellamaki - the flickering issue is still happening in Beta 13 - can you confirm that the fix for it has made it into Beta 13? If it has, then it was not fully fixed and I will open a separate issue. |
The changes here were included in the beta13 @pcenov - if it has not fully fixed the issue, yes, can you please open a new one that outlines the problems you are seeing, and reference this issue in it so we have the continuity of discussion? thank you! |
@pcenov, I tried to replicate the issue on |
Summary
This pr implements the hide/show behavior of the top bar and the bottom navigation when a user scrolls down, and show again as they scroll up.
Note: The
useScroll
fromvueUse
seems like a more cleaner way to implement the behavior in place of the scroll event handler(as recommended by @MisRob), but it seems it only works for predetermined widths and heights. I am happy to hear any thoughts on possible ways it could still be used. Also happy to hear from @jtamiace @tomiwaoLE about the behavior(hide/show) from a UI/UX perspective.Screen.Recording.2023-11-21.at.16.59.14.mov
Screen.Recording.2023-11-21.at.17.08.38.mov
References
Closes #11471
Reviewer guidance
Testing checklist
PR process
Reviewer checklist
yarn
andpip
)