-
Notifications
You must be signed in to change notification settings - Fork 3k
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: Toggle, GL code & Payroll code are no longer grayed out after renaming category #46176
Conversation
@rayane-djouah 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] |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-08-01.at.3.12.47.PM.movAndroid: mWeb ChromeScreen.Recording.2024-08-01.at.3.10.14.PM.moviOS: NativeSimulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-08-01.at.15.15.27.mp4iOS: mWeb SafariSimulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-08-01.at.15.12.13.mp4MacOS: Chrome / SafariScreen.Recording.2024-08-01.at.3.05.57.PM.movMacOS: DesktopScreen.Recording.2024-08-01.at.3.07.43.PM.mov |
src/libs/actions/Policy/Category.ts
Outdated
@@ -268,6 +268,7 @@ function createPolicyCategory(policyID: string, categoryName: string) { | |||
|
|||
function renamePolicyCategory(policyID: string, policyCategory: {oldName: string; newName: string}) { | |||
const policyCategoryToUpdate = allPolicyCategories?.[`${ONYXKEYS.COLLECTION.POLICY_CATEGORIES}${policyID}`]?.[policyCategory.oldName] ?? {}; | |||
const pendingFields = allPolicyCategories?.[`${ONYXKEYS.COLLECTION.POLICY_CATEGORIES}${policyID}`]?.[policyCategory.oldName]?.pendingFields ?? {}; |
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.
const pendingFields = allPolicyCategories?.[`${ONYXKEYS.COLLECTION.POLICY_CATEGORIES}${policyID}`]?.[policyCategory.oldName]?.pendingFields ?? {}; |
src/libs/actions/Policy/Category.ts
Outdated
@@ -268,6 +268,7 @@ function createPolicyCategory(policyID: string, categoryName: string) { | |||
|
|||
function renamePolicyCategory(policyID: string, policyCategory: {oldName: string; newName: string}) { | |||
const policyCategoryToUpdate = allPolicyCategories?.[`${ONYXKEYS.COLLECTION.POLICY_CATEGORIES}${policyID}`]?.[policyCategory.oldName] ?? {}; |
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.
const policyCategoryToUpdate = allPolicyCategories?.[`${ONYXKEYS.COLLECTION.POLICY_CATEGORIES}${policyID}`]?.[policyCategory.oldName] ?? {}; | |
const policyCategoryToUpdate = allPolicyCategories?.[`${ONYXKEYS.COLLECTION.POLICY_CATEGORIES}${policyID}`]?.[policyCategory.oldName]; |
src/libs/actions/Policy/Category.ts
Outdated
@@ -281,6 +282,7 @@ function renamePolicyCategory(policyID: string, policyCategory: {oldName: string | |||
name: policyCategory.newName, | |||
pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE, | |||
pendingFields: { | |||
...pendingFields, |
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.
...pendingFields, | |
...(policyCategoryToUpdate?.pendingFields ?? {}), |
src/libs/actions/Policy/Category.ts
Outdated
@@ -300,6 +302,7 @@ function renamePolicyCategory(policyID: string, policyCategory: {oldName: string | |||
errors: null, | |||
pendingAction: null, | |||
pendingFields: { | |||
...pendingFields, |
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.
...pendingFields, | |
...(policyCategoryToUpdate?.pendingFields ?? {}), |
@etCoderDysto - Could you please address the above comments? |
I have addressed the comments. Sorry for my late response. |
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 and tests well
✋ 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/iwiznia in version: 9.0.17-0 🚀
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.0.17-2 🚀
|
2 similar comments
🚀 Deployed to production by https://github.com/marcaaron in version: 9.0.17-2 🚀
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.0.17-2 🚀
|
Details
Fixed Issues
$ #45755
PROPOSAL: #45755 (comment)
Tests
Precondition:
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.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.Web.mp4
iOS: Native
IOS.mp4
iOS: mWeb Safari
iOS.safari.mp4
MacOS: Chrome / Safari
Web.mp4
MacOS: Desktop
Desktop.mp4