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 2024-05-02] [$250] Missing translation appears under "Notify me about new messages". #39677

Closed
1 of 6 tasks
m-natarajan opened this issue Apr 5, 2024 · 31 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

@m-natarajan
Copy link

m-natarajan commented Apr 5, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number:
Reproducible in staging?: needs reproduction
Reproducible in production?: needs reproduction
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: @AndrewGable
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1712255475405659

Action Performed:

  1. Open app
  2. Go to public room https://staging.new.expensify.com/a/3037571
  3. Click on any public user name

Expected Result:

Some notification preference should appear under "Notify me about new messages"

Actual Result:

missing translation appears

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

Add any screenshot/video evidence

Google Chrome 2024-04-04 at 12 30 28

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01631dee60788c6c7d
  • Upwork Job ID: 1777700680984256512
  • Last Price Increase: 2024-04-16
  • Automatic offers:
    • ishpaul777 | Reviewer | 0
    • bernhardoj | Contributor | 0
@m-natarajan m-natarajan added Daily KSv2 Needs Reproduction Reproducible steps needed Bug Something is broken. Auto assigns a BugZero manager. labels Apr 5, 2024
Copy link

melvin-bot bot commented Apr 5, 2024

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

@MelvinBot
Copy link

This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989

@bernhardoj
Copy link
Contributor

Proposal

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

MISSING TRANSLATION for notify me about new message setting.

What is the root cause of that problem?

When we open a profile page of user without prior chat, notificationPreference will be undefined. Because undefined !== CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN, the notification preference setting is shown with no translation found. MISSING TRANSLATION is only shown in prod or staging.

const shouldShowNotificationPreference = !isEmptyObject(report) && !isCurrentUser && report.notificationPreference !== CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN;
const notificationPreference = shouldShowNotificationPreference
? translate(`notificationPreferencesPage.notificationPreferences.${report.notificationPreference}` as TranslationPaths)
: '';

We already have a condition to check whether the report object is empty or not. When we open the profile page without prior chat, it will get the report object with report ID of 0.

report: {
key: ({route, session, reports}) => {
const accountID = Number(route.params?.accountID ?? 0);
const reportID = ReportUtils.getChatByParticipants([accountID], reports)?.reportID ?? '';
if ((Boolean(session) && Number(session?.accountID) === accountID) || SessionActions.isAnonymousUser() || !reportID) {
return `${ONYXKEYS.COLLECTION.REPORT}0`;
}
return `${ONYXKEYS.COLLECTION.REPORT}${reportID}`;
},

In a normal case, it would return an empty object. But if you ever do an OpenReport request with a reportID of 0, then the report will contain error data telling that the report doesn't exist. One way to do OpenReport with a reportID of 0 is by clicking the unexpected money request skeleton preview. (this is a temporary issue)
image

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

We can use ReportUtils.isValidReportIDFromPath that will ignore reportID of 0 in Report.openReport, but I think we should ultimately check whether notificationPreference is undefined or not to show the notification preference setting.

const shouldShowNotificationPreference = !isEmptyObject(report) && !isCurrentUser && !!report.notificationPreference && report.notificationPreference !== CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN;

Copy link

melvin-bot bot commented Apr 8, 2024

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

@sonialiap sonialiap added External Added to denote the issue can be worked on by a contributor and removed Needs Reproduction Reproducible steps needed labels Apr 9, 2024
Copy link

melvin-bot bot commented Apr 9, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01631dee60788c6c7d

@melvin-bot melvin-bot bot changed the title Missing translation appears under "Notify me about new messages". [$250] Missing translation appears under "Notify me about new messages". Apr 9, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 9, 2024
@sonialiap
Copy link
Contributor

Moving to External

Copy link

melvin-bot bot commented Apr 9, 2024

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

@melvin-bot melvin-bot bot removed the Overdue label Apr 9, 2024
@sonialiap
Copy link
Contributor

@ishpaul777 what do you think of the above proposal?

@ishpaul777
Copy link
Contributor

reviewing in few hours 🙇

@melvin-bot melvin-bot bot removed the Overdue label Apr 11, 2024
@ishpaul777
Copy link
Contributor

I am not able to reproduce the issue, it seems the report here is null which dont show the notification preference option at all, @bernhardoj Can you please help me with steps to repro if it is still reproducable for you

Screen.Recording.2024-04-15.at.12.15.46.AM.mov

@bernhardoj
Copy link
Contributor

bernhardoj commented Apr 15, 2024

I explained that here you need a way to request an OpenReport with a reportID of 0 and one of the way is to click the skeleton money request preview but I don't know exactly how to always reproduce the skeleton issue,
image

so the other way (and easy) is:

  1. Open https://staging.new.expensify.com/r/0/transaction/123/receipt (0 is the reportID)
  2. Open the profile page https://staging.new.expensify.com/a/3037571

It will now crash btw.

Also, we should check for reportID before showing the private notes.

{!isEmptyObject(report) && !isCurrentUser && (
<MenuItem
title={`${translate('privateNotes.title')}`}

Copy link

melvin-bot bot commented Apr 16, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added the Overdue label Apr 16, 2024
@mvtglobally
Copy link

Issue not reproducible during KI retests. (First week)

Copy link

melvin-bot bot commented Apr 18, 2024

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

@ishpaul777
Copy link
Contributor

ishpaul777 commented Apr 19, 2024

we should ultimately check whether notificationPreference is undefined or not to show the notification preference setting.
Also, we should check for reportID before showing the private notes.

Agree 💯

Proposal from @bernhardoj looks good to me.

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Apr 19, 2024

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

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 19, 2024
Copy link

melvin-bot bot commented Apr 19, 2024

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

Offer link
Upwork job

Copy link

melvin-bot bot commented Apr 19, 2024

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

Offer link
Upwork job
Please accept the offer 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 📖

Copy link

melvin-bot bot commented Apr 19, 2024

@sonialiap @bernhardoj @aldo-expensify @ishpaul777 this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Apr 20, 2024
@bernhardoj
Copy link
Contributor

PR is ready

cc: @ishpaul777

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Apr 25, 2024
@melvin-bot melvin-bot bot changed the title [$250] Missing translation appears under "Notify me about new messages". [HOLD for payment 2024-05-02] [$250] Missing translation appears under "Notify me about new messages". Apr 25, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Apr 25, 2024
Copy link

melvin-bot bot commented Apr 25, 2024

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

Copy link

melvin-bot bot commented Apr 25, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.65-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 2024-05-02. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Apr 25, 2024

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:

  • [@ishpaul777] The PR that introduced the bug has been identified. Link to the PR:
  • [@ishpaul777] 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:
  • [@ishpaul777] 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:
  • [@ishpaul777] Determine if we should create a regression test for this bug.
  • [@ishpaul777] 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.
  • [@sonialiap] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels May 1, 2024
@sonialiap
Copy link
Contributor

@bernhardoj $250 - paid ✔️
@ishpaul777 $250 - paid ✔️

@sonialiap
Copy link
Contributor

@ishpaul777 please complete the checklist

@ishpaul777
Copy link
Contributor

ishpaul777 commented May 6, 2024

@melvin-bot melvin-bot bot removed the Overdue label May 6, 2024
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
No open projects
Archived in project
Development

No branches or pull requests

8 participants