RUM-9030: Fix artifacts in Jetpack Compose scrolling#2610
Merged
Conversation
jonathanmos
force-pushed
the
jmoskovich/rum-9030/duplicate-artifacts
branch
from
April 21, 2025 12:16
f877308 to
57a6934
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #2610 +/- ##
===========================================
+ Coverage 69.98% 70.10% +0.12%
===========================================
Files 819 820 +1
Lines 30579 30583 +4
Branches 5121 5123 +2
===========================================
+ Hits 21399 21439 +40
+ Misses 7740 7729 -11
+ Partials 1440 1415 -25
🚀 New features to boost your workflow:
|
jonathanmos
marked this pull request as ready for review
April 21, 2025 13:10
0xnm
previously approved these changes
Apr 22, 2025
mariusc83
previously approved these changes
Apr 22, 2025
0xnm
approved these changes
Apr 22, 2025
Member
|
very smart workaround,I think it will also improve the performance overhead a little bit since we are skipping some nodes, let's keep an eye on the benchmarking. Good job! |
ambushwork
approved these changes
Apr 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
When scrolling a list in Compose occasionally the correct position of the element in the root coordinate space cannot immediately be retrieved and Compose will default to returning 0,0. In the replays this leads to a brief duplication of the translated element on the screen, thereby creating a visual artifact that harms the experience. In this PR we attempt to identify these artifacts by skipping all leaf nodes positioned at 0,0. While in some cases this may conceivably cause legitimate elements to be skipped, this is preferable to having the visual artifacts.
Motivation
Visual artifacts seen in replays.
Additional Notes
Anything else we should know when reviewing?
Review checklist (to be filled by reviewers)