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

SwiftUI timeline refactor + TimelineViewState decoupling #1392

Merged
merged 21 commits into from
Jul 25, 2023

Conversation

Velin92
Copy link
Member

@Velin92 Velin92 commented Jul 24, 2023

This is the best approach I could achieve so far.

The performances are great, the timeline has never been so fast. The animations look very clean, sending messages and pagination are faster than ever (probably their updates were delayed by a ton of main thread async updates before).

Animations that did not work previously now work, for example now Collapsible items are animated.

https://drive.google.com/file/d/1waiVkKgY-0Xhw3g3wdcH6SLHa0kVT_4P/view?usp=drive_link

@Velin92 Velin92 force-pushed the mauroromito/swiftui_refactor_timeline branch from a609b1d to 3f1db81 Compare July 24, 2023 20:20
@github-actions
Copy link

github-actions bot commented Jul 24, 2023

Warnings
⚠️ Please add a changelog.
⚠️ Some of the commits are missing ticket numbers. Please consider squashing all commits that don't have a tracking number.
⚠️ You seem to have made changes to views. Please consider adding screenshots.
⚠️

ElementX/Sources/Screens/RoomScreen/RoomScreenViewModel.swift#L448 - SwiftLint rule 'function_body_length' did not trigger a violation in the disabled region. Please remove the disable command. (superfluous_disable_command)

Generated by 🚫 Danger Swift against b1950b7

@Velin92 Velin92 marked this pull request as ready for review July 24, 2023 20:44
@Velin92 Velin92 requested a review from a team as a code owner July 24, 2023 20:44
@Velin92 Velin92 requested review from stefanceriu and removed request for a team July 24, 2023 20:44
@Velin92 Velin92 added the Trigger-PR-Build Uses to trigger alpha builds for PRs label Jul 24, 2023
@github-actions
Copy link

github-actions bot commented Jul 24, 2023

📱 Scan the QR code below to install the build for this PR.
🔒 This build is for internal testing purpose. Only devices listed in the ad-hoc provisioning profile can install Element Alpha.

QR code

If you can't scan the QR code you can install the build via this link: https://i.diawi.com/h9ditF

@codecov
Copy link

codecov bot commented Jul 24, 2023

Codecov Report

Patch coverage: 9.66% and project coverage change: -0.60% ⚠️

Comparison is base (43dafda) 45.33% compared to head (8067410) 44.74%.

❗ Current head 8067410 differs from pull request most recent head b1950b7. Consider uploading reports for the commit b1950b7 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1392      +/-   ##
===========================================
- Coverage    45.33%   44.74%   -0.60%     
===========================================
  Files          388      389       +1     
  Lines        24716    24871     +155     
  Branches     12604    12686      +82     
===========================================
- Hits         11205    11128      -77     
- Misses       13224    13462     +238     
+ Partials       287      281       -6     
Flag Coverage Δ
unittests 22.94% <8.69%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
ElementX/Sources/Other/ScrollViewAdapter.swift 53.57% <0.00%> (-7.66%) ⬇️
...X/Sources/Screens/RoomScreen/View/RoomScreen.swift 49.54% <0.00%> (-9.23%) ⬇️
...een/View/Style/TimelineItemBubbledStylerView.swift 56.75% <0.00%> (-0.68%) ⬇️
...creen/View/Style/TimelineItemPlainStylerView.swift 0.00% <0.00%> (ø)
...Screens/RoomScreen/View/Style/TimelineStyler.swift 9.21% <0.00%> (ø)
...en/View/Supplementary/TimelineItemStatusView.swift 61.53% <0.00%> (-8.74%) ⬇️
...en/View/Timeline/CollapsibleRoomTimelineView.swift 0.00% <0.00%> (ø)
...een/View/Timeline/ReadMarkerRoomTimelineView.swift 0.00% <0.00%> (ø)
.../Timeline/TimelineItems/RoomTimelineItemView.swift 45.00% <0.00%> (-15.79%) ⬇️
...Sources/Screens/RoomScreen/View/TimelineView.swift 5.42% <1.73%> (-67.50%) ⬇️
... and 3 more

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

Left some minor comments but otherwise I absolutely love it! 👏👏👏

@Velin92 Velin92 changed the title SwiftUI timeline refactor + ObservedObject SwiftUI timeline refactor + TimelineViewState decoupling Jul 25, 2023
@Velin92 Velin92 linked an issue Jul 25, 2023 that may be closed by this pull request
Copy link
Member

@pixlwave pixlwave left a comment

Choose a reason for hiding this comment

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

This looks amazing, love it! 🤩

@Velin92 Velin92 enabled auto-merge (squash) July 25, 2023 11:34
@sonarcloud
Copy link

sonarcloud bot commented Jul 25, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
2.0% 2.0% Duplication

@Velin92 Velin92 merged commit 7cf32ba into develop Jul 25, 2023
5 checks passed
@Velin92 Velin92 deleted the mauroromito/swiftui_refactor_timeline branch July 25, 2023 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Trigger-PR-Build Uses to trigger alpha builds for PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SwiftUI Timeline
3 participants