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

Add RoomDetails for use (with RoomMemberDetails) in AvatarHeaderView. #2490

Merged
merged 3 commits into from
Feb 21, 2024

Conversation

pixlwave
Copy link
Member

As a precursor to implementing the sheet for banning users, this PR makes the following changes

  • Add a RoomDetails struct as an analogue to RoomMemberDetails
    • This is used in RoomDetailsScreen but could potentially be used in more places in the future.
  • Refactors AvatarHeaderView to only accept a room or member details in the init to share the logic for configuring the avatar, title and subtitle.
  • Removes the unused RoomProxy.displayName property in favour of .name which we get from sliding sync.

Split into 2 commits for easier reviewing as the second commit contains a load of refactoring of mocks for displayNamename

@pixlwave pixlwave requested a review from a team as a code owner February 20, 2024 17:33
@pixlwave pixlwave requested review from Velin92 and removed request for a team February 20, 2024 17:33
Copy link

github-actions bot commented Feb 20, 2024

Warnings
⚠️ 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/HomeScreen/View/HomeScreen.swift#L235 - Case statements should vertically align with their enclosing switch statement. (switch_case_alignment)

⚠️

ElementX/Sources/Screens/HomeScreen/View/HomeScreen.swift#L237 - Case statements should vertically align with their enclosing switch statement. (switch_case_alignment)

⚠️

ElementX/Sources/Screens/HomeScreen/View/HomeScreen.swift#L239 - Case statements should vertically align with their enclosing switch statement. (switch_case_alignment)

⚠️

ElementX/Sources/Screens/HomeScreen/View/HomeScreen.swift#L241 - Case statements should vertically align with their enclosing switch statement. (switch_case_alignment)

⚠️

ElementX/Sources/Services/Room/RoomMember/RoomMemberDetails.swift#L60 - Case statements should vertically align with their enclosing switch statement. (switch_case_alignment)

⚠️

ElementX/Sources/Services/Room/RoomMember/RoomMemberDetails.swift#L61 - Case statements should vertically align with their enclosing switch statement. (switch_case_alignment)

⚠️

ElementX/Sources/Services/Room/RoomMember/RoomMemberDetails.swift#L62 - Case statements should vertically align with their enclosing switch statement. (switch_case_alignment)

Generated by 🚫 Danger Swift against f3152f7

Copy link

sonarcloud bot commented Feb 20, 2024

Quality Gate Passed Quality Gate passed

Issues
3 New issues

Measures
0 Security Hotspots
No data about Coverage
7.8% Duplication on New Code

See analysis details on SonarCloud

Copy link

codecov bot commented Feb 21, 2024

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (6d9271c) 73.06% compared to head (f3152f7) 73.02%.
Report is 4 commits behind head on develop.

Files Patch % Lines
...urces/Screens/HomeScreen/HomeScreenViewModel.swift 33.33% 2 Missing ⚠️
...ens/RoomDetailsScreen/View/RoomDetailsScreen.swift 71.42% 2 Missing ⚠️
...X/Sources/Screens/HomeScreen/View/HomeScreen.swift 0.00% 1 Missing ⚠️
...erDetailsScreen/View/RoomMemberDetailsScreen.swift 83.33% 1 Missing ⚠️
...entX/Sources/Services/Room/RoomProxyProtocol.swift 85.71% 0 Missing and 1 partial ⚠️
...ne/TimelineController/RoomTimelineController.swift 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2490      +/-   ##
===========================================
- Coverage    73.06%   73.02%   -0.04%     
===========================================
  Files          522      523       +1     
  Lines        36467    36520      +53     
  Branches     17498    17513      +15     
===========================================
+ Hits         26645    26670      +25     
- Misses        9189     9220      +31     
+ Partials       633      630       -3     
Flag Coverage Δ
unittests 58.39% <91.57%> (-0.08%) ⬇️

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.

@pixlwave pixlwave merged commit 730d099 into develop Feb 21, 2024
9 checks passed
@pixlwave pixlwave deleted the doug/room-details branch February 21, 2024 14:19
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