Incorrect Labeling of Workspace Owner in Approval Workflow#63060
Incorrect Labeling of Workspace Owner in Approval Workflow#63060rafecolton merged 11 commits intoExpensify:mainfrom
Conversation
|
@abdulrahuman5196 Please 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] |
|
Hi Will review today |
|
@abdulrahuman5196 friendly bump |
abdulrahuman5196
left a comment
There was a problem hiding this comment.
@nkdengineer
One change requested. I assume most of the unwanted diff is due to the lint failures. correct me if wrong.
|
Kindly also fix merge conflicts |
That's right.
Done! |
|
@abdulrahuman5196 Is it good? |
|
@abdulrahuman5196 Friendly bump |
|
Checking now |
|
@abdulrahuman5196 what are the next steps for this one |
|
Checking now |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2025-06-16.at.9.47.26.PM.mp4Android: mWeb ChromeScreen.Recording.2025-06-16.at.9.49.25.PM.mp4iOS: HybridAppScreen.Recording.2025-06-16.at.4.10.55.PM.mp4iOS: mWeb SafariScreen.Recording.2025-06-16.at.4.11.34.PM.mp4MacOS: Chrome / SafariScreen.Recording.2025-06-16.at.3.35.55.PM.mp4MacOS: DesktopScreen.Recording.2025-06-16.at.3.39.47.PM.mp4 |
abdulrahuman5196
left a comment
There was a problem hiding this comment.
Changes looks good and works well. Reviewers checklist is also complete.
All yours. @rafecolton
🎀 👀 🎀
C+ Reviewed
rafecolton
left a comment
There was a problem hiding this comment.
Have a few questions about nullable values
| rightElement: isAdmin ? <Badge text={translate('common.admin')} /> : undefined, | ||
| rightElement: ( | ||
| <MemberRightIcon | ||
| role={employee.role} |
There was a problem hiding this comment.
I see this was employee?.role before - does it need to be that here as well?
There was a problem hiding this comment.
No need to use employee?.role, we used employee.email in this component so I believe it's safe
There was a problem hiding this comment.
Not a TS expert but I see .map((employee): SelectionListApprover | null => { which makes me think that the type of each employee is SelectionListApprover | null - so we expect it could be null. We also check for !email right after getting it from employee. So that makes me think that we do need the ? and not using it for employee.email is actually a bug
There was a problem hiding this comment.
(employee): SelectionListApprover | null that means the result of the map operation can be null, not the employee. Employee that can't be null, however after convert it to approver, the approver can be null that why we have the logic to remove the null value in here
There was a problem hiding this comment.
Thank you for explaining about the return value, that makes sense. It's weird that the employee.email and employee?.role were added in the same commit in #46510. Not sure if it was an oversight or there's a specific reason for it - @blazejkustra can you educate me here? 🙏
There was a problem hiding this comment.
Probably just an oversight @rafecolton, we had a tight deadline back then 😅
|
@rafecolton I fixed/replied your suggestions above. Thanks |
| rightElement: isAdmin ? <Badge text={translate('common.admin')} /> : undefined, | ||
| rightElement: ( | ||
| <MemberRightIcon | ||
| role={employee.role} |
There was a problem hiding this comment.
Not a TS expert but I see .map((employee): SelectionListApprover | null => { which makes me think that the type of each employee is SelectionListApprover | null - so we expect it could be null. We also check for !email right after getting it from employee. So that makes me think that we do need the ? and not using it for employee.email is actually a bug
|
Replied in here: #63060 (comment) |
rafecolton
left a comment
There was a problem hiding this comment.
Approving this, but will wait for @blazejkustra to comment before merging since I would like to understand just a little bit better
| rightElement: isAdmin ? <Badge text={translate('common.admin')} /> : undefined, | ||
| rightElement: ( | ||
| <MemberRightIcon | ||
| role={employee.role} |
There was a problem hiding this comment.
Thank you for explaining about the return value, that makes sense. It's weird that the employee.email and employee?.role were added in the same commit in #46510. Not sure if it was an oversight or there's a specific reason for it - @blazejkustra can you educate me here? 🙏
|
@rafecolton Is the PR good to merge? |
|
Sorry, I was out of the office for the last two days of last week. Let me take a look at your question real quick @rafecolton |
| rightElement: isAdmin ? <Badge text={translate('common.admin')} /> : undefined, | ||
| rightElement: ( | ||
| <MemberRightIcon | ||
| role={employee.role} |
There was a problem hiding this comment.
Probably just an oversight @rafecolton, we had a tight deadline back then 😅
|
@nkdengineer please go ahead and implement @blazejkustra's suggestions and we can merge |
Co-authored-by: Błażej Kustra <46095609+blazejkustra@users.noreply.github.com>
Co-authored-by: Błażej Kustra <46095609+blazejkustra@users.noreply.github.com>
|
@rafecolton I updated the PR. Thank you! |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/rafecolton in version: 9.1.71-0 🚀
|
|
🚀 Deployed to production by https://github.com/chiragsalian in version: 9.1.71-11 🚀
|
Explanation of Change
Fixed Issues
$ #61304
PROPOSAL: #61304 (comment)
Tests
Offline tests
Same as tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2025-05-29.at.22.33.21.mov
MacOS: Desktop