Skip to content

Don't group timeline items if more than 5 minutes has passed. #4138

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

Merged
merged 1 commit into from
May 21, 2025

Conversation

pixlwave
Copy link
Member

@pixlwave pixlwave commented May 20, 2025

This PR slightly tweaks the grouping algorithm so that we split up the bubble groups if more than 5-minutes has passed between messages from the same sender. I'm sure there could be lots more done here (such as splitting up groups if they span a long continuous time) but this seems like a simple start to make it easy to visualise the passage of time (and frankly fix something that really bothers me day to day).

The behaviour appears to match Element Web from my testing.

DM incoming DM outgoing Room incoming Room outgoing
Simulator Screenshot - iPhone 16 Plus - 2025-05-20 at 16 59 06 Simulator Screenshot - iPhone 16 Pro - 2025-05-20 at 16 59 08 Simulator Screenshot - iPhone 16 Pro - 2025-05-20 at 16 59 01 Simulator Screenshot - iPhone 16 Plus - 2025-05-20 at 16 59 00
DM on EW Room on EW
Screenshot 2025-05-20 at 5 28 09 pm Screenshot 2025-05-20 at 4 59 16 pm

Copy link

codecov bot commented May 20, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
1065 1 1064 0
View the full list of 3 ❄️ flaky tests
BugReportUITests::testInitialStateComponents()

Flake rate in main: 53.85% (Passed 12 times, Failed 14 times)

Stack Traces | 15.1s run time
failed - No reference was found on disk. Automatically recorded snapshot: …

open "file:.../__Snapshots__/Application/bugReportUI.testInitialStateComponents-iPad-18-4-en-GB.png"

Re-run "bugReportUI" to assert against the newly-recorded snapshot. (UITests/Sources/Application.swift:88)
UserSessionScreenTests::testUserSessionFlows()

Flake rate in main: 11.76% (Passed 30 times, Failed 4 times)

Stack Traces | 24.5s run time
failed - Snapshot "testUserSessionFlows-iPad-18.4-en-GB-1" does not match reference.

@−
"file:.../__Snapshots__/Application/userSessionScreen.testUserSessionFlows-iPad-18-4-en-GB-1.png"
@+
"file:.../__FailedScreenshots__/Application/userSessionScreen.testUserSessionFlows-iPad-18-4-en-GB-1.png"

To configure output for a custom diff tool, use 'withSnapshotTesting'. For example:

    withSnapshotTesting(diffTool: .ksdiff) {
      // ...
    }

The percentage of pixels that match 0.920166 is less than required 0.99
The lowest perceptual color precision 0.0006250143 is less than required 0.98 (UITests/Sources/Application.swift:88)
BugReportUITests::testReportText()

Flake rate in main: 53.85% (Passed 12 times, Failed 14 times)

Stack Traces | 26s run time
failed - No reference was found on disk. Automatically recorded snapshot: …

open "file:.../__Snapshots__/Application/bugReportUI.testReportText-iPad-18-4-en-GB.png"

Re-run "bugReportUI" to assert against the newly-recorded snapshot. (UITests/Sources/Application.swift:88)

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@pixlwave pixlwave added the pr-misc for other changes label May 20, 2025
@pixlwave pixlwave marked this pull request as ready for review May 21, 2025 07:55
@pixlwave pixlwave requested a review from a team as a code owner May 21, 2025 07:55
@pixlwave pixlwave requested review from stefanceriu and removed request for a team May 21, 2025 07:55
@pixlwave pixlwave force-pushed the doug/timestamp-grouping branch from 28644c3 to 8f28d6e Compare May 21, 2025 08:23
@pixlwave
Copy link
Member Author

UI tests run: https://github.com/element-hq/element-x-ios/actions/runs/15157235537

Pretty sure all our mocked data timestamps are the same, but just to be sure 🤞

Copy link
Member

@stefanceriu stefanceriu left a comment

Choose a reason for hiding this comment

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

Noice! 👏

@pixlwave pixlwave merged commit d76b76d into develop May 21, 2025
14 checks passed
@pixlwave pixlwave deleted the doug/timestamp-grouping branch May 21, 2025 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-misc for other changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants