-
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
Category MenuItem and CategoryPicker component #25470
Category MenuItem and CategoryPicker component #25470
Conversation
…ture/24463-category-selection
Will review on Monday! |
…ture/24463-category-selection
Reviewer Checklist
Screenshots/VideosWebchrome-desktop-2023-08-21_17.07.40.mp4Mobile Web - Chromeandroid-chrome.mp4Mobile Web - SafariUploading ios-safari-2023-08-21_19.40.13.mp4… Desktopmacos-desktop-2023-08-21_19.44.20.mp4iOSios-native-2023-08-21_19.30.24.mp4Androidandroid-native-2023-08-21_22.02.47.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.
@rezkiy37 I think we need a tweak to the tests section. FAB refers to the floating + button, rather than the inline + in the composer as you've used in your tests. This one:
It's also probably worth specifying to test this on a policy (workspace) chat, as it's not clear that it shouldn't work on normal chats/reports. I think QA might have trouble testing using the example you've provided for creating local policyCategories
, but I'm not sure how much of an issue that is!
Related to FAB, should we expect this to work with the FAB request money flow at this stage? When I try the flow FAB->Request Money->Select a workspace
, I don't see the category picker at all:
chrome-fab-issue-2023-08-21_16.59.46.mp4
(It works for the same workspace via the inline + in the composer)
…ture/24463-category-selection
@jjcoffee, I agree with you.
Thank you! |
@jjcoffee, I've extended the info on setting Onyx data. |
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 pretty good to me! Just some small feedback. Definitely want @yuwenmemon's feedback as well.
One thing I noticed, the category doesn't actually seem to get selected and added to the expense. Should that be happening in this PR? Or does that happen later? |
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.
Looking great! I presume this is just part of the overall solution, and we'll implement the following in other PRs, correct?
- Formulating the option tree/options - getOptions / getOptionsTree
- Saving the category
- Editing a pre-existing money request
Ah, yep. Nice 👍 |
Also as a side note no one (not even beta users) will be able to see categories until the policy is passed to the MoneyRequestConfirmationList (which will be done shortly as a part of #22710) Which is fine! |
…ture/24463-category-selection
@puneetlath, @yuwenmemon, thank you for review. I've updated the PR, please take a look 🙂 |
BTW, I've added info to the description that the backend is now sending categories. |
✋ 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/yuwenmemon in version: 1.3.57-0 🚀
|
🚀 Deployed to staging by https://github.com/yuwenmemon in version: 1.3.58-0 🚀
|
🚀 Deployed to production by https://github.com/luacmartins in version: 1.3.57-6 🚀
|
🚀 Deployed to production by https://github.com/luacmartins in version: 1.3.58-5 🚀
|
We failed to add subtitle for the category page which resulted in this regression #28952 |
Details
This is the first PR of three for the issue. Goals for this PR:
UPD: The backend is now sending categories to Onyx, so you shouldn’t need to set mock data manually anymore. To get categories please ask for a beta -
newDotCategories
.DEPRECATED: Since, the backend is not ready, I use local created data. I attach an example how I did it.
Example
Screenshot
src/pages/iou/steps/MoneyRequestConfirmPage.js
. Note: you can put any amount of categories and use other names.Code sample
Screenshots
Fixed Issues
For #24463
PROPOSAL: Slack conversation
Tests
DEPRECATED: Before next steps you have to have categories locally (check the example above).
Offline tests
Same as "Tests"
QA Steps
Same as "Tests"
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)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)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
Web
Chrome.mov
Chrome.ES.mov
Safari.mov
Mobile Web - Chrome
IOS.Chrome.MP4
Android.Chrome.mov
Mobile Web - Safari
IOS.Safari.MP4
Desktop
Desktop.mov
iOS
IOS.mov
Android
Android.mov