-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Fix new member added while offline doesn't show in approval flow list #54105
base: main
Are you sure you want to change the base?
Fix new member added while offline doesn't show in approval flow list #54105
Conversation
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid-app-2024-12-13_15.35.23.mp4Android: mWeb Chromeandroid-chrome-2024-12-13_15.38.24.mp4iOS: Nativeios-app-2024-12-13_15.50.15.mp4iOS: mWeb Safariios-safari-2024-12-13_15.48.02.mp4MacOS: Chrome / Safaridesktop-chrome-2024-12-13_15.22.24.mp4MacOS: Desktopdesktop-app-2024-12-13_15.29.56.mp4 |
tests/actions/PolicyMemberTest.ts
Outdated
@@ -228,4 +228,40 @@ describe('actions/PolicyMember', () => { | |||
}); | |||
}); | |||
}); | |||
|
|||
describe('addMembersToWorkspace', () => { | |||
it('Add new member to a workspace', async () => { |
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.
it('Add new member to a workspace', async () => { | |
it('Add a new member to a workspace whilst offline', async () => { |
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 didn't add the offline word because optimistic data is not specific to offline test
Yes, it's unrelated since both email and submitsTo are a string. (I can't repro it when adding a new completely user btw, but sometimes I did repro that failed to execute 'put' issue recently before, but I don't remember when and how, it just appears randomly) |
@bernhardoj Hmm it happens consistently for me on both the Chrome and Desktop app. I agree it's not within scope of this issue though since it's a bug that was just hidden because a member added offline wouldn't be showing up. |
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! There is this issue that inviting a completely new member (never chatted with before) will cause an error when adding a new workflow, but I don't think this is within scope of this issue. I think we should handle it as a followup, or alternatively hold this PR until we fix that issue.
Oh, I missed that you mentioned it happened on step 7, I thought it happened after adding a new member to a workspace. Yes, I can repro it. That happens because we are saving the selected user avatar here. App/src/pages/workspace/workflows/approvals/WorkspaceWorkflowsApprovalsExpensesFromPage.tsx Lines 146 to 147 in 2c3c9ac
And it falls back to FallbackAvatar SVG if the user doesn't have App/src/pages/workspace/workflows/approvals/WorkspaceWorkflowsApprovalsExpensesFromPage.tsx Line 107 in 2c3c9ac
I think we shouldn't save the avatar. We can get the avatar from the personal details and accountID. But this would require more changes to change the way we get the avatar for approval workflow. |
Explanation of Change
Fixed Issues
$ #53931
PROPOSAL: #53931 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
Prerequisite: workflow is enabled and upgraded to Collect
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
android.mp4
Android: mWeb Chrome
android.mweb.mp4
iOS: Native
ios.mp4
iOS: mWeb Safari
ios.mweb.mp4
MacOS: Chrome / Safari
web.mp4
MacOS: Desktop
desktop.mp4