-
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
[HOLD for payment 2023-05-03] [$1000] Long pressing any of the app download link on mweb Safari does not open the copy to clipboard menu #16946
Comments
Triggered auto assignment to @abekkala ( |
Bug0 Triage Checklist (Main S/O)
|
Hi I'm Agata from Callstack - expert contributor group - maybe we could help with this one? |
Job added to Upwork: https://www.upwork.com/jobs/~014fb329f5e82a7436 |
Current assignee @abekkala is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak ( |
Current assignee @mountiny is eligible for the External assigner, not assigning anyone new. |
ProposalPlease re-state the problem that we are trying to solve in this issue.When the app download links are displayed, long-pressing one of the menu items should display the "Copy to clipboard" menu item expected in a custom context menu, but the menu item text is being highlighted instead. What is the root cause of that problem?The root component of the custom What changes do you think we should make in order to solve the problem?After some testing, it appears that However, this would require refactoring
The style property would be refactored like so:
What alternative solutions did you explore?Attempted to make use of the |
ProposalPlease re-state the problem that we are trying to solve in this issue.When long-pressing on a menu item in the app download links, the custom context menu is not being displayed correctly. Instead of showing a "Copy to clipboard" option, the menu item text is being highlighted. What is the root cause of that problem?The app download links are part of an existing codebase that uses React Native. The MenuItem component, which is used to display the menu items, has a root component of Pressable, which is causing the issue. What changes do you think we should make in order to solve the problem?Proposed solutionRefactor the MenuItem component to use the PressableWithSecondaryInteraction component as its root component. The PressableWithSecondaryInteraction component is based on the Pressable component, but it also includes support for secondary interactions like long presses. By using this component as the root, we can ensure that the custom context menu is displayed correctly when long-pressing on a menu item. BenefitsRefactoring the MenuItem component to use PressableWithSecondaryInteraction will provide the following benefits: The custom context menu will be displayed correctly when long-pressing on a menu item. Potential drawbacksThe proposed solution should not cause any significant performance issues or require a significant amount of development time. However, there may be some minor changes required in other parts of the app that use the MenuItem component, as they may need to be updated to include the new onPressIn, onPressOut, and onSecondaryInteraction props. Overall, the proposed solution provides a straightforward and effective way to address the issue of the custom context menu not being displayed correctly. |
@eVoloshchak please review the proposals once you get time! |
@mountiny, just to be clear, are we expecting all menu items containing links to have "Copy to clipboard" menu item? In this case Help, View the code and View open jobs. Or should it be added exclusively to the items on App download links page? |
ProposalPlease re-state the problem that we are trying to solve in this issue.We want to show the context-menu/popover when there is a long press on any link in the app download links page. This does not work in iOS Safari. What is the root cause of that problem?Each link in the app download links page has nested What changes do you think we should make in order to solve the problem?We want the This can be done by adding onStartShouldSetResponderCapture={() => true} // this could be done via prop in Since now the style={({hovered, pressed}) => ([
StyleUtils.getButtonBackgroundColorStyle(getButtonState(hovered, pressed, props.success, props.disabled, props.interactive), true),
])} iOS DemoScreen.Recording.2023-04-07.at.4.26.15.AM.movWhat alternative solutions did you explore? (Optional)As others have pointed out, we could remove the |
@eVoloshchak, @abekkala, @mountiny Whoops! This issue is 2 days overdue. Let's get this updated quick! |
1 similar comment
@eVoloshchak, @abekkala, @mountiny Whoops! This issue is 2 days overdue. Let's get this updated quick! |
Not overdue, reviewing proposals today |
ProposalPlease re-state the problem that we are trying to solve in this issue.We want to show the context-menu/popover when long pressing on link in the app download links page. This does not work in iOS Safari. What is the root cause of that problem?This is a regression of PR #12987. In that PR, we replace After we replace What changes do you think we should make in order to solve the problem?We have fixed similar issue in PR #12987 for component Add prop types definition here: onPressIn: PropTypes.func,
onPressOut: PropTypes.func,
onLongPress: PropTypes.func, Add default props here: onPressIn: () => {},
onPressOut: () => {},
onLongPress: () => {}, Add onPressIn, onPressOut, onLongPress handler for onPressIn={props.onPressIn}
onPressOut={props.onPressOut}
onLongPress={props.onLongPress} Pass handler function to onPressIn={() => props.isSmallScreenWidth && DeviceCapabilities.canUseTouchScreen() && ControlSelection.block()}
onPressOut={() => ControlSelection.unblock()}
onLongPress={e => showPopover(e, item.link)} Why we need to add onPressIn and onPressout handler for Link text become selected when we long press link text on Android ChromeAndroid-Chrome-20230410-215822.mp4Screenshots/VideosMobile Web - SafariiOS-Safari-20230410-214443.mp4Mobile Web - ChromeAndroid-Chrome-20230410-220429.mp4 |
📣 @b1tjoy! 📣 Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Format:
|
This comment was marked as resolved.
This comment was marked as resolved.
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
@mountiny I'm not sure why the title updated the payment date twice but didn't |
@abekkala correct always consider the later one unless said otherwise But the code is dumb and adds the new hold without looking if there is already one 😄 |
Not overdue, will fill out first 3 items of the BZ checklist today |
@eVoloshchak Bump |
|
@eVoloshchak and @akinwale |
@abekkala, I think the amount supposed to be $500 instead of $1500 |
@abekkala, bump on the above |
Not sure whats the process on this one, maybe we can just cut the price down on some future payments |
hmm, yeah, I can't retract a payment.
So yes, you're correct your payment for this should have been only $500 vs $1500. |
@eVoloshchak I'm actually the payer on this GH #18006 |
@akinwale can you link some issue where you active that we could reduce the payment for to compensate for this please? |
I thought the decision here was to not cut payment (#16946 (comment)), since it was an edge case that wasn't anticipated. If that's changed, I'm currently active on these issues: |
Oh damn yeah, was there no payment on the follow up issues/regression? |
No, there wasn't. @eVoloshchak did the review for the follow up issue/regression as well (#17656 (comment)). Note that this also covered a new issue that was discovered in a different commit. |
@abekkala ok so we are all good here, thanks for raising this. With millions of issues its easy to get lost in this |
@mountiny Only the C+ gets a reduced payment in the case of a regression. (in this case it would have meant a reduction for evoloshchak only - not akinwale) I have a payment coming up for evoloshchak (on a different GH) that I was going to reduce in order to even out this GH. Is that not necessary and I can just do a normal full pay out without reducing due to this GH regressIon? |
Yes full pay out! Oh I thought its both who get reduced payment. |
I think everything was done and paid here so closing, thanks for all the help, please comment if otherwise |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Expected result:
Copy to clipboard menu item should show up
Actual result:
Copy to clipboard menu item does not show up
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.2.94-0
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
RPReplay_Final1680518101.MP4
SGVA8663.1.MP4
Expensify/Expensify Issue URL:
Issue reported by: @mallenexpensify
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1680564052842509
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: