Decompose ReportActionCompose into compound Composer component#46
Draft
adhorodyski wants to merge 65 commits intomainfrom
Draft
Decompose ReportActionCompose into compound Composer component#46adhorodyski wants to merge 65 commits intomainfrom
adhorodyski wants to merge 65 commits intomainfrom
Conversation
…tate Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ents Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tion Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… onAttachmentPreviewClose
…ubmit from provider Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ze-systemmessage # Conflicts: # src/pages/inbox/report/PureReportActionItem.tsx
… header
PayPrimaryAction was missing the hasOnlyNonReimbursableTransactions check
that PayActionButton (preview) already had, causing onlyShowPayElsewhere
to be true for non-reimbursable reports. This made SettlementButton show
only "Mark as Paid" instead of also showing "Pay with Business Account".
Co-authored-by: {"message":"Not Found","documentation_url":"https://docs.github.com/rest/issues/comments#get-an-issue-comment","status":"404"} <{"message":"Not Found","documentation_url":"https://docs.github.com/rest/issues/comments#get-an-issue-comment","status":"404"}@users.noreply.github.com>
…/84192-bump-onyx-3.0.57 Bump react-native-onyx from 3.0.54 to 3.0.57.
…mmessage Implement system message for card freeze and unfreeze actions
Co-authored-by: situchan <108292595+situchan@users.noreply.github.com> Co-authored-by: Situ Chandra Shil <situchan@users.noreply.github.com>
fix: Per attendee amount on the table does not show negative sign
…rsablePayHeaderButtons [CP Staging] Fix non-reimbursable pay button options in report header
…r + useReceiptDrop
… debouncedValidate
Refactor `deleteMoneyRequest` to pass data
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| selectedTransactionIDs, | ||
| allTransactionViolationsParam, | ||
| currentUserAccountID, | ||
| currentUserEmail, |
| title, | ||
| description: '', | ||
| assigneeEmail: assignee?.login ?? '', | ||
| currentUserAccountID: currentUserPersonalDetails.accountID, |
| notifyReportID: reportID, | ||
| ancestors: targetReportAncestors, | ||
| attachments: attachmentFileRef.current, | ||
| currentUserAccountID: currentUserPersonalDetails.accountID, |
| ancestors: targetReportAncestors, | ||
| text: newCommentTrimmed, | ||
| timezoneParam: currentUserPersonalDetails.timezone ?? CONST.DEFAULT_TIME_ZONE, | ||
| currentUserAccountID: currentUserPersonalDetails.accountID, |
| const [newParentReport] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${report?.parentReportID}`); | ||
| const [currentDate] = useOnyx(ONYXKEYS.CURRENT_DATE); | ||
| const [policyCategories] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY_CATEGORIES}${policy?.id}`); | ||
| const [ownerBillingGracePeriodEnd] = useOnyx(ONYXKEYS.NVP_PRIVATE_OWNER_BILLING_GRACE_PERIOD_END); |
| const [amountOwed] = useOnyx(ONYXKEYS.NVP_PRIVATE_AMOUNT_OWED); | ||
| const personalPolicy = usePersonalPolicy(); | ||
| const [allPolicies] = useOnyx(ONYXKEYS.COLLECTION.POLICY); | ||
| const [userBillingGracePeriodEnds] = useOnyx(ONYXKEYS.COLLECTION.SHARED_NVP_PRIVATE_USER_BILLING_GRACE_PERIOD_END); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Decomposes the 730-LOC
ReportActionComposemonolith (with ~24 Onyx subscriptions) into a compoundComposercomponent architecture where each child self-subscribes to only the data it needs.Key changes:
ComposerMeta(refs, stable),ComposerState(isFocused, isFullComposerAvailable),ComposerSendState(isEmpty, exceededMaxLength, isSendDisabled),ComposerActions(stable functions) — prevents unnecessary re-renders from context changesComposer.DropZone,Composer.LocalTime,Composer.ActionMenu,Composer.Input,Composer.EmojiPicker,Composer.SendButton,Composer.Footer— each self-subscribing, guard-wrapped where appropriateuseComposerSubmit,useComposerFocus,useAttachmentPicker,useReceiptDrop,useLastEditableAction— co-located logic that was previously interleaved in the monolithuseAttachmentUploadValidation(replaced byuseAttachmentPicker+useReceiptDrop),ComposerBoxContext(merged intoComposerMeta), dead code and manualReact.memowrappersComposerProviderPopoverMenuandEmojiPickerin<Activity>to skip hidden subtree reconciliationTest plan
🤖 Generated with Claude Code