FLEXTool / FLEX

An in-app debugging and exploration tool for iOS
Other
14.07k stars 1.7k forks source link

FIx toolbar visibility bug #704

Closed ataetgi closed 2 months ago

ataetgi commented 3 months ago

Sometimes the toolbar gets hidden and never becomes visible again.

ataetgi commented 3 months ago

@NSExceptional fyi

NSExceptional commented 3 months ago

Do we know what is causing the bug here exactly?

FYI you can tap the navigation bar title to make it reappear

ataetgi commented 3 months ago

Do we know what is causing the bug here exactly?

FYI you can tap the navigation bar title to make it reappear

When scrolling down, the toolbar hides. However, when I scroll back up, it doesn’t enter any if block and remains hidden.

ataetgi commented 3 months ago

Before: https://github.com/user-attachments/assets/0e852c58-4d51-46cd-820f-a0d74cf4f48c

After: https://github.com/user-attachments/assets/3930e551-ee16-43b2-acda-78400d59c58b

@NSExceptional

NSExceptional commented 3 months ago

Before:

https://github.com/user-attachments/assets/0e852c58-4d51-46cd-820f-a0d74cf4f48c

You have to scroll up faster to make it appear. The conditions are self.canShowToolbar, yTranslation > 20, and velocity > 250

Can you try flicking it up instead of just dragging up casually? This is by design so that I personally don't become over stimulated by the toolbar constantly disappearing and reappearing.

ataetgi commented 3 months ago

Before:

https://github.com/user-attachments/assets/0e852c58-4d51-46cd-820f-a0d74cf4f48c

You have to scroll up faster to make it appear. The conditions are self.canShowToolbar, yTranslation > 20, and velocity > 250

Can you try flicking it up instead of just dragging up casually? This is by design so that I personally don't become over stimulated by the toolbar constantly disappearing and reappearing.

@NSExceptional I have tried many times but its very hard to trigger to show toolbar :( especially you if don’t know the exact code to trigger like testers in our project

NSExceptional commented 3 months ago

I see

Well, I cannot merge this as-is, because it basically says "if all other logic fails, show the toolbar" which is the opposite of what we want here

Maybe try adjusting the velocity required to show the toolbar again?

I would also accept a PR that adds a preprocessor directive that disables toolbar hiding entirely

ataetgi commented 3 months ago

I see

Well, I cannot merge this as-is, because it basically says "if all other logic fails, show the toolbar" which is the opposite of what we want here

Maybe try adjusting the velocity required to show the toolbar again?

I would also accept a PR that adds a preprocessor directive that disables toolbar hiding entirely

I investigated a bit more and noticed that in the simulator, yVelocity is coming as 0. I’m not sure if it’s due to my project.

NSExceptional commented 2 months ago

That sounds like something to do with your project; it comes through normally for me

Screenshot 2024-08-25 at 2 45 56 AM