-
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
remove MoneyRequestCategoryPage and refactor route #35458
Conversation
@DylanDylann 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] |
@dukenv0307 Please resolve conflict |
@DylanDylann I updated. |
Also resolve conflict, please |
@DylanDylann I updated. |
My IOS simulator doesn't work now, please help me to test this. |
@dukenv0307 Please fix lint error and resolve conflict |
@DylanDylann I updated. |
src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsPage.js
Show resolved
Hide resolved
@dukenv0307 Please also use |
@dukenv0307 Please also use IOURequestStepCategory for editing requests and editing split bill I already used it for the edit case. |
Also should remove |
@@ -101,6 +107,10 @@ function IOURequestStepCategory({ | |||
navigateBack(); | |||
}; | |||
|
|||
if (!shouldShowCategories) { | |||
return <FullPageNotFoundView shouldShow />; |
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.
What do you think about moving FullPageNotFoundView
into StepScreenWrapper
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 think that's good.
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.
@DylanDylann moved not found to into StepScreenWrapper
.
The changes look good. Testing |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-02-21.at.15.24.09-compressed.movAndroid: mWeb Chromecategory-chro.mp4iOS: NativeScreen.Recording.2024-02-21.at.15.22.35-compressed.moviOS: mWeb Safaricategory-saf.mp4MacOS: Chrome / Safaricategory-web.mp4MacOS: Desktopcategory-desk.mp4 |
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.
Bug: Can't edit a category in request money. Error: Malformed currency code
I'm experiencing this as well
On main
, I'm getting a different error:
Uncaught TypeError: Cannot read properties of undefined (reading 'scrollTop')
so that's fun.
I don't feel comfortable approving/merging until the editing flow can be tested again, so let's wait until it's fixed in main
(Slack convo), then merge main
and retest.
Navigation.navigate(ROUTES.MONEY_REQUEST_CATEGORY.getRoute(props.iouType, props.reportID)); | ||
Navigation.navigate(ROUTES.MONEY_REQUEST_TAG.getRoute(props.iouType, props.reportID)); |
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.
What's up with this change?
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.
Thanks for your catch. @dukenv0307 It seems you update this in this commit
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.
That's my mistake.
Onyx.merge(`${ONYXKEYS.COLLECTION.TRANSACTION_DRAFT}${transactionID}`, {category}); | ||
} | ||
|
||
// eslint-disable-next-line @typescript-eslint/naming-convention | ||
function resetMoneyRequestCategory_temporaryForRefactor(transactionID: string) { |
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'm still seeing an instance of this on your branch locally - perhaps from a merge with main
?
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 updated this to use setMoneyRequestCategory
function.
@@ -299,16 +299,10 @@ function setMoneyRequestPendingFields(transactionID: string, pendingFields: Pend | |||
Onyx.merge(`${ONYXKEYS.COLLECTION.TRANSACTION_DRAFT}${transactionID}`, {pendingFields}); | |||
} | |||
|
|||
// eslint-disable-next-line @typescript-eslint/naming-convention | |||
function setMoneyRequestCategory_temporaryForRefactor(transactionID: string, category: string) { |
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.
Still seeing one usage of this too on your branch
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.
Same as above.
const {category: transactionCategory} = ReportUtils.getTransactionDetails(isEditingSplitBill ? splitDraftTransaction : transaction); | ||
|
||
const isPolicyExpenseChat = ReportUtils.isGroupPolicy(report); | ||
const shouldShowCategories = isPolicyExpenseChat && (transactionCategory || OptionsListUtils.hasEnabledOptions(_.values(policyCategories))); |
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.
@dukenv0307 Should update to shouldShowNotFoundPage
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.
@DylanDylann Updated.
@amyevans We can test this now. I tested and It worked well |
Okay great. Was able to test fully, looks good on that front! Let me just give the code another once over quick |
✋ 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/amyevans in version: 1.4.44-0 🚀
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.4.44-13 🚀
|
Details
MoneyRequestCategoryPage
IOURequestStepCategory
for both create and edit caseaction
param for the route ofIOURequestStepCategory
EditRequestCategoryPage
will be removed after removing all use ofEditRequestPage
Fixed Issues
$ #34606
PROPOSAL: #34606 (comment)
Tests
MoneyRequestCategoryPage
is removed with the route, screen, and all use of this page in the app:action/:iouType/category/:transactionID/:reportID
and action param in URL isedit
:action/:iouType/category/:transactionID/:reportID
and action param in URL isedit
Offline tests
Same as above
QA Steps
MoneyRequestCategoryPage
is removed with the route, screen, and all use of this page in the app:action/:iouType/category/:transactionID/:reportID
and action param in URL isedit
:action/:iouType/category/:transactionID/:reportID?backTo=
and action param in URL isedit
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(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label 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
Screen.Recording.2024-01-31.at.16.03.51.mov
Screen.Recording.2024-01-31.at.16.04.25.mov
Android: mWeb Chrome
Screen.Recording.2024-01-31.at.15.59.23.mov
Screen.Recording.2024-01-31.at.15.59.47.mov
iOS: Native
iOS: mWeb Safari
Screen.Recording.2024-01-31.at.15.55.35.mov
Screen.Recording.2024-01-31.at.15.56.00.mov
MacOS: Chrome / Safari
Screen.Recording.2024-01-31.at.15.40.47.mov
Screen.Recording.2024-01-31.at.15.43.30.mov
MacOS: Desktop
Screen.Recording.2024-01-31.at.16.08.55.mov
Screen.Recording.2024-01-31.at.16.09.15.mov