-
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
[$250] Split - App crashes when tapping Copy to clipboard on code block context menu #47743
Comments
Triggered auto assignment to @kevinksullivan ( |
@kevinksullivan FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors |
We think that this bug might be related to #vip-split |
Edited by proposal-police: This proposal was edited at 2024-08-20 19:46:28 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Split - App crashes when tapping Copy to clipboard on code block context menu What is the root cause of that problem?Context menu is not disabled when App/src/components/HTMLEngineProvider/HTMLRenderers/PreRenderer.tsx Lines 42 to 44 in dd32073
What changes do you think we should make in order to solve the problem?
What alternative solutions did you explore? (Optional)When report or action is not present, we can render <View style={isLast ? styles.mt2 : styles.mv2}>
<ShowContextMenuContext.Consumer>
{({anchor, report, reportNameValuePairs, action, checkIfContextMenuActive}) =>
report && action ? (
<PressableWithoutFeedback
onPress={onPressIn ?? (() => {})}
onPressIn={onPressIn}
onPressOut={onPressOut}
onLongPress={(event) => {
if (!report || !action) {
return;
}
showContextMenuForReport(event, anchor, report?.reportID ?? '-1', action, checkIfContextMenuActive, ReportUtils.isArchivedRoom(report, reportNameValuePairs));
}}
shouldUseHapticsOnLongPress
role={CONST.ROLE.PRESENTATION}
accessibilityLabel={translate('accessibilityHints.prestyledText')}
>
<View>
{/* eslint-disable-next-line react/jsx-props-no-spreading */}
<TDefaultRenderer {...defaultRendererProps} />
</View>
</PressableWithoutFeedback>
) : (
<View>
{/* eslint-disable-next-line react/jsx-props-no-spreading */}
<TDefaultRenderer {...defaultRendererProps} />
</View>
)
}
</ShowContextMenuContext.Consumer>
</View> Result |
ProposalPlease re-state the problem that we are trying to solve in this issue.A long press on the description field show the context menu actions. What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?
we must not allow user to open context menu type
was initially added in this PR to ensure that long-pressing on a link or email triggers context menu type or
They are displayed as code, not as an active email or link. Therefore, long-pressing on them should not trigger the context menu type
What alternative solutions did you explore? (Optional)
and just pass |
ProposalPlease re-state the problem that we are trying to solve in this issue.Context menu shown in code block in menu item What is the root cause of that problem?The context menu shouldn't be shown in codeblock in menu item What changes do you think we should make in order to solve the problem?If codeblocks are unnecessary in the menu item description, we can remove the shouldParseTitle parameter from MenuItemWithTopDescription. src/components/ReportActionItem/MoneyRequestView.tsx (or other similar parts) <OfflineWithFeedback pendingAction={getPendingFieldAction('comment')}>
<MenuItemWithTopDescription
description={translate('common.description')}
shouldParseTitle
title={updatedTransactionDescription ?? transactionDescription} What alternative solutions did you explore? (Optional)N/A |
Job added to Upwork: https://www.upwork.com/jobs/~01a78f1cc82b94611b |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hoangzinh ( |
Thanks for proposals, everyone. Will review today |
Thanks for your patience, everyone. After reviewing, here is my feedbacks
Click here to view recordingScreen.Recording.2024-08-27.at.09.05.20.mov
Updated: changed my suggestion base on this #47743 (comment) 🎀👀🎀 C+ reviewed~ |
Triggered auto assignment to @lakchote, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
I think it is expected, long press on the money request view's description should not display the context menu action. For example, In the video below, we still can open the context menu action in the confirmation page: Screen.Recording.2024-08-27.at.12.22.42.mov |
cc @lakchote, do you have any thoughts on my comment above? |
Added evidence in comment. |
@daledah I mean with your solution, on the report page, it won't open the context menu when user long presses on the codeblock messages Step to reproduce on native apps:
|
Ah you can also check my recording here for reference #47743 (comment) |
Screen.Recording.2024-08-27.at.15.29.20.mov
|
Can you go back and revisit the report again? When I test, I have to do the same to reproduce the issue if you've already opened the report page Click here to view recordingScreen.Recording.2024-08-27.at.17.41.34.mov |
Screen.Recording.2024-08-27.at.18.06.10.mov
and
|
@hoangzinh PR is ready. |
PR still in review. Looping in another BZ member as I am going OOO |
Triggered auto assignment to @isabelastisser ( |
No updates yet. |
@hoangzinh, @lakchote, @kevinksullivan, @isabelastisser, @daledah Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Discussion is still happening in the PR. |
@hoangzinh, @lakchote, @kevinksullivan, @isabelastisser, @daledah 6 days overdue. This is scarier than being forced to listen to Vogon poetry! |
PR has been deployed to staging. Awaiting for testing |
@lakchote @isabelastisser can you help to add the "Weekly" label back for this issue? It seems to be reverted to "Daily" |
Done. |
BugZero Checklist:
|
cc @isabelastisser this issue is ready for payment |
@hoangzinh, I processed your payment in Upwork. |
@daledah, thanks! I sent you the offer in Upwork now. All set! |
@isabelastisser Many thanks, offer accepted. |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.22-7
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
App will not crash
Actual Result:
App crashes when tapping Copy to clipboard on code block context menu in split menu
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6577380_1724181250000.Screen_Recording_20240821_030954_One_UI_Home.mp4
logs (2).txt
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @hoangzinhThe text was updated successfully, but these errors were encountered: