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

Fix/ eliminate jumping scroll in home view #122

Merged
merged 3 commits into from
Aug 3, 2024

Conversation

simon-the-shark
Copy link
Member

@simon-the-shark simon-the-shark commented Aug 3, 2024

Don't be scared with stacked PRs :) this one is very simple. Just make reviews of every one of them and I'll merge them in the end together.

FIx of #104

  • Actually it is observable on android too, but android has a bit different scroll mechanics, so in ios it was more obvious
  • very simple fix, just as I anticipated, one section had different hight while loading than in loaded state and with ListView.builder it was rebuilding just in that specific moment and trigger the rebuild and weird scroll mechanics.
  • Fixed with simple calculations and sized box.

Previews

Issue (before changes)

ezgif-4-b283fa0278.mov

Results

Nagranie.z.ekranu.2024-08-3.o.15.21.39.mov

Changes.

News section.

this was main problem.

Loaded state (no changes).

Zrzut ekranu 2024-08-3 o 14 58 14

Loading state BEFORE.

Zrzut ekranu 2024-08-3 o 14 59 21

Loading state AFTER.

Zrzut ekranu 2024-08-3 o 15 22 16

Alternative

Alternative solution is to preserve newsRepository provider in the memory, either with keepAlive: true (don't like the idea) or just subscribing to it in the lower section of the home view (feel very hacky). But if you think current loading looks significatly worse, we can solve this this way too.

@simon-the-shark simon-the-shark self-assigned this Aug 3, 2024
@simon-the-shark simon-the-shark marked this pull request as draft August 3, 2024 13:13
@simon-the-shark simon-the-shark force-pushed the fix/home-jumping-scroll branch from 03ac922 to cfbd40c Compare August 3, 2024 13:23
@simon-the-shark simon-the-shark linked an issue Aug 3, 2024 that may be closed by this pull request
@simon-the-shark simon-the-shark marked this pull request as ready for review August 3, 2024 13:24
@simon-the-shark simon-the-shark changed the title fix(home): eliminate jumping scroll Fix/ eliminate jumping scroll in home view Aug 3, 2024
Copy link
Member

@mikolaj-jalocha mikolaj-jalocha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WDYT about changing loading widget to contain slightly larger body (the gray area)? Just to fill the free space. Even with plain gray block or with more lines? Just a proposition of mine. I'm not sure if that'd fix the problem?

Same as you, I feel very uneasy about handling the reference down...

@simon-the-shark
Copy link
Member Author

Very good idea, bigger body might improve its look a bit. I'll try something in a second. But also in most scenarios this won't be visible for too long if even visible at all

@simon-the-shark
Copy link
Member Author

Screenshot_20240803_224459.jpg

@simon-the-shark simon-the-shark force-pushed the fix/home-jumping-scroll branch from 6756719 to 0ea82e1 Compare August 3, 2024 20:48
@simon-the-shark simon-the-shark merged commit 0245c6d into refactor/unify-names Aug 3, 2024
2 checks passed
@simon-the-shark simon-the-shark deleted the fix/home-jumping-scroll branch August 3, 2024 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

iOS scrolling down - strange behaviour
2 participants