Refactor deleteReportComment() to use useAncestors hook#73604
Refactor deleteReportComment() to use useAncestors hook#73604luacmartins merged 24 commits intoExpensify:mainfrom
deleteReportComment() to use useAncestors hook#73604Conversation
- Implemented getOptimisticDataForAncestors to handle optimistic updates for ancestor reports. - Updated deleteReportComment and editReportComment functions to utilize the new ancestors parameter. - Modified PopoverReportActionContextMenu and ReportActionItemMessageEdit components to fetch ancestors. - Enhanced tests in ReportTest to validate changes with ancestors.
…or ancestor calculations
Codecov Report❌ Patch coverage is
... and 10 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
…arity and performance
|
Bump, @FitseTLT. |
|
@Tony-MK I don't get it why did you ignore the detail implementation of |
|
@FitseTLT , it has the behaviour as before. Which parts look different? |
all the return Line 10256 in 0d4ec84 |
|
And also conflicts @Tony-MK |
Apologies, the |
Oh because we filter it out in the hook, U are right 👍 |
…nsify-App into deleteReportComment
This reverts commit 4ab7817.
…cestors from changes in recent main merge commit Refactor comments and update optimistic data handling for ancestor report actions.
|
Bump @FitseTLT |
|
BTW there is still a difference in the way we are getting Line 10282 in f814036 Notices how we passed the second param. which decides the logic here Lines 10250 to 10252 in f814036 The logic of includeTransactionThread param still hasn't been implemented in hereLines 8627 to 8631 in f814036 |
|
@FitseTLT, but |
|
🚀 Deployed to staging by https://github.com/luacmartins in version: 9.2.43-0 🚀
|
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.2.43-2 🚀
|
| const [originalReport] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${getOriginalReportID(reportIDRef.current, reportActionRef.current)}`, { | ||
| canBeMissing: true, | ||
| }); | ||
| const ancestorsRef = useRef<typeof ancestors>([]); |
There was a problem hiding this comment.
why do we need this ref when we already have ancestors values directly available in the next line?
Explanation of Change
Refactoring
deleteReportCommentinto a pure function.Fixed Issues
$ #73568
PROPOSAL:
Tests
Force Offline.2 replies.1 reply.Force Offline.Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
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: Native
Android: mWeb Chrome
Android.-.mWeb.webm
iOS: Native
iOS.-.Native.mp4
iOS: mWeb Safari
iOS.-.Safari.mp4
MacOS: Chrome / Safari
macOS.-.Chrome.mov
MacOS: Desktop