App icon indicating copy to clipboard operation
App copied to clipboard

BUG: Tapping "CHAT WITH YOUR SETUP SPECIALIST" takes to the mweb with a blank page. reported by @thesahindia

Open kavimuru opened this issue 3 years ago • 10 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. Create a workspace if you haven't already
  2. Go to concierge chat and click on ":speech_balloon: CHAT WITH YOUR SETUP SPECIALIST"

Expected Result:

The chat should open in the app like for normal chat links (try copy pasting a chat link from new.expensify.com and tap on it)

Actual Result:

You will be redirected to the web and there will be a blank page

Workaround:

unknown

Platform:

Where is this issue occurring?

  • Android
  • Mobile Web

Version Number: 1.2.18-4 Reproducible in staging?: y Reproducible in production?: y Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos:

https://user-images.githubusercontent.com/43996225/197039613-583b20c5-b063-405f-9977-9cd93ce490ab.mp4

Expensify/Expensify Issue URL: Issue reported by: @thesahindia Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1666270549878679

View all open jobs on GitHub

kavimuru avatar Oct 20 '22 19:10 kavimuru

Triggered auto assignment to @adelekennedy (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

melvin-bot[bot] avatar Oct 21 '22 20:10 melvin-bot[bot]

@adelekennedy new BZ chore SO is here, we want to ensure BZ stays assigned to all issues so we can get to BugZero,

mallenexpensify avatar Oct 21 '22 20:10 mallenexpensify

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

melvin-bot[bot] avatar Oct 24 '22 07:10 melvin-bot[bot]

@adelekennedy Whoops! This issue is 2 days overdue. Let's get this updated quick!

melvin-bot[bot] avatar Oct 24 '22 07:10 melvin-bot[bot]

@adelekennedy , I'm gonna snag this from ya cuz I've already gone down a bit of a 🐰🕳 here https://expensify.slack.com/archives/C01GTK53T8Q/p1666630199231519?thread_ts=1666270549.878679&cid=C01GTK53T8Q

or... actually.. will just co-assign

mallenexpensify avatar Oct 24 '22 16:10 mallenexpensify

ty ty @mallenexpensify I neglected this on Friday.

adelekennedy avatar Oct 24 '22 18:10 adelekennedy

Gonna move on to engineering. We chatted about more here

@alex-mechler mentioned

some magic here would make it pretty simple https://github.com/Expensify/App/blob/d42b51b3ad5bde56882979cef4157a1f71dc6ac2/src/components/HTMLEngineProvider/HTMLRenderers/AnchorRenderer.js#L32-L47

I def don't think it's ideal to take people out of the platform or tab they're in, if we can avoid it. Especially since situations like this will continue to happen as we move towards reunification.

mallenexpensify avatar Oct 27 '22 16:10 mallenexpensify

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

melvin-bot[bot] avatar Oct 27 '22 16:10 melvin-bot[bot]

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

melvin-bot[bot] avatar Oct 31 '22 07:10 melvin-bot[bot]

@ctkochan22, @mallenexpensify, @adelekennedy Whoops! This issue is 2 days overdue. Let's get this updated quick!

melvin-bot[bot] avatar Oct 31 '22 08:10 melvin-bot[bot]

OK... been chatting about here

From @alex-mechler

some magic here would make it pretty simple https://github.com/Expensify/App/blob/d42b51b3ad5bde56882979cef4157a1f71dc6ac2/src/components/HTMLEngineProvider/HTMLRenderers/AnchorRenderer.js#L32-L47

and

we just have to parse the report id and navigate to it

@ctkochan22 can this be worked on externally?

mallenexpensify avatar Oct 31 '22 17:10 mallenexpensify

Yes I was hoping to get to it myself, but I believe it should be able to be worked on externally.

ctkochan22 avatar Nov 03 '22 04:11 ctkochan22

Did we post this one to upwork yet? Seems to be missing the $250 from the title 🤔

Just helping push this forward per the reminder to keep the pressure on to find a contributor and get this one closed out! Maybe a good idea to bump the OG bug report in Slack and ask individual contributors to try solving (perhaps even the bug reports @thesahindia :) )

michaelhaxhiu avatar Nov 03 '22 21:11 michaelhaxhiu

Good 👀 , posted job https://www.upwork.com/jobs/~012cd3bc0f58a4991e Updated title too

mallenexpensify avatar Nov 07 '22 16:11 mallenexpensify

@mallenexpensify PROPOSAL, I suggest implementing something like this, try to get reportID from href, so it should be number or undefined, this will work for all applications (web, mobile, desktop) but if it's not necessary, need to add more logic

        if (internalExpensifyPath && !isAttachment) {
            if (reportId) {
                Navigation.navigate(ROUTES.getReportRoute(reportId));
            } else {
                Link.openOldDotLink(internalExpensifyPath);
            }

WestDon avatar Nov 08 '22 10:11 WestDon

Looks like something related to react-navigation may have been mentioned in this issue discussion.

As a reminder, please make sure that all proposals are not workarounds and that any and all attempt to fix the issue holistically have been made before proceeding with a solution. Proposals to change our DeprecatedCustomActions.js files should not be accepted.

Feel free to drop a note in #expensify-open-source with any questions.

melvin-bot[bot] avatar Nov 08 '22 10:11 melvin-bot[bot]

Proposal

Solution

because 💬 CHAT WITH YOUR SETUP SPECIALIST has the format: https://www.expensify.com/newdotreport?reportID=<< reportID >> if internalExpensifyPath start with 'newdotreport?reportID=', I'll get the reportID value and navigate to appropriate chat.

In https://github.com/Expensify/App/blob/91acada3b65af8c465febe6853bcc7d37995f0f4/src/components/HTMLEngineProvider/HTMLRenderers/AnchorRenderer.js#L42

+ import ROUTES from '../../../ROUTES';
...
        if (internalExpensifyPath && !isAttachment) {
+            if (internalExpensifyPath.startsWith('newdotreport?reportID=')) {
+                const reportID = internalExpensifyPath.replace('newdotreport?reportID=', '')
+                Navigation.navigate(ROUTES.getReportRoute(reportID));
+                return;
+            }
            Link.openOldDotLink(internalExpensifyPath);
            return;
        }

https://user-images.githubusercontent.com/113963320/200557248-d4b7663f-d1f6-4c80-97f6-42bf603c1037.mov

tienifr avatar Nov 08 '22 11:11 tienifr

Current assignee @mallenexpensify is eligible for the External assigner, not assigning anyone new.

melvin-bot[bot] avatar Nov 08 '22 21:11 melvin-bot[bot]

Triggered auto assignment to Contributor-plus team member for initial proposal review - @sobitneupane (External)

melvin-bot[bot] avatar Nov 08 '22 21:11 melvin-bot[bot]

Current assignee @ctkochan22 is eligible for the External assigner, not assigning anyone new.

melvin-bot[bot] avatar Nov 08 '22 21:11 melvin-bot[bot]

Weird, when @ctkochan22 added the External label, it didn't assign a c+. Readded now and @sobitneupane is assigned.
@sobitneupane can you review @tienifr 's proposal above plz? https://github.com/Expensify/App/issues/12046#issuecomment-1307085397

mallenexpensify avatar Nov 08 '22 21:11 mallenexpensify

CC: @MitchExpensify @zsgreenwald @alex-mechler as this relates to the behaviour of the deep link in the Guides welcome message on mWeb.

trjExpensify avatar Nov 08 '22 21:11 trjExpensify

Triggered auto assignment to @miljakljajic (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

melvin-bot[bot] avatar Nov 09 '22 02:11 melvin-bot[bot]

Reassigning as I'm heading OOO for a month

mallenexpensify avatar Nov 09 '22 02:11 mallenexpensify

Thanks Matt, I'll handle in the meanwhile. @sobitneupane, looking forward to your review of @tienifr 's proposal when you're ready.

miljakljajic avatar Nov 09 '22 15:11 miljakljajic

Proposal

I think the best way to fix this is by fixing Concierge messages to adapt with the new expensify But if you insist to support the old messages given they have only one format which is having the report id in the GET parameter reportID (no matter the url, to support other cases than newdotreport), here is my proposal

diff --git a/src/components/HTMLEngineProvider/HTMLRenderers/AnchorRenderer.js b/src/components/HTMLEngineProvider/HTMLRenderers/AnchorRenderer.js
index 36adfe30f..8e6632fa2 100644
--- a/src/components/HTMLEngineProvider/HTMLRenderers/AnchorRenderer.js
+++ b/src/components/HTMLEngineProvider/HTMLRenderers/AnchorRenderer.js
@@ -40,6 +40,14 @@ const AnchorRenderer = (props) => {
         // If we are handling an old dot Expensify link we need to open it with openOldDotLink() so we can navigate to it with the user already logged in.
         // As attachments also use expensify.com we don't want it working the same as links.
         if (internalExpensifyPath && !isAttachment) {
+            // If the path has the parameter reportID then treat this as an internal new expensify link where the path is r/{reportID}
+            const reportID = new URLSearchParams(internalExpensifyPath.split("?")[1]).get("reportID");
+            if (reportID) {
+                const internalNewExpensifyPath = "r/"+reportID;
+                Navigation.navigate(internalNewExpensifyPath);
+                return;
+            }
+
             Link.openOldDotLink(internalExpensifyPath);
             return;
         }

Platform

I think this issue effects all platforms

https://user-images.githubusercontent.com/16493223/200906665-b70d826d-ae33-46ac-b017-04c433898410.mp4

s77rt avatar Nov 09 '22 18:11 s77rt

@s77rt Thanks for your proposals.

@s77rt Your proposal is similar to @tienifr's proposal.

sobitneupane avatar Nov 10 '22 09:11 sobitneupane

@s77rt Thanks for your proposals.

@s77rt Your proposal is similar to @tienifr's proposal.

Why you don't review my proposal?

WestDon avatar Nov 10 '22 09:11 WestDon

@WestDon I nearly missed it.

Thanks for your proposal.

But your proposal is not complete.

You have stated

try to get reportID from href,

You didnot propose how to do it.

sobitneupane avatar Nov 10 '22 09:11 sobitneupane

@WestDon I nearly missed it.

Thanks for your proposal.

But your proposal is not complete.

You have stated

try to get reportID from href,

You didnot propose how to do it.

  • Your proposal should include a technical explanation of the changes you will make. You are not required to submit the final solution or code along with your proposal. From Upwork Job Post, I hope missed part belongs to the final solution

WestDon avatar Nov 10 '22 09:11 WestDon