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

Render state items in the timeline and as the last message on the home screen. #473

Merged
merged 5 commits into from
Jan 20, 2023

Conversation

pixlwave
Copy link
Member

@pixlwave pixlwave commented Jan 19, 2023

This PR makes the following changes:

  • Adds RoomStateStringBuilder which will build the right localised strings for state changes.
  • Uses this state string builder inside of the timeline item factory.
  • Adds RoomEventStringBuilder which will build a localised string for showing events as attributed strings in the room list. This allows us to handle all event types and uses RoomStateStringBuilder for state events.
  • Adds a timeline item and view to show state events in the timeline.
Room list Timeline
RoomSummaryState TimelineState

stefanceriu and others added 3 commits January 18, 2023 15:23
@pixlwave pixlwave requested a review from stefanceriu January 19, 2023 15:21
self.userID = userID
self.mediaProvider = mediaProvider
self.attributedStringBuilder = attributedStringBuilder
self.roomStateStringBuilder = roomStateStringBuilder
}

// swiftlint:disable:next cyclomatic_complexity
func buildTimelineItemFor(eventItemProxy: EventTimelineItemProxy,

Choose a reason for hiding this comment

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

  • ⚠️ Function body should span 40 lines or less excluding comments and whitespace: currently spans 43 lines (function_body_length)

@github-actions
Copy link

github-actions bot commented Jan 19, 2023

Warnings
⚠️ This pull request seems relatively large. Please consider splitting it into multiple smaller ones.
⚠️ Some of the commits are missing ticket numbers. Please consinder using them for better tracking.

Generated by 🚫 Danger Swift against 80bb331

@pixlwave pixlwave changed the title Render state items in the timeline and as the last message in the home screen. Render state items in the timeline and as the last message on the home screen. Jan 19, 2023
@codecov
Copy link

codecov bot commented Jan 19, 2023

Codecov Report

Base: 42.50% // Head: 41.62% // Decreases project coverage by -0.88% ⚠️

Coverage data is based on head (80bb331) compared to base (5017ba7).
Patch coverage: 2.97% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #473      +/-   ##
===========================================
- Coverage    42.50%   41.62%   -0.88%     
===========================================
  Files          271      275       +4     
  Lines        15180    15500     +320     
  Branches      9631     9880     +249     
===========================================
  Hits          6452     6452              
- Misses        8495     8793     +298     
- Partials       233      255      +22     
Flag Coverage Δ
unittests 20.55% <0.00%> (-0.44%) ⬇️

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

Impacted Files Coverage Δ
...X/Sources/Screens/HomeScreen/View/HomeScreen.swift 49.50% <0.00%> (ø)
...s/Screens/HomeScreen/View/HomeScreenRoomCell.swift 59.20% <0.00%> (ø)
...omScreen/View/Timeline/StateRoomTimelineView.swift 0.00% <0.00%> (ø)
...Sources/Screens/Settings/View/SettingsScreen.swift 75.00% <0.00%> (ø)
...ices/Room/RoomSummary/RoomEventStringBuilder.swift 0.00% <0.00%> (ø)
...ervices/Room/RoomSummary/RoomSummaryProvider.swift 0.00% <0.00%> (ø)
...ne/TimelineController/RoomTimelineController.swift 0.00% <0.00%> (ø)
...elineItems/Items/Other/StateRoomTimelineItem.swift 0.00% <0.00%> (ø)
...imeline/TimelineItems/RoomStateStringBuilder.swift 0.00% <0.00%> (ø)
...meline/TimelineItems/RoomTimelineItemFactory.swift 0.00% <0.00%> (ø)
... and 15 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@sonarqubecloud
Copy link

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 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

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.

This is great, very nicely done! 👏

@pixlwave pixlwave merged commit f05fa63 into develop Jan 20, 2023
@pixlwave pixlwave deleted the stefan/stateEvents branch January 20, 2023 13:37
pixlwave added a commit that referenced this pull request Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants