-
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
Use else-ifs to establish precedence for room name validations #14068
Conversation
@thesahindia @marcaaron One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
@yuwenmemon same changes should be applied to ReportSettingsPage.js App/src/pages/ReportSettingsPage.js Lines 93 to 99 in 91f761f
|
// Third priority: We error if the room name already exists. | ||
errors.roomName = this.props.translate('newRoomPage.roomAlreadyExistsError'); | ||
} else if (!ValidationUtils.isValidRoomName(values.roomName)) { | ||
// Fourth priority: We error if the room name has invalid characters |
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 this should be 2nd priority , we shouldn't validate for existing or reserved before we validate that the name has invalid characters
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.
Sure, but I also don't think it matters. We would never have an existing or reserved room with invalid characters.
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.
sure, I meant we don't have to run checks (existing or reserved) when roomName is invalid
Testing... |
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 !
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-01-07.at.2.11.54.AM.movScreen.Recording.2023-01-07.at.2.10.40.AM.mov |
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.
Looks good and works well!
Performance Comparison Report 📊Significant Changes To Duration
Show details
Meaningless Changes To DurationShow entries
Show details
|
@Expensify/mobile-deployers 📣 Please look into this performance regression as it's a deploy blocker. |
Duration actually went down - removing the label |
🚀 Deployed to staging by @puneetlath in version: 1.2.50-6 🚀
|
🚀 Deployed to production by @Julesssss in version: 1.2.50-14 🚀
|
cc @puneetlath @fedirjh
Details
Update the validation code to use
else-ifs
so we can more clearly establish the precedence for which validation errors get shown.Fixed Issues
$ #14010
Tests
#admins
, make sure "A room on this workspace already uses this name" error shows===
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.Screenshots/Videos
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android