-
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
[OldDot Rules Migration] Category settings: Default categories #48391
[OldDot Rules Migration] Category settings: Default categories #48391
Conversation
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 fine, couple small remarks
src/pages/workspace/categories/WorkspaceCategoriesSettingsPage.tsx
Outdated
Show resolved
Hide resolved
src/pages/workspace/categories/WorkspaceCategoriesSettingsPage.tsx
Outdated
Show resolved
Hide resolved
@ahmedGaber93 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: Nativea.mp4Android: mWeb Chromeaw.mp4iOS: Nativei.mp4iOS: mWeb Safariiw.mp4MacOS: Chrome / Safariw.mp4MacOS: Desktopd.mp4 |
I faced those two minor issues while testing, but the core function works fine. Bug: console error when scroll the nested SectionList20240903115941364.mp4Bug: back button is focused with blue border after search for category and select it20240903121216185.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.
Great work so far. Had a few comments.
@marcaaron Sorry for reviewing the code after your review, It seems we were reviewing the code at the same time, and when posting my review I didn't note your review is posted. I know you don't take care about these things, But I had to clarify. |
@ahmedGaber93 No worries. It's fine to review PRs in parallel. But let me know if you have a specific concern. I still want you to review whether I review early or not. |
@marcaaron Thanks, I just wrote a small notes above, and I need your opinion here #48391 (comment) |
Alright, I've addressed all of the comments above, the PR is ready for review! @marcaaron @ahmedGaber93 🤞🏻 |
@BartoszGrajdek Great, I will start reviewing after half an hour. |
@BartoszGrajdek this issue #48391 (comment) still appear on old workspace |
Minor Bug on iOS mWeb Safari: spend category is not select from the first tap, we need to two taps or scroll then tap issue.mp4 |
The back button outline issue here #48391 (comment) is still reproduced. |
This is a backend problem which I've informed marc about, we currently don't get any updates to |
The same thing is happening on staging in Distance Rates where Videodistance-rates.mov |
@BartoszGrajdek yes, it looks like it's a BE issue, but what do you think about hiding the header section in this case |
You're right, overlooked that 😅
Looks like this ^ is the only remaining problem I'm not sure yet how to solve it but I'll try to work on it in a few hours. It seems like it's only happening from time to time, so I'll need to figure out how to consistently reproduce it first. My mWeb Safariios.mov |
Okay regarding the issue described above - IMO this is something we can handle either in a follow-up PR or with the whole Modal issue at once. That's because it's happening only in cases where the user hasn't scrolled or searched anything and even then it's happening like 1 out of 20 times. This is most likely related to the scrolling problem I've described here, but for now as this PR is a different task it's not something I think we should focus on. Let me know what do you think 🙌🏻 @marcaaron @ahmedGaber93 |
I think it depends on the device because it reproduced with me every time. But I agree It's not a big deal to focus on now, and we can handle it in a follow-up PR. |
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!
Sounds good to me. The problem seems unrelated to these changes specifically. |
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 ❤️ !
Great work @BartoszGrajdek! And nice job reviewing @ahmedGaber93 🙇
✋ 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/marcaaron in version: 9.0.30-0 🚀
|
This PR is failing for Android because of issue #48676 |
const setNewCategory = (selectedCategory: ListItem) => { | ||
if (!selectedCategory.text) { | ||
return; | ||
} | ||
Policy.setWorkspaceDefaultSpendCategory(policyID, groupID, selectedCategory.text); | ||
}; |
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.
When setting a new category we had to check that it's not the current selected one i.e. newCategory != currentCategory. This is because we have a case where if you go offline, delete the current category and select it again the following API calls will be queued:
- Delete category
- Set spend category
And in the second API call we will be setting the spend category to a category that no longer exists which will causes an error.
(Comnig from #49295)
Details
This PR adds a possibility to edit default spend categories like it used to work on OldDot.
Fixed Issues
$ #47018
Tests
Firstly we need to ensure two things:
Categories
settingNow going into proper testing:
Verify that it worked and is shown in spend categories list now.
Offline tests
Same as above
QA Steps
Same as above
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.mov
Android: mWeb Chrome
chrome.mov
iOS: Native
ios.mov
iOS: mWeb Safari
safari.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov