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

[HOLD for payment 2023-07-10] [$1000] Different sections opened clicking on empty space in thread header #21215

Closed
2 of 6 tasks
kavimuru opened this issue Jun 21, 2023 · 33 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@kavimuru
Copy link

kavimuru commented Jun 21, 2023

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. Open an existing chat
  2. Send message
  3. Reply with a thread
  4. Open the threaded chat
  5. Click on 'From user name' link
  6. Verify that user is navigated to the main chat
  7. Open the threaded chat again
  8. Click on the blank space next to the thread header name
  9. Obsereve that the details sidebar is opened
  10. Close the sidebar & click on a blank space next to 'From user name' link

Expected Result:

Details sidebar should be opened counting all the blank parts of the header as part of the header to avoid confusion. And clicking only the link should navigate user to main chat

Actual Result:

User is navigate back to main chat

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.2.30-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
image (1)

2023-06-15.10.56.35.mp4
Recording.1046.mp4

Expensify/Expensify Issue URL:
Issue reported by: @Natnael-Guchima
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1686816426119499

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01e25a8a95ef65423b
  • Upwork Job ID: 1672116435942555648
  • Last Price Increase: 2023-06-23
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 21, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 21, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 21, 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

@Nikhil-Vats
Copy link
Contributor

Nikhil-Vats commented Jun 21, 2023

Proposal

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

Different sections open when user clicks on empty space in thread header. When space next to parent chat is clicked, it opens the parent chat and not chat details.

What is the root cause of that problem?

Subtitle expands to full width here because of flex: 1 which is set on its parent.

<View style={[styles.flex1, styles.flexColumn]}>
<DisplayNames
fullTitle={title}
displayNamesWithTooltips={displayNamesWithTooltips}
tooltipEnabled
numberOfLines={1}
textStyles={[styles.headerText, styles.pre]}
shouldUseFullTitle={isChatRoom || isPolicyExpenseChat || isThread || isTaskReport}
/>
{(isChatRoom || isPolicyExpenseChat || isThread) && !_.isEmpty(subtitle) && (
<>
{isThread ? (
<PressableWithoutFeedback
onPress={() => {
Navigation.navigate(ROUTES.getReportRoute(props.report.parentReportID));
}}
accessibilityLabel={subtitle}
accessibilityRole="link"
>

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

If we just remove styles.flex1 or only flex-grow: 1 then parent chat won't be truncated on phone.
If we add styles.alignSelfStart on View or PressableWithoutFeedback then also parent chat won't be truncated on phone.

See video
Screen.Recording.2023-06-23.at.3.44.46.PM.mov

We need to add new property in sizing.js for max-width either set to max-content or fit-content and then pass this style in PressableWithoutFeedback like -
Add new style prop to -

<PressableWithoutFeedback
    ...
    style={[styles.mwFitContent]}

We can use fit-content since it calculates the value based on available space like -

fit-content uses max-content, unless available < max-content, then it uses available. Unless available < min-content, then it uses min-content.

What alternative solutions did you explore? (Optional)

NA

Result -

Screen.Recording.2023-06-23.at.3.46.01.PM.mov

@Pujan92
Copy link
Contributor

Pujan92 commented Jun 21, 2023

Proposal

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

Different sections opened clicking on empty space in thread header

What is the root cause of that problem?

By default the align-items is stretch which will makes the subtitle to takes full available width and that is the reason for the issue.

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

Pass style prop here for PressableWithoutFeedback with style={styles.alignSelfStart} which will restrict the stretching and takes only required width. To avoid the overflow when the text is longer we need to also provide styles.mw100.

<PressableWithoutFeedback
onPress={() => {
Navigation.navigate(ROUTES.getReportRoute(props.report.parentReportID));
}}
accessibilityLabel={subtitle}
accessibilityRole="link"
>

@sophiepintoraetz
Copy link
Contributor

Will look into this tomorrow - overrun with some other chores.

@sophiepintoraetz
Copy link
Contributor

sophiepintoraetz commented Jun 23, 2023

I can replicate - I think this may have come from PR #20484 (cc @chiragsalian)

2023-06-23_17-32-09 (1)

@sophiepintoraetz sophiepintoraetz added the External Added to denote the issue can be worked on by a contributor label Jun 23, 2023
@melvin-bot melvin-bot bot changed the title Different sections opened clicking on empty space in thread header [$1000] Different sections opened clicking on empty space in thread header Jun 23, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 23, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01e25a8a95ef65423b

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

melvin-bot bot commented Jun 23, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 23, 2023

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

@sophiepintoraetz
Copy link
Contributor

@mananjadhav - we've got a couple of proposals, are you able to review them, please? 🙏

@mananjadhav
Copy link
Collaborator

Thanks for the proposals folks. I was checking if max-content/fit-content will work on all platforms. Basic testing shows it did. I think @Nikhil-Vats's proposal looks good. The alignSelfStart won't work as it overflows the content when the text is longer. We would end up adding more fixes, if max-content works then it would be a simple fix.

🎀 👀 🎀 C+ Reviewed.

@melvin-bot
Copy link

melvin-bot bot commented Jun 27, 2023

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

@Pujan92
Copy link
Contributor

Pujan92 commented Jun 27, 2023

@mananjadhav fit-content or max-content I think will not work in the native. I updated my proposal to overcome the overflow issue with simple change. Ref article https://stackoverflow.com/a/45335695/4834907

Simulator Screen Shot - iPhone 14 - 2023-06-27 at 22 28 34

@mananjadhav
Copy link
Collaborator

That's weird, I just checked this on iOS by adding the style and hardcoded text. I'll check once again.

@mananjadhav
Copy link
Collaborator

mananjadhav commented Jun 27, 2023

Okay for some reason I am unable to reproduce the above error consistently (probably some issue with my iOS build taking cached version). I was able to reproduce the max-content error once. Hence, it won't work.

@MariaHCD Apologies for the confusion, but using @Pujan92's updated proposal makes sense.

image image

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 28, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 28, 2023

📣 @Pujan92 You have been assigned to this job by @sophiepintoraetz!
Please apply to this job in Upwork and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@Pujan92
Copy link
Contributor

Pujan92 commented Jun 28, 2023

@mananjadhav @MariaHCD PR is ready for review!

@melvin-bot
Copy link

melvin-bot bot commented Jun 29, 2023

🎯 ⚡️ Woah @mananjadhav / @Pujan92, great job pushing this forwards! ⚡️

The pull request got merged within 3 working days of assignment, so this job is eligible for a 50% #urgency bonus 🎉

  • when @Pujan92 got assigned: 2023-06-28 05:40:08 Z
  • when the PR got merged: 2023-06-29 10:08:15 UTC

On to the next one 🚀

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Jul 3, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Different sections opened clicking on empty space in thread header [HOLD for payment 2023-07-10] [$1000] Different sections opened clicking on empty space in thread header Jul 3, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 3, 2023

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 3, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 3, 2023

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

If no regressions arise, payment will be issued on 2023-07-10. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Jul 3, 2023

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:

  • [@mananjadhav] The PR that introduced the bug has been identified. Link to the PR:
  • [@mananjadhav] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@mananjadhav] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@mananjadhav] Determine if we should create a regression test for this bug.
  • [@mananjadhav] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@sophiepintoraetz] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@sophiepintoraetz
Copy link
Contributor

@mananjadhav - if you can complete the checklist, that would be great!

@mananjadhav
Copy link
Collaborator

@sophiepintoraetz thanks for the bump, I'll finish this over the weekend.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jul 9, 2023
@mananjadhav
Copy link
Collaborator

mananjadhav commented Jul 10, 2023

The offending PR is #20484. I've posted the comment in the PR. I think the issue occurred because we copy pasted the Text content, which didn't have the click behavior earlier.

I don't see any action needed here. I also don't think we need a regression test here as it's not something that would change often. @MariaHCD wdyt?

@sophiepintoraetz
Copy link
Contributor

Thanks @mananjadhav - I agree if it was lack of attention to detail, there's no update needed here. Thanks for posting the FYI - contracts are out!

@Pujan92
Copy link
Contributor

Pujan92 commented Jul 11, 2023

@sophiepintoraetz payment is yet to be received for the contract. Can you plz check once? Thanks!

@sophiepintoraetz
Copy link
Contributor

@Pujan92 - some patience would be good here - payments are manually processed so I have to wait until you accept the offer in order to pay you - and there are other pieces of work I am doing!

@Pujan92
Copy link
Contributor

Pujan92 commented Jul 11, 2023

I actually accepted the offer earlier. Usually, GH issue gets closed after the payment so thought of putting a message here. Sorry but didn't mean to rush here for payment.

@mananjadhav
Copy link
Collaborator

@sophiepintoraetz I've requested the payout via NewDot.

Thanks for the patience here @Pujan92. Have you accepted the offer and paid out now?

@sophiepintoraetz
Copy link
Contributor

Yep, he should have been paid! And yes - I realise that change has just gone live, Anu should be taking care of that.

@mananjadhav
Copy link
Collaborator

Yes thats right. Thanks for your help here.

@Pujan92
Copy link
Contributor

Pujan92 commented Jul 12, 2023

Yes, I got paid. Thanks!

@anmurali
Copy link

Paid Manan after confirming here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

7 participants