Surface room name errors and warn users about reserved policy room name error#7227
Conversation
| 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.
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.
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.
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.
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)
afb5743
|
@danieldoglas @luacmartins ready for another review! |
luacmartins
left a comment
There was a problem hiding this comment.
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
#adminsor#announcefor the room name, it won't let you.Tested On
Screenshots
Web