Code Monkey home page Code Monkey logo

Comments (12)

artsmvch avatar artsmvch commented on May 28, 2024 2

Sure, I updated the code to make the problem more visible.

And here is the video:

IMG_0012.MP4

Set the speed to 0.5 to see that the drawn elements (yellow boxes) are not aligned to the list items when scrolling.

from compose-multiplatform.

m-sasha avatar m-sasha commented on May 28, 2024 1

It will definitely be in 1.7, possibly earlier in 1.6.11. You can also see it in our dev builds, which we release every few days.

from compose-multiplatform.

igordmn avatar igordmn commented on May 28, 2024

when scrolling, the position of the drawn icons (circles) is unstable relative to the items in the LazyColumn.

Looks like it's only on the top/bottom elements during overscrolling?

Screen.Recording.2024-05-03.at.16.32.01.mov

@elijah-semyonov, listState.layoutInfo.visibleItemsInfo doesn't take into account the overscroll effect.

from compose-multiplatform.

artsmvch avatar artsmvch commented on May 28, 2024

@igordmn No, the problem with the overscroll effect is a separate issue that also doesn't work on Android (there is a feature request that might help fix this).

This issue is about drawings done in DrawModifierNode not being synced with the scroll position of LazyColumn when scrolled in any position (with the overscroll effect disabled).

I also noticed that this actually works fine on the simulator - so there is no such problem in your video.
I can only reproduce the bug on a real device (iPhone 12 iOS 17.4.1).

from compose-multiplatform.

igordmn avatar igordmn commented on May 28, 2024

I can only reproduce the bug on a real device

Could you post a video with scrolling in the middle? In the video you posted it is difficult to distinguish the desync because of overscoll and the desync because of other reasons

from compose-multiplatform.

elijah-semyonov avatar elijah-semyonov commented on May 28, 2024

@elijah-semyonov, listState.layoutInfo.visibleItemsInfo doesn't take into account the overscroll effect.

@igordmn
That makes sense. Overscroll effect on iOS is based on applying Modifier.offset to the scroll content and tracks its own state, it doesn't know anything about the implementation of the particular scroll it's integrated with (whether it's a TextField scroll, .scrollable or LazyList.

Native iOS works with negative (or above the max value) scrolls. Such values are breaking common logic invariants, so supporting it in the same way as native iOS does it would be extremely intrusive.

The lag looks interesting though, did we include main-loop sequence fix in beta03?

from compose-multiplatform.

igordmn avatar igordmn commented on May 28, 2024

The lag looks interesting though, did we include JetBrains/compose-multiplatform-core#1260 in beta03?

Yes, it is included

from compose-multiplatform.

m-sasha avatar m-sasha commented on May 28, 2024

Possibly fixed by JetBrains/compose-multiplatform-core#1356; worth trying.

from compose-multiplatform.

elijah-semyonov avatar elijah-semyonov commented on May 28, 2024

@m-sasha it's indeed fixed by that fix.

RPReplay_Final1715848901.MP4

from compose-multiplatform.

m-sasha avatar m-sasha commented on May 28, 2024

Could you check the one with the yellow squares too? It's much more visible there.

from compose-multiplatform.

elijah-semyonov avatar elijah-semyonov commented on May 28, 2024

Sure! It's not present there either:

RPReplay_Final1715932651.MP4

from compose-multiplatform.

artsmvch avatar artsmvch commented on May 28, 2024

Nice, what version will the fix come in?

from compose-multiplatform.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.