Skip to content

[HOLD for Payment 8-14-2023][$2000] Text is not centered in codeblock on android app #18913

Closed

Description

@kavimuru

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
  2. Open any report
  3. send 3 backtick codeblock, to observe it clearly, send 3 backtick message with numbers on new line like shown in video
  4. Observe that text inside codeblock is not centered

Expected Result:

App should center the text in codeblocks

Actual Result:

Codeblock text is not centered on android app

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.13.3
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

text.not.centered.in.codeblock.android.app.mp4

Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1684053742783289

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~018c9148c105260d97
  • Upwork Job ID: 1659251229090435072
  • Last Price Increase: 2023-06-07

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on May 14, 2023
  2. melvin-bot commented on May 14, 2023

    @melvin-bot

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

  3. melvin-bot commented on May 14, 2023

    @melvin-bot

    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
  4. bernhardoj commented on May 15, 2023

    @bernhardoj
    Contributor

    Proposal

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

    A multiline text inside code block is not centered in android.

    What is the root cause of that problem?

    This is a bug in React Native Text component (not reproducible in native Android). It is noticeable on code block because it's the only markdown that allow multiline with background color. In Android, when we have a new line, the text width will be different with the one that don't have a newline. Below is the image comparison:
    image

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

    I don't found any existing issue reported in RN repo. In the meantime, we can align the text to the center by adding textAlign center to the pre style.

    App/src/styles/styles.js

    Lines 106 to 115 in 83d9ac3

    pre: {
    ...baseCodeTagStyles,
    paddingTop: 12,
    paddingBottom: 12,
    paddingRight: 8,
    paddingLeft: 8,
    fontFamily: fontFamily.MONOSPACE,
    marginTop: 0,
    marginBottom: 0,
    },

    This will align the text to center but the width is still bigger than the text width no newline.

    What alternative solutions did you explore? (Optional)

    Fix the upstream issue. I have open the PR here

  5. adelekennedy commented on May 17, 2023

    @adelekennedy
    Contributor

    asked clarifying question in Slack

  6. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on May 18, 2023
  7. changed the title [-] Text is not centered in codeblock on android app[/-] [+][$1000] Text is not centered in codeblock on android app[/+] on May 18, 2023
  8. melvin-bot commented on May 18, 2023

    @melvin-bot
  9. melvin-bot commented on May 18, 2023

    @melvin-bot

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

  10. melvin-bot commented on May 18, 2023

    @melvin-bot

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

  11. 124 remaining items

  12. Christinadobrzyn commented on Aug 7, 2023

    @Christinadobrzyn
    Contributor

    Do we need a regression test?

  13. s77rt commented on Aug 7, 2023

    @s77rt
    Member

    @Christinadobrzyn Looks accurate!

    Given this bug was upstream we won't need a regression test.

  14. removed their assignment
    on Aug 7, 2023
  15. MonilBhavsar commented on Aug 10, 2023

    @MonilBhavsar
    Contributor

    Bumping to weekly, as it is on hold till 14/8

  16. Christinadobrzyn commented on Aug 18, 2023

    @Christinadobrzyn
    Contributor

    Sorry - late to pay this - paying now based on - #18913 (comment)

    @s77rt and @bernhardoj are you both paid in Upwork?

    Issue Reporter: $250 @dhanashree-sawant - Paid in Upwork
    Contributor: $2000 @bernhardoj - Paid in Upwork
    Contributor+: $2000 @s77rt Paid in Upwork

  17. s77rt commented on Aug 19, 2023

    @s77rt
    Member

    @Christinadobrzyn Yes. Thank you!

  18. MonilBhavsar commented on Aug 21, 2023

    @MonilBhavsar
    Contributor

    Issuing payments here

  19. Christinadobrzyn commented on Aug 21, 2023

    @Christinadobrzyn
    Contributor

    Awesome! Everyone has been paid through Upwork - Upwork job is closed - closing this GH.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions