-
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
Fix can't interact with deleted parent action after deleting it for a while #42341
Fix can't interact with deleted parent action after deleting it for a while #42341
Conversation
@@ -933,7 +933,7 @@ function ReportActionItem({ | |||
<PressableWithSecondaryInteraction | |||
ref={popoverAnchorRef} | |||
onPress={draftMessage === undefined ? onPress : undefined} | |||
style={[action.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE ? styles.pointerEventsNone : styles.pointerEventsAuto]} | |||
style={[action.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE && !isDeletedParentAction ? styles.pointerEventsNone : styles.pointerEventsAuto]} |
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.
I see that we also have isDeletedParentAction
App/src/libs/ReportActionsUtils.ts
Lines 115 to 117 in e8ae3c5
function isDeletedParentAction(reportAction: OnyxEntry<ReportAction>): boolean { | |
return (reportAction?.message?.[0]?.isDeletedParentAction ?? false) && (reportAction?.childVisibleActionCount ?? 0) > 0; | |
} |
which is very similar to isMessageDeleted
.
App/src/libs/ReportActionsUtils.ts
Lines 804 to 806 in e8ae3c5
function isMessageDeleted(reportAction: OnyxEntry<ReportAction>): boolean { | |
return reportAction?.message?.[0]?.isDeletedParentAction ?? false; | |
} |
I decided to use isDeletedParentAction
instead which is already defined at the top of the component.
Reviewer Checklist
Screenshots/VideosAndroid: Native01_Android_Native.mp4Android: mWeb Chrome02_Android_Chrome.mp4iOS: Native03_iOS_Native.mp4iOS: mWeb Safari04_iOS_Safari.mp4MacOS: Chrome / Safari05_MacOS_Chrome.mp4MacOS: Desktop06_MacOS_Desktop.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.
LGTM.
Hey @bernhardoj would you mind merging main again please? |
@Julesssss done |
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪
|
Sorry @bernhardoj I completely forgot about this. COuld you merge main once more and I'll merge, thanks |
@Julesssss done |
✋ 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/Julesssss in version: 1.4.82-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.82-4 🚀
|
Details
A pending deleted message will have a pointer events set to none, but for deleted parent action, we still want the user to interact with it, for example, pressing the reply button.
Fixed Issues
$ #42194
PROPOSAL: #42194 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
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
Screen.Recording.2024-05-17.at.19.39.17.mov
Android: mWeb Chrome
Screen.Recording.2024-05-17.at.19.35.24.mov
iOS: Native
Screen.Recording.2024-05-17.at.19.24.08.mov
iOS: mWeb Safari
Screen.Recording.2024-05-17.at.19.28.55.mov
MacOS: Chrome / Safari
Screen.Recording.2024-05-17.at.19.19.24.mov
Screen.Recording.2024-05-17.at.19.20.03.mov
MacOS: Desktop
Screen.Recording.2024-05-17.at.19.21.02.mov