Repository navigation
[TS Migration] Migrate WorkspaceProfilePage and WorkspaceProfileCurrencyPage - #34897
Conversation
There was a problem hiding this comment.
| type WorkspaceSettingsCurrentPageWithOnyxProps = { | |
| type WorkspaceSettingsCurrentPageOnyxProps = { |
There was a problem hiding this comment.
| currencyList: OnyxEntry<Record<string, Currency>>; | |
| currencyList: OnyxEntry<CurrencyList>; |
Could you create a CurrencyList type in src/types/onyx/Currency.ts and use it here and here?
type CurrencyList = Record<string, OnyxTypes.Currency | null>;There was a problem hiding this comment.
| function WorkspaceSettingsCurrencyPage({currencyList, policy, isLoadingReportData}: WorkspaceSettingsCurrentPageProps) { | |
| function WorkspaceSettingsCurrencyPage({currencyList = {}, policy, isLoadingReportData = true}: WorkspaceSettingsCurrentPageProps) { |
There was a problem hiding this comment.
| function WorkspaceSettingsPage({policy, currencyList, route}: WorkSpaceSettingsPageProps) { | |
| function WorkspaceSettingsPage({policy, currencyList = {}, route}: WorkSpaceSettingsPageProps) { |
There was a problem hiding this comment.
Why was this logic removed?
if (policy.isPolicyUpdating) {
return;
}There was a problem hiding this comment.
isPolicyUpdating doesn't exist on withPolicy hook, this was always coming undefined, I've tested this on web and mobile.
|
@rushatgabhane 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] |
# Conflicts: # src/pages/workspace/WorkspaceSettingsPage.tsx
8725ab0 to
4f20d01
Compare
|
@ruben-rebelo could you please resolve the conflicts, thanks 🙇 |
# Conflicts: # src/ONYXKEYS.ts # src/pages/workspace/WorkspaceOverviewCurrencyPage.js # src/pages/workspace/WorkspaceOverviewPage.js # src/pages/workspace/WorkspaceSettingsCurrencyPage.js # src/pages/workspace/WorkspaceSettingsCurrencyPage.tsx # src/types/onyx/Form.ts # src/types/onyx/index.ts
|
Hello @rushatgabhane, thank you for the review, I've resolved the conflits! |
Reviewer Checklist
Screenshots/Videos |
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #25191 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
arosiclair
left a comment
There was a problem hiding this comment.
It looks like the WorkspaceSettingsPage and WorkspaceSettingsCurrencyPage are no longer on main... did they get removed/refactored with our new navigation? We may not need those components anymore. @ruben-rebelo @rushatgabhane
# Conflicts: # src/ONYXKEYS.ts # src/pages/workspace/WorkspaceOverviewCurrencyPage.js # src/pages/workspace/WorkspaceOverviewCurrencyPage.tsx # src/pages/workspace/WorkspaceProfileCurrencyPage.js
…me to WorkspaceProfile
# Conflicts: # src/libs/UserUtils.ts
|
Hello @arosiclair and @rushatgabhane It seems that were some file refactoring and renaming happening on WorkspaceSettingsPage and WorkspaceSettingsCurrencyPage. |
arosiclair
left a comment
There was a problem hiding this comment.
@ruben-rebelo can you also update the title and description to match the new files we're migrating? Thanks
# Conflicts: # src/pages/workspace/WorkspaceProfilePage.tsx
|
@arosiclair I've updated the PR with the suggestions and resolved the conflicts |
|
✋ 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/arosiclair in version: 1.4.44-0 🚀
|
| description={translate('workspace.editor.currencyInputLabel')} | ||
| shouldShowRightIcon={!readOnly} | ||
| disabled={hasVBA || readOnly} | ||
| disabled={hasVBA ?? readOnly} |
There was a problem hiding this comment.
This caused deploy blocker - #37288
During TS migration, please be careful of using nullish coalescing.
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.4.44-13 🚀
|











Details
[TS migration] Migrate WorkspaceSettingsPage and WorkspaceSettingsCurrencyPage to TypeScript
Fixed Issues
$ #25191
PROPOSAL: N/A
Tests
Test WorkspaceSettingsPage:
Test WorkspaceSettingsCurrencyPage:
Offline tests
N/A
QA Steps
Same as in the Tests section.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting 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)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel so 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-native.mov
Android: mWeb Chrome
android-web.mov
iOS: Native
ios-native.mov
iOS: mWeb Safari
ios-web.mov
MacOS: Chrome / Safari
macos-web.mov
MacOS: Desktop
macos-desktop.mov