-
Notifications
You must be signed in to change notification settings - Fork 186
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
Conversation
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
@Composable | ||
internal fun TextFieldsDarkPreview() = ElementPreviewDark { ContentToPreview() } | ||
|
||
@Composable | ||
@ExcludeFromCoverage | ||
private fun ContentToPreview() { | ||
Column(modifier = Modifier.padding(4.dp)) { | ||
allBooleans.forEach { isError -> | ||
TextFieldValidity.entries.forEach { validity -> |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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.
There was a problem hiding this 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 } |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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(), |
There was a problem hiding this comment.
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), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert formatting?
Codecov ReportAttention: Patch coverage is
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. |
683e249
to
a6c3428
Compare
|
It sends me to a different room on a different server. I'm new here, bear with me. I am unsure where/how to submit an issue for something in the develop branch, or if it even is a bug. So, it's here for the moment. Hoping that @ganfra can help me figure it out. It's clearly related to this PR, but of 59 files changed I've looked at about a dozen of them and didn't find the room matching logic. Happy to get a hint. I ran this from the develop branch a few hours ago with emulator Medium Phone API 35. Steps to reproduce: #taverne:matrix.org also sends me to #twilightTavern:tchncs.de So I found two that look like redirects, and thought maybe this is just a UX issue, but when I searched I didn't find anything about redirecting matrix rooms to other servers being a thing, and I talked to the admin of the room (before they banned me for asking them to reproduce the error) and they didn't seem to know about it either. Maybe just UX+UI issues, maybe a crazy bug. Sorry this comment is kind of a mess. I'm tired and confused and wanted to reach out before I go to sleep. |
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 :
TextField
has now a validity state, defaulting toNone
Motivation and context
Closes #4278
Screenshots / GIFs
See recorded screenshots.
Tests
Tested devices
Checklist