Skip to content
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

[$500] Chat-Email id is not shown as link and directed to profile page. #33044

Closed
5 of 6 tasks
izarutskaya opened this issue Dec 14, 2023 · 21 comments
Closed
5 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@izarutskaya
Copy link

izarutskaya commented Dec 14, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 1.4.12
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
Expensify/Expensify Issue URL:
Issue reported by: Applause-Internal Team
Slack conversation: @

Action Performed:

  1. Go to https://staging.new.expensify.com/

  2. Tap fab

  3. Tap start chat

  4. Enter a new contact eg: y@c.com

  5. Select the contact

  6. Tap on the email id displayed in start of page

  7. Note it directs to profile page

  8. Navigate back to LHN

  9. Tap profile icon --- preferences

  10. Toggle on forced offline

  11. Repeat step 2-- step6

Expected Result:

Email id must be shown as link and directed to profile page.

Actual Result:

Tapping on email id, displays it as text and not link. Email id is not shown as link and directed to profile page.

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6312311_1702507076813.display_not_as_link.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~010c805ba2ca605e54
  • Upwork Job ID: 1735232276090773504
  • Last Price Increase: 2023-12-14
Issue OwnerCurrent Issue Owner: @johncschuster
@izarutskaya izarutskaya added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Dec 14, 2023
@melvin-bot melvin-bot bot changed the title Chat-Email id is not shown as link and directed to profile page. [$500] Chat-Email id is not shown as link and directed to profile page. Dec 14, 2023
Copy link

melvin-bot bot commented Dec 14, 2023

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

Copy link

melvin-bot bot commented Dec 14, 2023

Job added to Upwork: https://www.upwork.com/jobs/~010c805ba2ca605e54

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 14, 2023
Copy link

melvin-bot bot commented Dec 14, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

Copy link

melvin-bot bot commented Dec 14, 2023

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

@paultsimura
Copy link
Contributor

paultsimura commented Dec 14, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

For the optimistic account, the ReportWelcomeText shows the email as text, not a link.

What is the root cause of that problem?

The optimistic account's data is not full, therefore showing a Profile page was leading to a broken behavior, so it was decided to render only a non-clickable text in offline mode:

{ReportUtils.isOptimisticPersonalDetail(accountID) ? (
<Text style={[styles.textStrong]}>{displayName}</Text>
) : (
<Text
style={[styles.textStrong]}
onPress={() => Navigation.navigate(ROUTES.PROFILE.getRoute(accountID))}
suppressHighlighting
>
{displayName}
</Text>
)}

However, there is another page – Details page, that should have been used instead of Profile in such cases.

What changes do you think we should make in order to solve the problem?

Instead of showing just text, we should show a clickable UserDetailsTooltip for both optimistic & real accounts.
But in case of an optimistic account, navigate to the Details page instead of the Profile page:

<UserDetailsTooltip accountID={accountID}>
    <Text
        style={[styles.textStrong]}
        onPress={() => Navigation.navigate(ReportUtils.isOptimisticPersonalDetail(accountID) ? ROUTES.DETAILS.getRoute(displayName) : ROUTES.PROFILE.getRoute(accountID))}
        suppressHighlighting
    >
        {displayName}
    </Text>
</UserDetailsTooltip>

Result (both optimistic & full account):

Screen.Recording.2023-12-14.at.10.53.44-compressed.mp4

What alternative solutions did you explore? (Optional)

@situchan
Copy link
Contributor

@paultsimura's proposal looks good to me.
It makes sense to go details page when accountID is optimistic or doesn't exist.
Also aligned with user mention logic here.

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Dec 14, 2023

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

@bernhardoj
Copy link
Contributor

Proposal

Please re-state the problem that we are trying to solve in this issue.

If we start a new chat while offline, we can't open their profile page.

What is the root cause of that problem?

We intentionally disable it if the user is optimistic-created in this PR. The reason we do that is explained in the selected proposal

When we choose a contact which we have not interacted before, we create a temporary option with a random accountID that is generated by generateAccountID function.

But it is an invalid accountID and not present in personalDetails. After openPublicProfilePage API is called, the data returns with accountID is -1.
That makes details empty and not found page displays

But this is different now. BE will always return the accountID we pass and a default avatar so disabling it is not relevant anymore.

What changes do you think we should make in order to solve the problem?

Allow the user to navigate to the profile page even though it's an optimistic personal detail/user.

(we need to enable it on other pages where it's disabled in the PR #23802)

@bernhardoj
Copy link
Contributor

bernhardoj commented Dec 14, 2023

Profile page is the replacement for details page, so I think we shouldn't use details page

(relevant PR #20144)
cc: @puneetlath

@situchan
Copy link
Contributor

@bernhardoj I don't think we should apply your solution.
We should not show user optimistic accountID which will become invalid (kind of another user) when online

Screen.Recording.2023-12-14.at.4.10.07.PM.mov

@situchan
Copy link
Contributor

Also please check this comment in the PR you linked:

However, we aren't removing the DetailsPage yet since it is still needed for mentions.

@bernhardoj
Copy link
Contributor

Yes, it's just temporary and will be removed #20070 (comment)

We should not show user optimistic accountID which will become invalid (kind of another user) when online

I see. It's indeed weird. Maybe we should just keep it disabled.

@tienifr
Copy link
Contributor

tienifr commented Dec 14, 2023

I agree with @bernhardoj that we shouldn't have any further usage of DetailsPage since it's to be removed soon

@situchan I think below is the right pattern to use

Proposal

Please re-state the problem that we are trying to solve in this issue.

Tapping on email id, displays it as text and not link. Email id is not shown as link and directed to profile page.

What is the root cause of that problem?

If personal details is optimistic, we only show the unclickable text here

I think this is not the right pattern since it looks broken, the user doesn't understand why it's not clickable. In these cases we usually allow opening the page normally but will show loading indicator. Try opening a profile page (eg. https://staging.new.expensify.com/a/12694957) by deep link in offline mode, you'll see loading indicator until you come online. When we open a thread that doesn't exist in Onyx yet, in offline mode, it also will show loading indicator

What changes do you think we should make in order to solve the problem?

Allow navigation to profile page if it's optimistic personal details, but in the profile page, show loading indicator to indicate that the user needs to come online to load the data.

Allow navigation to profile page if it's optimistic personal details

We need to fix this in a couple of places

What alternative solutions did you explore? (Optional)

NA

@dangrous
Copy link
Contributor

Yeah I think I'd also prefer not to add links to the details page if it's being removed soon - thank you for the context! @situchan can you take another look at the new proposals? I don't really love having a forever loading state (assuming a user is not returning online anytime soon) but if that matches what happens already with profile pages that might be okay.

@situchan
Copy link
Contributor

I think we can just close. No one proposed right solution

@tienifr
Copy link
Contributor

tienifr commented Dec 15, 2023

@situchan what do you think of my proposal? It will make it consistent with the behavior when the user goes to the profile page directly via deep link (show infinite loader until coming back online) which is also a widely used pattern in the app.

Currently it looks broken which is not great UX.

cc @dangrous

@situchan
Copy link
Contributor

I am not sure it's worth but not against it.
@dangrous what do you think?

@dangrous
Copy link
Contributor

@johncschuster what do you think? I think the loader is the best option here (vs. doing nothing, or redirecting), but would love to hear your thoughts!

@melvin-bot melvin-bot bot added the Overdue label Dec 18, 2023
Copy link

melvin-bot bot commented Dec 19, 2023

@dangrous, @johncschuster, @situchan Whoops! This issue is 2 days overdue. Let's get this updated quick!

Copy link

melvin-bot bot commented Dec 21, 2023

@dangrous, @johncschuster, @situchan Eep! 4 days overdue now. Issues have feelings too...

@dangrous
Copy link
Contributor

@johncschuster is out for the holidays, I think we can close this for now as low priority and if we decide to bring it back at some point we can look at these proposals!

@melvin-bot melvin-bot bot removed the Overdue label Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
None yet
Development

No branches or pull requests

7 participants