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

RoomScreenViewModel is now TimelineViewModel #3157

Merged
merged 7 commits into from
Aug 13, 2024

Conversation

Velin92
Copy link
Member

@Velin92 Velin92 commented Aug 12, 2024

The first step into separating the timeline behaviour from the generic room behaviour.

For now this is mostly a renaming, and some small signature and function changes (for example the draft is now handled directly by exposed functions from the composer through the coordinator).

The TimelineViewModel still does all the room screen work, but I created a view model and some models for it, in case we want to slowly migrate over time some functionalities from the TimelineViewModel into the new RoomScreenViewModel. ( For example the pinned banner handling could be migrated to it or the navigation to the details... and so on...)

I also added the TimelineViewModel to the PinnedEventsTimelineCoordinator, and is now possible to see the pinned events, even if actions are not yet handled and there are some errors being thrown by pagination

Simulator.Screen.Recording.-.iPhone.15.-.2024-08-12.at.21.03.58.mp4

@Velin92 Velin92 requested a review from a team as a code owner August 12, 2024 19:31
@Velin92 Velin92 requested review from stefanceriu and removed request for a team August 12, 2024 19:31
Copy link

github-actions bot commented Aug 12, 2024

Warnings
⚠️ This pull request seems relatively large. Please consider splitting it into multiple smaller ones.
⚠️ 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.

Generated by 🚫 Danger Swift against 8825cb9

@Velin92 Velin92 added the pr-wip for anything that isn't ready to ship and will be enabled at a later date label Aug 12, 2024
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.

Very nice, I'm looking forward to this - its going to be much neater :)

@Velin92 Velin92 force-pushed the mauroromito/reusable_timeline_2 branch from e389717 to 1e182c3 Compare August 13, 2024 09:24
Copy link

codecov bot commented Aug 13, 2024

Codecov Report

Attention: Patch coverage is 58.97436% with 544 lines in your changes missing coverage. Please review.

Project coverage is 73.81%. Comparing base (2fa7934) to head (1e182c3).

Files Patch % Lines
...X/Sources/Screens/Timeline/TimelineViewModel.swift 44.25% 451 Missing ⚠️
...Sources/FlowCoordinators/RoomFlowCoordinator.swift 0.00% 19 Missing ⚠️
...X/Sources/Screens/RoomScreen/View/RoomScreen.swift 62.79% 16 Missing ⚠️
...entX/Sources/Screens/Timeline/TimelineModels.swift 91.13% 14 Missing ⚠️
...ces/Screens/RoomScreen/RoomScreenCoordinator.swift 71.79% 11 Missing ⚠️
...Screen/PinnedEventsTimelineScreenCoordinator.swift 0.00% 10 Missing ⚠️
...lineController/RoomTimelineControllerFactory.swift 0.00% 10 Missing ⚠️
...urces/Other/Pills/PillAttachmentViewProvider.swift 50.00% 4 Missing ⚠️
...melineScreen/View/PinnedEventsTimelineScreen.swift 88.57% 4 Missing ⚠️
...ineItemViews/HighlightedTimelineItemModifier.swift 0.00% 3 Missing ⚠️
... and 1 more
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3157      +/-   ##
===========================================
- Coverage    77.35%   73.81%   -3.55%     
===========================================
  Files          715      768      +53     
  Lines        55847    60440    +4593     
===========================================
+ Hits         43202    44614    +1412     
- Misses       12645    15826    +3181     
Flag Coverage Δ
unittests 68.16% <58.97%> (-0.12%) ⬇️

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

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

@Velin92 Velin92 force-pushed the mauroromito/reusable_timeline_2 branch from 1e182c3 to 8825cb9 Compare August 13, 2024 11:36
@Velin92 Velin92 merged commit 1ad361a into develop Aug 13, 2024
4 checks passed
@Velin92 Velin92 deleted the mauroromito/reusable_timeline_2 branch August 13, 2024 11:36
Copy link

sonarcloud bot commented Aug 13, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-wip for anything that isn't ready to ship and will be enabled at a later date
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants