-
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
Build optimistic custom unit when creating workspace #31170
Conversation
@eVoloshchak 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] |
src/libs/actions/Policy.js
Outdated
@@ -1130,7 +1133,8 @@ function createDraftInitialWorkspace(policyOwnerEmail = '', policyName = '', pol | |||
function createWorkspace(policyOwnerEmail = '', makeMeAdmin = false, policyName = '', policyID = generatePolicyID()) { | |||
const workspaceName = policyName || generateDefaultWorkspaceName(policyOwnerEmail); | |||
|
|||
const {customUnits, customUnitID, customUnitRateID} = buildOptimisticCustomUnits(); | |||
const outputCurrency = lodashGet(allPersonalDetails, [sessionAccountID, 'localCurrencyCode'], CONST.CURRENCY.USD); |
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.
We use the same line twice
const outputCurrency = lodashGet(allPersonalDetails, [sessionAccountID, 'localCurrencyCode'], CONST.CURRENCY.USD);
Can we move it to buildOptimisticCustomUnits
? And for both cases (createWorkspace
and createDraftInitialWorkspace
) access it from customUnits[customUnitID].rates[customUnitRateID].currency
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.
@eVoloshchak I updated.
@eVoloshchak Please help to review again when you have a chance. |
Co-authored-by: Eugene Voloshchak <copyreading@gmail.com>
@eVoloshchak Updated. |
@eVoloshchak Friendly bump. |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2023-11-29.at.15.13.15.movAndroid: mWeb ChromeScreen.Recording.2023-11-29.at.15.18.39.moviOS: NativeScreen.Recording.2023-11-29.at.15.10.09.moviOS: mWeb SafariScreen.Recording.2023-11-29.at.15.11.38.movMacOS: Chrome / SafariScreen.Recording.2023-11-29.at.15.08.51.movMacOS: DesktopScreen.Recording.2023-11-29.at.15.23.02.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.
LGTM
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 great, thanks!
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Cherry-picked to staging by https://github.com/yuwenmemon in version: 1.4.7-4 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to staging by https://github.com/robertjchen in version: 1.4.8-0 🚀
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 1.4.8-3 🚀
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 1.4.8-3 🚀
|
Details
Build optimistic custom unit when creating workspace
Fixed Issues
$ #30801
PROPOSAL: #30801 (comment)
Tests
undefined
Offline tests
Same as above
QA Steps
undefined
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.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)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.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
Screen.Recording.2023-11-10.at.16.21.55.mov
Android: mWeb Chrome
Screen.Recording.2023-11-10.at.16.08.29.mov
iOS: Native
Screen.Recording.2023-11-10.at.16.16.27.mov
iOS: mWeb Safari
Screen.Recording.2023-11-10.at.16.04.19.mov
MacOS: Chrome / Safari
Screen.Recording.2023-11-10.at.15.56.12.mov
MacOS: Desktop
Screen.Recording.2023-11-10.at.16.26.59.mov