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-10-12] [$500] The font for unread messages is not bolded in Android #25967

Closed
1 of 6 tasks
kavimuru opened this issue Aug 25, 2023 · 70 comments
Closed
1 of 6 tasks
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 Needs Reproduction Reproducible steps needed

Comments

@kavimuru
Copy link

kavimuru commented Aug 25, 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. Open reports sidebar
  2. Observe any report that has unread message

Expected Result:

The font should be bolded

Actual Result:

The font is not bolded

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:
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
Notes/Photos/Videos: Any additional supporting documentation

WhatsApp.Video.2023-08-24.at.13.39.36.1.mp4

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

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~014cfdb7c2eb889c72
  • Upwork Job ID: 1699723695123820544
  • Last Price Increase: 2023-09-21
  • Automatic offers:
    • krishna2323 | Reporter | 26624529
@kavimuru kavimuru added Daily KSv2 Needs Reproduction Reproducible steps needed Bug Something is broken. Auto assigns a BugZero manager. labels Aug 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 25, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 25, 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

@kavimuru
Copy link
Author

Proposal by @Krishna2323

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

The font for unread messages is not bolded in Android

What is the root cause of that problem?

React native has a bug in which fonts are not bolded on android until we add a bold fontFamily file. We are using the right bold fontFamily file & font weight variable in HeaderView, thats why it's bolded in android correctly.

App/src/styles/styles.js

Lines 820 to 825 in 00efce4

headerText: {
color: themeColors.heading,
fontFamily: fontFamily.EXP_NEUE_BOLD,
fontSize: variables.fontSizeNormal,
fontWeight: fontWeightBold,
},

But not in the DisplayNames in OptionRowLNH.
const textUnreadStyle = optionItem.isUnread ? [textStyle, styles.sidebarLinkTextBold] : [textStyle];
const displayNameStyle = StyleUtils.combineStyles([styles.optionDisplayName, styles.optionDisplayNameCompact, styles.pre, ...textUnreadStyle], props.style);

Style:

App/src/styles/styles.js

Lines 1467 to 1472 in 00efce4

optionDisplayName: {
fontFamily: fontFamily.EXP_NEUE,
height: variables.alternateTextHeight,
lineHeight: variables.lineHeightXLarge,
...whiteSpace.noWrap,
},

App/src/styles/styles.js

Lines 1445 to 1448 in 00efce4

sidebarLinkActive: {
backgroundColor: themeColors.border,
textDecorationLine: 'none',
},

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

We need to change fontFamily & fontWeight according to the unread status and use it just like it is used in HeaderView. File below also confirms the root cause.
https://github.com/Expensify/App/blob/main/src/styles/fontWeight/bold/index.android.js

@Krishna2323
Copy link
Contributor

The font is set to 700 but it needs to use the fontWeightBold variable, like it is in HeaderView style.

App/src/styles/styles.js

Lines 1450 to 1453 in 00efce4

sidebarLinkTextBold: {
fontWeight: '700',
color: themeColors.heading,
},

@melvin-bot melvin-bot bot added the Overdue label Aug 28, 2023
@Krishna2323
Copy link
Contributor

Krishna2323 commented Aug 28, 2023

@melvin-bot
Copy link

melvin-bot bot commented Aug 29, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 31, 2023

@laurenreidexpensify Eep! 4 days overdue now. Issues have feelings too...

@melvin-bot
Copy link

melvin-bot bot commented Sep 4, 2023

@laurenreidexpensify Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!

@laurenreidexpensify
Copy link
Contributor

@Expensify/design curious for your take on this one

@melvin-bot melvin-bot bot removed the Overdue label Sep 4, 2023
@shawnborton
Copy link
Contributor

That does seem like a bug and even beyond that, it looks like not only is the font not bold, but a totally incorrect font is being applied. Notice how the number "6" changes shape when it goes from unread to read? So yeah, this is definitely a bug but I would say this is most likely a regression as this would have been working fine at some point. Cc @grgia who implemented the fonts here.

If this is a regression (which I think it must be), then let's track it down and have the offending PR author fix it.

@Krishna2323
Copy link
Contributor

@shawnborton, it doesn't seems like a regression, the style for sidebarLinkTextUnread was added on Aug 12, 2020 and it was updated to fontWeight: "700" on Dec 12, 2020. We might have forgot to update fontWeight here. And it does happen only on few android devices.

commit aug 12
commit dec 12

@shawnborton
Copy link
Contributor

Hmm I feel like we have touched the sidebar stuff way more recently than 2020. Either way, let's get this fixed but curious for @grgia's take too.

Do we know why only a few Android devices experience this?

@Krishna2323
Copy link
Contributor

@shawnborton, I already mentioned the root cause in my proposal, we need to set the bold font family & font weight variable to unread text styles. The font weight variable changes from '700' to '600' in android. The wrong font family that you were mentioning is also caused by using '700' directly. Pls check the comments in code below:

// Android has ExpensifyNeue-Bold, but fontWeight: '700' will result in
// an incorrect font displaying on Android
export default '600';

@shawnborton
Copy link
Contributor

Sounds good, @laurenreidexpensify can we get this issue into motion?

The Android thing seems like a bit of a hack. We should be using font-weight 700 as it maps to Expensify Neue Bold.

@melvin-bot melvin-bot bot added the Overdue label Sep 6, 2023
@laurenreidexpensify laurenreidexpensify added the External Added to denote the issue can be worked on by a contributor label Sep 7, 2023
@melvin-bot melvin-bot bot changed the title The font for unread messages is not bolded in Android [$500] The font for unread messages is not bolded in Android Sep 7, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 7, 2023

Job added to Upwork: https://www.upwork.com/jobs/~014cfdb7c2eb889c72

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

melvin-bot bot commented Sep 7, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 7, 2023

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

@laurenreidexpensify
Copy link
Contributor

Thanks for the review @shawnborton - @grgia am assigning you in case you want to take this for now / add any additional details

@melvin-bot melvin-bot bot removed the Overdue label Sep 7, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 3, 2023

Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:

  • when @Krishna2323 got assigned: 2023-09-12 06:02:46 Z
  • when the PR got merged: 2023-10-03 12:55:11 UTC
  • days elapsed: 15

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 Weekly KSv2 labels Oct 5, 2023
@melvin-bot melvin-bot bot changed the title [$500] The font for unread messages is not bolded in Android [HOLD for payment 2023-10-12] [$500] The font for unread messages is not bolded in Android Oct 5, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 5, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 5, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 5, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.77-7 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-10-12. 🎊

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

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

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 Oct 5, 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:

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

@Krishna2323
Copy link
Contributor

The PR received C+ (@allroundexperts) approval within three working days and was subsequently merged without any further changes being requested, except for a delay caused by the engineer. Therefore, I believe it still qualifies for the urgency bonus.

Cc: @grgia @laurenreidexpensify

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Oct 11, 2023
@laurenreidexpensify
Copy link
Contributor

laurenreidexpensify commented Oct 13, 2023

Payment Summary:

  • External issue reporter - @Krishna2323 - $250 paid in Upwork
  • Contributor that fixed the issue - @Krishna2323 - $1000 + $500 urgency bonus - paid in Upwork
  • Contributor+ that helped on the issue and/or PR - @allroundexperts - $1000 + $500 bonus - please request in Newdot

@allroundexperts please complete checklist above thanks

@Krishna2323
Copy link
Contributor

@laurenreidexpensify, I'm really sorry but I forgot to mention that this issue was created on 26th of August.

@Krishna2323
Copy link
Contributor

Issue fixed on Realme 11pro+ and OnePlus 10 pro 🎉 :

WhatsApp.Video.2023-10-16.at.00.20.11.mp4

@laurenreidexpensify
Copy link
Contributor

@Krishna2323 updated 👍

@Krishna2323
Copy link
Contributor

@laurenreidexpensify, thanks a lot 🙌

@melvin-bot melvin-bot bot added the Overdue label Oct 18, 2023
@laurenreidexpensify
Copy link
Contributor

waiting on @allroundexperts for checklist!

@melvin-bot melvin-bot bot removed the Overdue label Oct 18, 2023
@allroundexperts
Copy link
Contributor

I think a checklist is not needed here. This bug was very device specific and is hard to reproduce.

@allroundexperts
Copy link
Contributor

@laurenreidexpensify Although this issue was created before Aug 30, but it got external only on Sep 6. I think for this case we should honour the new rates (ie 500$). Would be good to confirm this internally as well!

@Krishna2323
Copy link
Contributor

@allroundexperts, I think it was mentioned in slack that issues reported on GitHub before Aug 30 will have older rates.

@allroundexperts
Copy link
Contributor

@Krishna2323 Best to confirm 😄

@melvin-bot melvin-bot bot added the Overdue label Oct 23, 2023
@laurenreidexpensify
Copy link
Contributor

@allroundexperts thanks for the update. I think in this instance we're honouring the issue creation date, so the payments stand. Thanks for checking tho. I am closing as we have no further action here now.

@JmillsExpensify
Copy link

$1,500 payment approved for @allroundexperts based on summary above.

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 Needs Reproduction Reproducible steps needed
Projects
None yet
Development

No branches or pull requests

9 participants