generated from element-hq/.github
-
Notifications
You must be signed in to change notification settings - Fork 151
Fix bubble animations overshooting in the timeline when SR/RRs are removed from an event #4128
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
Draft
ara4n
wants to merge
7
commits into
develop
Choose a base branch
from
matthew/fix-bubble-overshoot
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
Generated by 🚫 Danger Swift against ecc9953 |
❌ 14 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
by hoisting messageBubbleTopPadding to the body of TimelineItemBubbledStylerView and disabling animation when messageBubbleTopPadding changes. This fixes the issue described in #4127 (comment) It also should fix one of the main causes of scroll jumps from #2877 For now, this includes some commented out background colours which are very helpful for visualising these failure modes
When UITableView inserts a new row at precisely the same time as us hiding the Send Receipts on a bubble (due to moving them to the new row), there's a race which can cause UITableView to miscalculate y-offsets due to the height of the bubble suddenly changing. To break the race, we hide the SR shortly after the row is inserted. Fixes the problem shown in #4127 (comment)
and reintroduce skipping animations on bubble layouts if we're just changing the messageBubbleTopPadding, as per #4127 (comment)
|
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.
Top-align message bubbles within their VStack of
TimelineItemBubbledStylerView
by adding a Spacer, so that the bubble doesn't drift around as the row shrinks when theTimelineItemStatusView
empties due to the message no longer having SR/RRs. This causes the "bubble animation overshoots its target" bug in #4127. See the bug for videos of before & after.The addition of the Spacer empirically adds a gap between the bubbles, which we compensate for with some negative spacing on the VStack.
Empirically this seems to work okay, although I did see some intermittent weirdness with the row at the top of the UITableView vanishing as the new row gets added at the bottom - feeling a bit like a cell reuse bug of some kind. However, this seems very intermittent, and less distracting than the previous mangled animation (given you're not looking at the top of the screen when you hit send on a message).
Edit: The fixes elsewhere seem to have made this behaviour worse - the row at the top of the table blinks off & on distractingly as rows are added to the bottom. It definitely looks like a cell reuse bug of some kind, or maybe UITableView still getting very confused when the heights of its rows change. Unfortunately this looks bad enough to merit marking this PR as a draft until it can be investigated further.
(Edit: there's another problem caused by the SR-hiding animation racing with UITableView's new-row animation and thoroughly confusing UITableView, as per #4127 (comment) - will add a fix here once confident in it.) Edit: now fixed in 9df170e
Pull Request Checklist
UI changes have been tested with: