Remove incorrect red brick indicator#12491
Conversation
|
The change looks fine. As I had also mentioned in the previous PR, I don't have access to the domain group in the oldDot. Hence, I've forced an error for the given workspace and tested this. @aldo-expensify @youssef-lr All yours. 🎀 👀 🎀
ScreenshotsWebMobile Web - ChromeMobile Web - SafariDesktopiOSAndroid |
|
Friendly bump @youssef-lr for review |
|
Friendly bump @youssef-lr for review |
|
I could swear I sent a reply to this PR but maybe my connection was acting up. When I tested this, upon deleting the default workspace from NewDot I do not encounter any error, and it gets deleted in a clean way. Do you happen to know why? |
|
Here's the recording from when I tested this. Screen.Recording.2022-11-14.at.14.13.24.mov |
Did you set the workspace as the preferred policy of a security group in a domain? An easier way to test this, is to add a throw in the Web API to make sure the |
|
Ok I forced the error in PHP and it tested well! |
|
@youssef-lr looks like this was merged without the checklist test passing. Please add a note explaining why this was done and remove the |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
Checks were passing Melvin. |
|
🚀 Deployed to staging by @youssef-lr in version: 1.2.29-0 🚀
|
|
@aldo-expensify @mananjadhav @youssef-lr |
|
Yeah looks like it. Error is dynamic. |
@mvtglobally Yes, it looks like a pass, the error text depends on the action you took to cause error. I'm curious about that steps did you take to get to this error. Can you give me the steps? I would have expected a different error message if the QA steps were followed. |
|
@aldo-expensify Here is a video. We were able to repro error in the PR as well, but this one also happened, so it wasn't consistent and I decided to check Recording.2981.mp4 |
|
Thanks @mvtglobally ! first time I see this way of creating a policy for another account, and, yeah, the different error looks very to this different steps. |
|
🚀 Deployed to production by @AndrewGable in version: 1.2.29-7 🚀
|
| function getPolicyBrickRoadIndicatorStatus(policy, policyMembers) { | ||
| const policyMemberList = lodashGet(policyMembers, `${ONYXKEYS.COLLECTION.POLICY_MEMBER_LIST}${policy.id}`, {}); | ||
| if (hasPolicyMemberError(policyMemberList) || hasCustomUnitsError(policy) || hasPolicyError(policy)) { | ||
| if (hasPolicyMemberError(policyMemberList) || hasCustomUnitsError(policy)) { |
There was a problem hiding this comment.
Hi, this PR caused a bug.
Assuming it's a Form validation error (all frontend) -
without the red dot, you can't tell which workspace has the error.
There was a problem hiding this comment.
The problem is that we should have ignored !_.isEmpty(lodashGet(policy, 'errors', {})), but not _.some(lodashGet(policy, 'errorFields', {}), fieldErrors => !_.isEmpty(fieldErrors));, right?
These are the two checks in hasPolicyError
There was a problem hiding this comment.
yes, precisely! (errorFields is a form error)







Details
Removed red brick indicator from workspace entry in workspaces list if the error is in the workspace itself and not in policy member or custom unit.
Asked for confirmation that this is what we want here: https://expensify.slack.com/archives/C01GTK53T8Q/p1667605980573489?thread_ts=1666955764.560879&cid=C01GTK53T8Q
Before:
After:
Fixed Issues
$ #12327 (comment)
Tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*filesWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)Avataris modified, I verified thatAvataris working as expected in all cases)PR Reviewer Checklist
The reviewer will copy/paste it into a new comment and complete it after the author checklist is completed
### Fixed Issuessection aboveTestssectionQA stepssectiontoggleReportand notonIconClick).src/languages/*filesWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarhave been tested & I retested again)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)Avataris modified, I verified thatAvataris working as expected in all cases)Screenshots
Web
Mobile Web - Chrome
Desktop
iOS
Android