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(ui): increase dashboard RefreshIndicator edge offset #1859
base: dev
Are you sure you want to change the base?
Conversation
This change adjusts the edge offset for the RefreshIndicator in the home view dashboard UI with the CustomSliverAppBar `expandedHeight` size, ensuring a better user experience by moving the RefreshIndicator under the SliverAppbar.
Opened as draft as I don't know if using "magic numbers" (actually a static number related to another static magic number) is right or not...
revanced-manager/lib/ui/widgets/shared/custom_sliver_app_bar.dart Lines 20 to 23 in a23f032
|
Can the refresh icon animation be also improved or is it because the manager refreshes too quickly that the animation is getting canceled out? |
The animation is not cancelled; it's just fast because the completion of the promise for refresh happens almost instantly. This occurs because the code doesn't wait for the promises. revanced-manager/lib/ui/views/home/home_viewmodel.dart Lines 494 to 498 in a23f032
|
Is this ready for review? |
This comment was marked as outdated.
This comment was marked as outdated.
@Domenic-MZS Can you try to remove magic numbers if possible? |
While it's technically feasible, the current trade-offs involved wouldn't add significant value. Incorporating this functionality while maintaining the current user interface would unnecessarily increase complexity for this particular case. I can think one of three possible solutions:
However, none of these solutions are particularly appealing, as the requirement is specific to only one file, and the drawbacks outweigh the benefits. In addition, the
Sure, there's still a need to ensure that updates on the shared widget don't cause disruptive changes over time, but most likely, it wouldn't happen. |
π§π¨ UI Fix: Increase dashboard RefreshIndicator edge offset
This change adjusts the edge offset for the RefreshIndicator in the home view dashboard UI with the CustomSliverAppBar maxExtent size, ensuring a better user experience by moving the RefreshIndicator under the SliverAppbar.
Overview
The HomeView / Dashboard
[CustomScrollView]
refresh functionality has been enhanced by matching the starting refresh position with the[SliverAppBar]
height, and by reducing the displacement range to settle the refresh.[SliverAppBar]
, disturbing the user experience (?).[edgeOffset]
) or a better layout.π Description
This PR sets the Dashboard
[edgeOffset]
(indicator starting point) to match the[CustomSliverAppBar]
(title) height and changes the default[displacement]
to execute the refresh callback.βπΌ Changes Made
[edgeOffset]
)[edge-offset].[displacement]
to settle.Technical Overview
> (For the RefreshIndicator widgtet wrapping the content) - Add the `edgeOffset` property with the `CustomSliverAppBar` hardcoded `extendedHeight`. (~magic number) - Add the `displacement` property to 50. (reduces the needed scroll to settle the "refresh" action)π¦― Testing
Update Tests (ToDo - Not Found nor needed for now...)WhatsApp.Video.2024-04-07.at.19.39.42.mp4
π Notes & References
RefreshIndicator - edgeOffset
Current Custom Sliver App Bar - ExpandedHeight
π¬ Reviewers
N/A (any mod is ok)
πΎ Feedback, changes, or suggestions are welcome! βπΌ ποΈ this time an π₯ emoji...