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

Change : Room Preview #4250

Merged
merged 6 commits into from
Feb 10, 2025
Merged

Change : Room Preview #4250

merged 6 commits into from
Feb 10, 2025

Conversation

ganfra
Copy link
Member

@ganfra ganfra commented Feb 7, 2025

Content

This PR takes care to update the JoinRoom screen aka Room Preview, it includes :

  • Removing the background gradient
  • Updating the loading and error states
  • Managing new cases like Membership.Banned or JoinRule.Restricted
  • Add the "Forget Room" action (for Membership.Banned state)

There are still a bunch of small things to fix, but I'll iterate again later.

Motivation and context

Closes #4141
Closes #4142
Figma link : https://www.figma.com/design/7TqjqdMBaPpm3IavKsMYu6/Ask-to-join-(Knocking)?node-id=4797-42334&m=dev

Screenshots / GIFs

See recorded screenshots.

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 24
  • 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
  • You've made a self review of your PR

@ganfra ganfra added PR-Change For updates to an existing feature Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. labels Feb 7, 2025
@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 Feb 7, 2025
@ganfra ganfra marked this pull request as ready for review February 7, 2025 20:40
@ganfra ganfra requested a review from a team as a code owner February 7, 2025 20:40
@ganfra ganfra requested review from jmartinesp and removed request for a team February 7, 2025 20:40
Copy link
Contributor

github-actions bot commented Feb 7, 2025

📱 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/U6QDwD

Copy link

codecov bot commented Feb 7, 2025

Codecov Report

Attention: Patch coverage is 79.80769% with 84 lines in your changes missing coverage. Please review.

Project coverage is 80.06%. Comparing base (819503b) to head (9b9e7b1).
Report is 6 commits behind head on develop.

Files with missing lines Patch % Lines
...roid/libraries/matrix/impl/room/RustRoomPreview.kt 0.00% 21 Missing ⚠️
...ent/android/features/joinroom/impl/JoinRoomView.kt 88.19% 17 Missing and 2 partials ⚠️
...ndroid/features/joinroom/impl/JoinRoomPresenter.kt 73.80% 5 Missing and 6 partials ⚠️
.../android/libraries/matrix/impl/RustMatrixClient.kt 0.00% 8 Missing ⚠️
...nt/android/features/joinroom/impl/di/ForgetRoom.kt 0.00% 5 Missing ⚠️
...roid/libraries/matrix/impl/room/RustRoomFactory.kt 0.00% 5 Missing ⚠️
...es/roomaliasresolver/impl/RoomAliasResolverView.kt 87.87% 3 Missing and 1 partial ⚠️
...nt/android/features/joinroom/impl/JoinRoomState.kt 89.28% 2 Missing and 1 partial ⚠️
...roid/libraries/matrix/test/room/FakeRoomPreview.kt 84.61% 2 Missing ⚠️
...ndroid/features/joinroom/impl/di/JoinRoomModule.kt 0.00% 1 Missing ⚠️
... and 5 more
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4250      +/-   ##
===========================================
- Coverage    80.07%   80.06%   -0.01%     
===========================================
  Files         2048     2051       +3     
  Lines        54357    54574     +217     
  Branches      6633     6666      +33     
===========================================
+ Hits         43525    43695     +170     
- Misses        8555     8594      +39     
- Partials      2277     2285       +8     

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

Copy link
Member

@jmartinesp jmartinesp left a comment

Choose a reason for hiding this comment

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

Some things I found. Since @ganfra is away at the moment I'll take over the PR and try fixing those issues.

@@ -80,7 +79,6 @@ fun JoinRoomView(
Box(
modifier = modifier.fillMaxSize(),
) {
LightGradientBackground()
Copy link
Member

Choose a reason for hiding this comment

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

🎉

@jmartinesp jmartinesp force-pushed the feature/fga/room_preview_updates branch from ecd45d1 to dabf209 Compare February 10, 2025 15:50
Copy link
Member

@jmartinesp jmartinesp left a comment

Choose a reason for hiding this comment

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

Approving this after a review. I also made some changes to be able to get the banning user's name and the reason for the ban so we have feature parity with iOS.

@jmartinesp jmartinesp force-pushed the feature/fga/room_preview_updates branch from dabf209 to 12043e1 Compare February 10, 2025 17:16
@jmartinesp jmartinesp enabled auto-merge (rebase) February 10, 2025 17:40
@jmartinesp jmartinesp disabled auto-merge February 10, 2025 17:41
ganfra and others added 6 commits February 10, 2025 18:41
…eview screen for banned rooms.

Some internal refactoring was done too:
- Remove RoomInfo.isPublic to only use JoinRule.
- Also take into account restricted access rooms for previews.
…nt user and the sender of its `m.room.member` state event in the room.
@jmartinesp jmartinesp force-pushed the feature/fga/room_preview_updates branch from 12043e1 to 9b9e7b1 Compare February 10, 2025 17:42
@jmartinesp jmartinesp enabled auto-merge (rebase) February 10, 2025 17:42
@jmartinesp jmartinesp merged commit cebdce7 into develop Feb 10, 2025
26 checks passed
@jmartinesp jmartinesp deleted the feature/fga/room_preview_updates branch February 10, 2025 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Change For updates to an existing feature
Projects
None yet
3 participants