-
Notifications
You must be signed in to change notification settings - Fork 3.5k
feat: add ability to require attendees based on category selection (rework) #79050
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
base: main
Are you sure you want to change the base?
feat: add ability to require attendees based on category selection (rework) #79050
Conversation
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running: npx ts-node ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
… requires attendees
… is no additional attendee
… 'Attendee' field
|
I’ll review the PR once it’s ready, and apologies for having to revert it twice. |
|
No worries, quite a complex PR and didn't expect so many regressions either - I'll keep working on them as they appear and hopefully we'll eventually get to a point where there won't be any more regressions. |
…l attendee is not added
…7-categoryRequireAttendeesRework
|
@jayeshmangwani 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] |
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1bba24d2d9
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Explanation of Change
We’re expanding support for required category fields and coding. Specifically, we’ll add more category-based rules within each NewDot category. For example: “If the category is Meals & Entertainment, then require the Attendees field.”
Scope:
Description hintfield more discoverable: Specifically, we'll move Description hint field below Payroll code and above Delete categoryRequire fieldspush row: This new row contains options for bothRequire descriptionandRequire attendees, like soAttendees required for this category.👁️ See issue OP / screenshots for more details / UI representation.
Fixed Issues
$ #76155
PROPOSAL:
Tests
Preconditions:
I. Enable Attendees Required for Category
Require description/Require attendeesRequire attendees.II. Confirmation Page Validation
III. Existing Expense Violation Display
🧪 Tests from first PRs ❌ regressions
I. Expense - App crash after deleting category in the list #78076
II. Expense - "Multiple attendees required for this category" appears when splitting expense offline #78132
Preconditions:
III. Reports - "Multiple attendees required for this category" does not appear on expense row #78040
Preconditions:
Advertisingcategory.Require fields.Require attendees.Note
Should work the same for tracked expenses (created in SelfDM). The only exception is Invoices where Workspace-related violations won't apply since invoice is sent to individuals.
🧪 Tests from second PRs ❌ regressions
I. Reports - App crashes after removing expense from report #79003
II. Reports - Violation appears twice #79007
III. Invoice - Invoice cannot be sent when user selects a category that requires attendees #79008
Preconditions:
VI. Expense - No attendee require violation on confirm page when there is no additional attendee #79011
Preconditions:
V. Report - Violation for required attendee, disappears after opening "Attendee" field #79013
Preconditions:
VI. Reports - Violation does not show up on expense row when additional attendee is not added #79017
Preconditions:
Offline tests
I. Offline Toggle
II. Offline Expense Creation
III. Offline Category Change
QA Steps
Same as Tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso 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: HybridApp
android-hybrid.mp4
Android: mWeb Chrome
android-mweb.mp4
iOS: HybridApp
ios-hybrid.mov
iOS: mWeb Safari
ios-mweb.mov
MacOS: Chrome / Safari
web.mov