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-18][$1000] Dev - Console warning on pressing any mentioned user from conversation #21506

Closed
2 of 6 tasks
kbecciv opened this issue Jun 24, 2023 · 37 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 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@kbecciv
Copy link

kbecciv commented Jun 24, 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!


Action Performed:

  1. Login to ND
  2. Go to any conversation
  3. Type a text, mention any user in that text and send it (open console)
  4. Click on that particular mentioned in the chat
  5. Notice on clicking mentioned it throws warning

Expected Result:

No console warning should appear

Actual Result:

Console warning appears

Workaround:

Unknown

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: v1.3.29-0
Reproducible in staging?: n/a
Reproducible in production?: n/a
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
Screenshot 2023-06-19 at 2 53 17 PM

Expensify/Expensify Issue URL:
Issue reported by: @dhairyasenjaliya
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1687166767791559

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~010aec32706776696c
  • Upwork Job ID: 1673995397535133696
  • Last Price Increase: 2023-06-28
@kbecciv kbecciv added Daily KSv2 Needs Reproduction Reproducible steps needed Bug Something is broken. Auto assigns a BugZero manager. labels Jun 24, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 24, 2023

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

@melvin-bot
Copy link

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

@kbecciv
Copy link
Author

kbecciv commented Jun 24, 2023

Proposal

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

  • Dev - Console warning on pressing any mentioned user from conversation

What is the root cause of that problem?

  • The root cause is we recently started using <TextLink> component for MentionUserRenderer.js instead of just <Text> so here the problem is we are not passing accessibilityLabel which required props that is the cause of the error as this should be mandatory as focusable is always true that required accessibilityLabel currently we are not passing or not even passing accessible to false that makes to throw warning on console

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

  • We need to add accessibilityLabel in order to remove the error log this is mandatory because by default focusable is true so we do need to provide accessibilityLabel
  • We need to define new accessibilityHints for the mentioned user which will be passed to accessibilityLabel message in both languages
  • If we don’t need accessibilityLabel inside MentionUserRenderer.js then we can just pass accessible to false this will also remove the error

Optional changes

@StevenKKC
Copy link
Contributor

Proposal

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

Console warning on pressing any mentioned user from conversation.

What is the root cause of that problem?

User details is displayed in DetailsPage component, and DetailsPage contains PressableWithoutFocus.

<PressableWithoutFocus
style={styles.noOutline}
onPress={show}

And PressableWithoutFocus has style props with array type.

style: PropTypes.arrayOf(PropTypes.object),

But style prop that is passed to PressableWithoutFocus is not array type, so the console warning is displayed.

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

We can change style prop to array type.

   <PressableWithoutFocus
      style={[styles.noOutline]}
      onPress={show}
   >

What alternative solutions did you explore? (Optional)

None.

@melvin-bot
Copy link

melvin-bot bot commented Jun 26, 2023

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

@bfitzexpensify
Copy link
Contributor

Hey @cristipaval - I can't test on dev, can you confirm this is reproducible? Thanks!

@cristipaval
Copy link
Contributor

I can't reproduce with the latest dev.

@bfitzexpensify
Copy link
Contributor

@dhairyasenjaliya can you still reproduce this?

@dhairyasenjaliya
Copy link
Contributor

I can repro reliably on the latest main @cristipaval @bfitzexpensify
Screenshot 2023-06-27 at 3 03 43 PM

@bfitzexpensify
Copy link
Contributor

Thanks @dhairyasenjaliya - @cristipaval, mind trying again?

@cristipaval
Copy link
Contributor

cristipaval commented Jun 28, 2023

alright, I could reproduce. Updated the reproducible steps to make them clear.

@cristipaval cristipaval added Engineering External Added to denote the issue can be worked on by a contributor and removed Needs Reproduction Reproducible steps needed Engineering labels Jun 28, 2023
@melvin-bot melvin-bot bot changed the title Dev - Console warning on pressing any mentioned user from conversation [$1000] Dev - Console warning on pressing any mentioned user from conversation Jun 28, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 28, 2023

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

@melvin-bot melvin-bot bot added 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

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 28, 2023

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

@hugolgst
Copy link

hugolgst commented Jun 28, 2023

Proposal

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

Console warnings appear when clicking a user mentioned in the chat:

  1. Warning: Failed prop type: Invalid prop 'style' of type 'object' supplied to 'PressableWithoutFocus', expected an array.
  2. Warning: Failed prop type: Provide a valid string for accessibilityLabel prop when accessible is true

What is the root cause of that problem?

  1. The type of the styling element forwarded to PressableWithoutFocus is wrong.

    style={styles.noOutline}

  2. The accessibilityLabel property is missing for the button thus making it hard to identify the nature of the button for the visually impaired.

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

  1. Wrap the forwarded styling in an array, as it is already done in other elements, e.g.

    style={[styles.containerWithSpaceBetween]}

  2. Add the accessibilityLabel property with text explaining what the button linked to the user profile picture is doing (enlarging the picture)

What alternative solutions did you explore? (Optional)

I did not explore other solutions.

Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

@melvin-bot
Copy link

melvin-bot bot commented Jun 28, 2023

📣 @hugolgst! 📣
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.
Please follow these steps:

  1. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  2. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  3. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@melvin-bot melvin-bot bot added the Overdue label Jul 3, 2023
@cristipaval
Copy link
Contributor

@mollfpr do you have some time to review the proposal or you want to wait a bit longer for other proposals?

@melvin-bot melvin-bot bot removed the Overdue label Jul 3, 2023
@mollfpr
Copy link
Contributor

mollfpr commented Jul 3, 2023

Thanks for the ping @cristipaval

I'm reviewing the proposal now.

@mollfpr
Copy link
Contributor

mollfpr commented Jul 3, 2023

@cristipaval @dhairyasenjaliya I was only able to reproduce the style error.

@dhairyasenjaliya
Copy link
Contributor

Hm on latest pull i can repro style error only

@mollfpr
Copy link
Contributor

mollfpr commented Jul 5, 2023

@cristipaval I can't reproduce the accessibility error, but we still can fix the style error with @dhairyasenjaliya proposal.

Should we proceed?

@cristipaval
Copy link
Contributor

@cristipaval I can't reproduce the accessibility error, but we still can fix the style error with @dhairyasenjaliya proposal.

Should we proceed?

I guess @Beamanator fixed it already. Yes, let's proceed with the style error.

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

melvin-bot bot commented Jul 5, 2023

📣 @mollfpr 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Upwork job

@melvin-bot
Copy link

melvin-bot bot commented Jul 5, 2023

📣 @dhairyasenjaliya You have been assigned to this job!
Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs!
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot
Copy link

melvin-bot bot commented Jul 5, 2023

📣 @dhairyasenjaliya We're missing your Upwork ID to automatically send you an offer for the Reporter role.
Once you apply to the Upwork job, your Upwork ID will be stored and you will be automatically hired for future jobs!

@melvin-bot melvin-bot bot added the Reviewing Has a PR in review label Jul 5, 2023
@dhairyasenjaliya
Copy link
Contributor

@mollfpr @cristipaval PR ready for review

@melvin-bot
Copy link

melvin-bot bot commented Jul 12, 2023

@cristipaval, @mollfpr, @bfitzexpensify, @dhairyasenjaliya Whoops! This issue is 2 days overdue. Let's get this updated quick!

@cristipaval
Copy link
Contributor

@bfitzexpensify I don't know why this wasn't automatically updated. The PR was deployed into production 2 days ago. We'll have to do the payments in 5 days.

@cristipaval cristipaval added Weekly KSv2 and removed Reviewing Has a PR in review Daily KSv2 labels Jul 13, 2023
@cristipaval cristipaval changed the title [$1000] Dev - Console warning on pressing any mentioned user from conversation [HOLD for payment 2023-07-18][$1000] Dev - Console warning on pressing any mentioned user from conversation Jul 13, 2023
@bfitzexpensify
Copy link
Contributor

Thanks for catching that @cristipaval

@cristipaval cristipaval added the Awaiting Payment Auto-added when associated PR is deployed to production label Jul 13, 2023
@mollfpr
Copy link
Contributor

mollfpr commented Jul 18, 2023

[@mollfpr] The PR that introduced the bug has been identified. Link to the PR:
[@mollfpr] 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:

I'm unable to track which PR that causing the console error; it's between the migration on PressableWithoutFocus #20202 or the changes on the TouchableWithoutFocus to PressableWithoutFocus in #8483

[@mollfpr] 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:

The console.error can be caught on the PR review. This issue might arise when migrating the generic component and the test is not happening in all the pages, but we have a checklist to check that.

If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)

[@mollfpr] Determine if we should create a regression test for this bug.
[@mollfpr] 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.

The error is only shown in DEV, so no regression test is needed. The reviewer checklist already covers this.

@mollfpr
Copy link
Contributor

mollfpr commented Jul 18, 2023

Melvin did not calculate the date...

@dhairyasenjaliya Got assigned on Jul 5

Screenshot 2023-07-18 at 14 07 36

And the PR merged on Jul 6
Screenshot 2023-07-18 at 14 07 47

So merged PR within 1.042 days 🚀

@bfitzexpensify bfitzexpensify added Daily KSv2 and removed Weekly KSv2 labels Jul 19, 2023
@bfitzexpensify
Copy link
Contributor

Cool, all payments issued here, BZ checklist complete, so we're all done - thanks for the solid work!

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 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

7 participants