App icon indicating copy to clipboard operation
App copied to clipboard

[HOLD for payment 2021-12-06] $500 Holding 2 fingers on PDF opens context menu - Reported by: @parasharrajat

Open isagoico opened this issue 5 years ago • 18 comments

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:

  1. Navigate to a conversation
  2. Send a PDF
  3. Open the preview
  4. Hold 2 fingers over the PDF

Expected Result:

No context menu should be displayed in attachment preview

Actual Result:

Context menu displayed.

Workaround:

None needed.

Platform:

Where is this issue occurring?

  • iOS
  • Android

Version Number: 1.1.7-22

Reproducible in staging?: Yes Reproducible in production?: Yes

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

Expensify/Expensify Issue URL:

Issue reported by: @parasharrajat Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1634141035220700

View all open jobs on GitHub

isagoico avatar Oct 15 '21 03:10 isagoico

Triggered auto assignment to @yuwenmemon (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

MelvinBot avatar Oct 15 '21 03:10 MelvinBot

@yuwenmemon Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

MelvinBot avatar Oct 18 '21 19:10 MelvinBot

@yuwenmemon Huh... This is 4 days overdue. Who can take care of this?

MelvinBot avatar Oct 20 '21 19:10 MelvinBot

Triggered auto assignment to @SofiedeVreese (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

MelvinBot avatar Oct 20 '21 21:10 MelvinBot

Job posted on Upwork: https://www.upwork.com/jobs/~010ae2998ab7b91209

SofiedeVreese avatar Oct 20 '21 22:10 SofiedeVreese

Triggered auto assignment to @Luke9389 (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

MelvinBot avatar Oct 20 '21 22:10 MelvinBot

@parasharrajat Do you mean the menu with Copy to clipboard, Mark as unread and Delete comment?

If so, why wouldn't we want these options to show up?

Luke9389 avatar Oct 20 '21 23:10 Luke9389

Not sure why the video wasn't uploaded here https://expensify.slack.com/archives/C01GTK53T8Q/p1634141057220800?thread_ts=1634141035.220700&cid=C01GTK53T8Q.

@Luke9389 according to the Video, the context menu is opening on the Preview Modal which it should not.

parasharrajat avatar Oct 21 '21 01:10 parasharrajat

Oh, I see. That makes more sense. Thanks

Luke9389 avatar Oct 21 '21 01:10 Luke9389

Price increased to $500

SofiedeVreese avatar Oct 27 '21 21:10 SofiedeVreese

Proposal

We can wrap the PDF component with a component that prevents the press event from going up in the tree. The press event that bubbles up ends up opening the context menu.

TouchableWithoutFeedback is a good option because it works for catching the event and doing nothing with it, and it doesn't give any visual feedback.

We can wrap the following lines:

https://github.com/Expensify/App/blob/d7a77751fe4e4563094e8650972beb59ad71d27d/src/components/PDFView/index.native.js#L34-L41

like this:

const PDFView = props => (
    <View style={[styles.flex1, props.style]}>
        <TouchableWithoutFeedback>
            <PDF
                activityIndicator={<FullScreenLoadingIndicator />}
                source={{uri: props.sourceURL}}
                style={[
                    styles.imageModalPDF,
                    getWidthAndHeightStyle(props.windowWidth, props.windowHeight),
                ]}
            />
        </TouchableWithoutFeedback>
    </View>
);

CamilaRivera avatar Oct 29 '21 05:10 CamilaRivera

Ok, let's give this a try @CamilaRivera. You've got the 🟢 green light 🟢 to go ahead and make a PR.

Luke9389 avatar Nov 01 '21 22:11 Luke9389

Niiice! I've hired @CamilaRivera via Upwork now.

SofiedeVreese avatar Nov 02 '21 22:11 SofiedeVreese

No updates: it has an open PR.

SofiedeVreese avatar Nov 09 '21 00:11 SofiedeVreese

Not overdue: PR is open.

SofiedeVreese avatar Nov 17 '21 21:11 SofiedeVreese

PR merged, waiting for deploy so I can add the payment hold.

SofiedeVreese avatar Nov 19 '21 02:11 SofiedeVreese

The solution for this issue has been :rocket: deployed to production :rocket: in version 1.1.16-10 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

  • https://github.com/Expensify/App/pull/6169

If no regressions arise, payment will be issued on 2021-12-06. :confetti_ball:

botify avatar Nov 29 '21 18:11 botify

Created a separate job in Upwork to pay out @parasharrajat 's reporting bonus.

Paid out @CamilaRivera + company offsite bonus.

Contributor paid: ✅ Contract cancelled: ✅ Upwork posting removed: ✅

SofiedeVreese avatar Dec 06 '21 23:12 SofiedeVreese