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-09] [$1000] Quoting macOS Download Link with text will result in unexpected behaviour #23672

Closed
1 of 6 tasks
kavimuru opened this issue Jul 26, 2023 · 84 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 Jul 26, 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 the app in Android native app (this issue only occurs in Android native)
  2. Go to any chat
  3. Type a message: > https://new.expensify.com/NewExpensify.dmg test
  4. Send it

Expected Result:

All characters should be visible

Actual Result:

The end characters will not be visible

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.3.46-5
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

https://github.com/Expensify/App/assets/43996225/7330f977-7909-4029-be8c-4e1f14569fe1
Screenshot_20230726-134920_New Expensify

Expensify/Expensify Issue URL:
Issue reported by: @daraksha-dk
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1690296200318199

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01e4f40b6933ecb982
  • Upwork Job ID: 1686407694784102400
  • Last Price Increase: 2023-09-08
  • Automatic offers:
    • abdulrahuman5196 | Reviewer | 26853127
    • pradeepmdk | Contributor | 26853130
    • daraksha-dk | Reporter | 26853132
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 26, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 26, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 26, 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

@sakluger
Copy link
Contributor

Asked a few clarifying questions in the Slack thread

@melvin-bot melvin-bot bot added the Overdue label Jul 31, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 31, 2023

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

@sakluger
Copy link
Contributor

sakluger commented Aug 1, 2023

Confirmed in Slack that this is only happening in the Android app for this specific download link, so it's a pretty specific but that likely won't occur often. But it's possible that it affects other scenarios, so I think we should fix it.

@melvin-bot melvin-bot bot removed the Overdue label Aug 1, 2023
@sakluger sakluger added the External Added to denote the issue can be worked on by a contributor label Aug 1, 2023
@melvin-bot melvin-bot bot changed the title Quoting macOS Download Link with text will result in unexpected behaviour [$1000] Quoting macOS Download Link with text will result in unexpected behaviour Aug 1, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 1, 2023

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

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

melvin-bot bot commented Aug 1, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 1, 2023

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

@melvin-bot melvin-bot bot added the Overdue label Aug 3, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 4, 2023

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

@sakluger
Copy link
Contributor

sakluger commented Aug 5, 2023

Huh, no proposals at all! Let's give it another week and see if we get any proposals at this price.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Aug 5, 2023
@sakluger
Copy link
Contributor

sakluger commented Aug 7, 2023

Still waiting for proposals.

@melvin-bot melvin-bot bot removed the Overdue label Aug 7, 2023
@Krishna2323
Copy link
Contributor

Krishna2323 commented Aug 7, 2023

Proposal

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

Quoting macOS Download Link with text will result in unexpected behaviour

What is the root cause of that problem?

The issue seems specific to android and how react-native-render-html renders html & this is caused by applying flex-start to every View component used in custom renderer.

  1. In Flexbox, the default alignment for alignItems is stretch, which means child items will stretch to fill the container's height. When you specify flex-start, items don't stretch, and they are placed at the start of the container's cross-axis. This might cause text to clip if there's not enough space.
  2. React Native is not free of bugs. It's possible that it has a bug related to alignItems on Android.
  3. Android and iOS render fonts differently. It's possible that on Android, the font metrics cause the text to need slightly more space than its container provides when flex-start is used.
  4. Android might interpret dimensions, margins, paddings, or borders differently than iOS, which could lead to different layouts and consequently the text clipping issue.

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

Solution 1

We can just remove styles.alignItemsStart from here & it will solve the problem. We can check if it has any effect on other elements and safely remove if no side effect found.

const defaultViewProps = {style: [styles.alignItemsStart, styles.userSelectText]};

Solution 2

Sometimes the clipping happens because of the difference between device font and font used in the code and this only happens in android so we can use device default font to solve this.

This solution essentially serves as a patch to handle a specific problem in a controlled manner. It's about ensuring that problematic devices use device default font that doesn't lead to clipping in React Native.

export default function enableAndroidFontFix() {
    if (Platform.OS !== 'android') {
        return;
    }
    const styles = StyleSheet.create({
        androidFontFixFontFamily: {
            fontFamily: fontFamily.SYSTEM,
        },
    });

    const oldRender = Text.render;
    Text.render = function (...args) {
        const origin = oldRender.call(this, ...args);
        return React.cloneElement(origin, {
            style: [styles.androidFontFixFontFamily, origin.props.style],
        });
    };
}

Result:

update_demo_10_aug.mp4

@melvin-bot
Copy link

melvin-bot bot commented Aug 8, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 8, 2023

📣 @alex2bc! 📣
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
Copy link

melvin-bot bot commented Aug 8, 2023

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@Krishna2323
Copy link
Contributor

@sakluger, this issue also occurs on other links and it also occurs without blockquote.

Record_2023-08-09-09-39-48.mp4

@melvin-bot
Copy link

melvin-bot bot commented Aug 9, 2023

@sakluger @abdulrahuman5196 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 removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 25, 2023

📣 @abdulrahuman5196 🎉 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

@melvin-bot
Copy link

melvin-bot bot commented Sep 25, 2023

📣 @pradeepmdk 🎉 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 📖

@melvin-bot
Copy link

melvin-bot bot commented Sep 25, 2023

📣 @daraksha-dk 🎉 An offer has been automatically sent to your Upwork account for the Reporter role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

@grgia
Copy link
Contributor

grgia commented Sep 25, 2023

Thanks you, assigned!

@melvin-bot
Copy link

melvin-bot bot commented Sep 27, 2023

🎯 ⚡️ Woah @abdulrahuman5196 / @pradeepmdk, 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 @pradeepmdk got assigned: 2023-09-25 09:56:40 Z
  • when the PR got merged: 2023-09-27 04:43:51 UTC

On to the next one 🚀

@mvtglobally
Copy link

Issue not reproducible during KI retests. (First week)

@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 2, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Quoting macOS Download Link with text will result in unexpected behaviour [HOLD for payment 2023-10-09] [$1000] Quoting macOS Download Link with text will result in unexpected behaviour Oct 2, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 2, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 2, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 2, 2023

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

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 2, 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:

  • [@abdulrahuman5196] The PR that introduced the bug has been identified. Link to the PR:
  • [@abdulrahuman5196] 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:
  • [@abdulrahuman5196] 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:
  • [@abdulrahuman5196] Determine if we should create a regression test for this bug.
  • [@abdulrahuman5196] 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.
  • [@sakluger] 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 Daily KSv2 labels Oct 9, 2023
@abdulrahuman5196
Copy link
Contributor

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

Not a regression. But its a behavioral miss from start.

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

No. Minor issue which unable to reproduce always. Not beneficial to add a regression test.

@sakluger
Copy link
Contributor

sakluger commented Oct 9, 2023

Thanks! @pradeepmdk and @abdulrahuman5196, you've paid via Upwork (with the efficiency bonus 🚀 ).

@daraksha-dk could you please accept the offer in Upwork so I can complete payment? Thanks!

@daraksha-dk
Copy link
Contributor

@sakluger I've accepted the Upwork offer, but the price is currently set at $50, whereas it should be $250, as this issue was created before the new pay scale was introduced.

@sakluger
Copy link
Contributor

@daraksha-dk Thanks for letting me know! I've completed payment for $250.

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

9 participants