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

Feature : join room by address #4302

Merged
merged 14 commits into from
Feb 26, 2025
Merged

Feature : join room by address #4302

merged 14 commits into from
Feb 26, 2025

Conversation

ganfra
Copy link
Member

@ganfra ganfra commented Feb 25, 2025

Content

This PR allows to join a room by his address (aka alias).
It's a new entry in the start chat actions, and is displayed inside a bottom sheet.
It includes the following changes :

  • Home FAB icon has been changed ( to be +)
  • TextField has now a validity state, defaulting to None
  • The feature itself

Motivation and context

Closes #4278

Screenshots / GIFs

See recorded screenshots.

Tests

  • Click on the home fab
  • Click on "Join room by address"
  • Play with address field (invalid address, valid address etc)

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 Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. PR-Feature For a new feature labels Feb 25, 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 25, 2025
Copy link
Contributor

github-actions bot commented Feb 25, 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/Di7ERG

@ganfra ganfra marked this pull request as ready for review February 25, 2025 15:21
@ganfra ganfra requested a review from a team as a code owner February 25, 2025 15:21
@ganfra ganfra requested review from bmarty and removed request for a team February 25, 2025 15:21
@Composable
internal fun TextFieldsDarkPreview() = ElementPreviewDark { ContentToPreview() }

@Composable
@ExcludeFromCoverage
private fun ContentToPreview() {
Column(modifier = Modifier.padding(4.dp)) {
allBooleans.forEach { isError ->
TextFieldValidity.entries.forEach { validity ->
Copy link
Member

Choose a reason for hiding this comment

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

Could be nice to have the preview to the null validity, since it's a possible value.
Or add TextFieldValidity.None in the enum and make the parameter non-nullable and default to it?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes I was a bit hesitant about the TextFieldValidity.None, but if you think it's ok I'll add it!

Copy link
Member

Choose a reason for hiding this comment

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

I think it will be a bit cleaner, but I let you decide.

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!

RoomAddressState.RoomNotFound
}
},
onFailure = { _ -> RoomAddressState.RoomNotFound }
Copy link
Member

Choose a reason for hiding this comment

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

We should maybe handle network error case separately?

Copy link
Member Author

Choose a reason for hiding this comment

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

For now I'll leave it like this, will see with design/product, but I think it's ok

@@ -153,7 +153,7 @@ private fun RoomListScaffold(
) {
Icon(
// Note cannot use Icons.Outlined.EditSquare, it does not exist :/
imageVector = CompoundIcons.Compose(),
imageVector = CompoundIcons.Plus(),
Copy link
Member

Choose a reason for hiding this comment

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

Maybe remove the outdated comment above?

.fillMaxWidth()
.onTabOrEnterKeyFocusNext(LocalFocusManager.current),
.fillMaxWidth()
.onTabOrEnterKeyFocusNext(LocalFocusManager.current),
Copy link
Member

Choose a reason for hiding this comment

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

Revert formatting?

Copy link

codecov bot commented Feb 25, 2025

Codecov Report

Attention: Patch coverage is 88.08290% with 23 lines in your changes missing coverage. Please review.

Project coverage is 80.15%. Comparing base (1a7a8a8) to head (f00337e).
Report is 15 commits behind head on develop.

Files with missing lines Patch % Lines
...android/features/createroom/CreateRoomNavigator.kt 0.00% 8 Missing ⚠️
...m/impl/joinbyaddress/JoinRoomByAddressPresenter.kt 85.96% 4 Missing and 4 partials ⚠️
...braries/designsystem/theme/components/TextField.kt 85.71% 2 Missing and 2 partials ⚠️
...teroom/impl/joinbyaddress/JoinRoomByAddressView.kt 95.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4302      +/-   ##
===========================================
+ Coverage    80.12%   80.15%   +0.03%     
===========================================
  Files         2053     2059       +6     
  Lines        54615    54790     +175     
  Branches      6686     6708      +22     
===========================================
+ Hits         43761    43918     +157     
- Misses        8565     8575      +10     
- Partials      2289     2297       +8     

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

@ganfra ganfra force-pushed the feature/fga/join_room_by_alias branch from 683e249 to a6c3428 Compare February 25, 2025 19:28
@ganfra ganfra added the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Feb 25, 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 25, 2025
@ganfra ganfra merged commit efb5acc into develop Feb 26, 2025
28 checks passed
@ganfra ganfra deleted the feature/fga/join_room_by_alias branch February 26, 2025 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Feature For a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Task] Join a room by its alias
3 participants