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

Rework room summary #3631

Merged
merged 4 commits into from
Oct 9, 2024
Merged

Rework room summary #3631

merged 4 commits into from
Oct 9, 2024

Conversation

ganfra
Copy link
Member

@ganfra ganfra commented Oct 8, 2024

Content

This PR takes care of 3 things :

  • Do not use RoomSummary directly in the ui model, so creates new models when necessary
  • Let RoomSummary uses RoomInfo directly instead of mapping partial data.
  • Rework the getRoomInfoFlow to not use getRoom internally.

Motivation and context

Better code and prepare work for knocking feature.

Screenshots / GIFs

Tests

  • Step 1
  • Step 2
  • Step ...

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

  • Changes have been tested on an Android device or Android emulator with API 23
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly define what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • Pull request includes a sign off
  • You've made a self review of your PR

@ganfra ganfra added the PR-Misc For other changes label Oct 8, 2024
@ganfra ganfra marked this pull request as ready for review October 8, 2024 19:39
@ganfra ganfra requested a review from a team as a code owner October 8, 2024 19:39
@ganfra ganfra requested review from bmarty and removed request for a team October 8, 2024 19:39
Copy link
Contributor

github-actions bot commented Oct 8, 2024

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/A9cqFp

Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

heroes = roomSummary.info.heroes,
canonicalAlias = roomSummary.info.canonicalAlias,
)
}
Copy link
Member

Choose a reason for hiding this comment

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

Move function toSelectRoomInfo() from the test class to this file and use it here?


@Immutable
sealed interface ResolvedSuggestion {
data object AtRoom : ResolvedSuggestion
data class Member(val roomMember: RoomMember) : ResolvedSuggestion
data class Alias(val roomAlias: RoomAlias, val roomSummary: RoomSummary) : ResolvedSuggestion
data class Alias(
Copy link
Member

Choose a reason for hiding this comment

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

We will probably want to do the same type of rework for Member.roomMember (later!)

@ganfra ganfra added the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Oct 9, 2024
@github-actions github-actions bot removed the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Oct 9, 2024
@ganfra ganfra enabled auto-merge October 9, 2024 09:14
@ganfra ganfra added the Run-Maestro Starts a Maestro Cloud session to run integration tests label Oct 9, 2024
@github-actions github-actions bot removed the Run-Maestro Starts a Maestro Cloud session to run integration tests label Oct 9, 2024
Copy link

sonarcloud bot commented Oct 9, 2024

Copy link

codecov bot commented Oct 9, 2024

Codecov Report

Attention: Patch coverage is 96.27119% with 11 lines in your changes missing coverage. Please review.

Project coverage is 82.72%. Comparing base (5a4e5d0) to head (5afa7f6).
Report is 42 commits behind head on develop.

Files with missing lines Patch % Lines
...ns/edit/EditDefaultNotificationSettingPresenter.kt 83.33% 1 Missing and 2 partials ⚠️
...list/impl/datasource/RoomListRoomSummaryFactory.kt 90.47% 0 Missing and 2 partials ⚠️
...oser/suggestions/RoomAliasSuggestionsDataSource.kt 87.50% 0 Missing and 1 partial ⚠️
...cations/edit/EditDefaultNotificationSettingView.kt 66.66% 0 Missing and 1 partial ⚠️
...ndroid/libraries/matrix/api/room/MatrixRoomInfo.kt 80.00% 1 Missing ⚠️
...oid/libraries/matrix/ui/components/SelectedRoom.kt 90.00% 1 Missing ⚠️
...ries/roomselect/impl/RoomSelectSearchDataSource.kt 66.66% 0 Missing and 1 partial ⚠️
...ndroid/libraries/roomselect/impl/RoomSelectView.kt 88.88% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3631      +/-   ##
===========================================
+ Coverage    82.65%   82.72%   +0.06%     
===========================================
  Files         1735     1738       +3     
  Lines        41191    41227      +36     
  Branches      4999     4999              
===========================================
+ Hits         34047    34104      +57     
+ Misses        5381     5359      -22     
- Partials      1763     1764       +1     

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

@ganfra ganfra merged commit a3db4b2 into develop Oct 9, 2024
30 checks passed
@ganfra ganfra deleted the feature/fga/rework_room_summary branch October 9, 2024 09:44
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.

3 participants