-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Surface room name errors and warn users about reserved policy room name error #7227
Conversation
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.
Left a NAB comment
src/components/RoomNameInput.js
Outdated
containerStyles={[styles.mb5]} | ||
onChangeText={roomName => this.checkAndModifyRoomName(roomName)} | ||
value={this.state.roomName.substring(1)} | ||
errorText={this.state.error} |
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.
NAB since the input functionality is unrelated to these changes. It's really weird that we pass errorText
here, but then omit passing it on to TextInput
and have to use InlineErrorText
to display the error. Not sure why this is the case @jasperhuangg
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.
OH good catch! Honestly maybe it's better to just pass it in? Maybe there was a weird styling reason why we didn't do it. Let me try modifying that omit and seeing if that makes it better.
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.
Given how TextInputWithPrefix
currently works, we will have to pass it here so the outline border changes to red. I'm not sure why we omit it though, but I assume it's intentional/necessary since it was added.
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.
Hmm removing the omit doesn't work - no error text shows up. Maybe it has to do with us using the base ReactNative TextInput there in TextInputWithPrefix/index.js and it doesn't seem to use the errorText correctly. I think I'll still move around the error to TextInputWithPrefix and out of TextInputWithLabel (I don't think this is used anymore)
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.
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
afb5743
@danieldoglas @luacmartins ready for another review! |
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.
Left a small comment. Otherwise changes LGTM
🚀 Deployed to staging by @TomatoToaster in version: 1.1.29-10 🚀
|
@TomatoToaster @luacmartins @danieldoglas Should we QA this on Web only? |
@mvtglobally we should test on all platforms. |
🚀 Deployed to production by @roryabraham in version: 1.1.30-3 🚀
|
CC: @jasperhuangg @luacmartins
Details
Warns users not to use reserved names for rooms. Also adds an inline error so that users can see what the error they're seeing is.
Fixed Issues
Follow up to: https://github.com/Expensify/Auth/pull/6291
Tests/ QA Steps
#admins
or#announce
for the room name, it won't let you.Tested On
Screenshots
Web