You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for Payment 8-14-2023][$2000] Text is not centered in codeblock on android app #18913
send 3 backtick codeblock, to observe it clearly, send 3 backtick message with numbers on new line like shown in video
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
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:
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.
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
Activity
melvin-bot commentedon May 14, 2023
Triggered auto assignment to @adelekennedy (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon May 14, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)bernhardoj commentedon May 15, 2023
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:

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
textAligncenter to theprestyle.App/src/styles/styles.js
Lines 106 to 115 in 83d9ac3
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
adelekennedy commentedon May 17, 2023
asked clarifying question in Slack
[-] Text is not centered in codeblock on android app[/-][+][$1000] Text is not centered in codeblock on android app[/+]melvin-bot commentedon May 18, 2023
Job added to Upwork: https://www.upwork.com/jobs/~018c9148c105260d97
melvin-bot commentedon May 18, 2023
Current assignee @adelekennedy is eligible for the External assigner, not assigning anyone new.
melvin-bot commentedon May 18, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt (
External)124 remaining items
Christinadobrzyn commentedon Aug 7, 2023
Do we need a regression test?
s77rt commentedon Aug 7, 2023
@Christinadobrzyn Looks accurate!
Given this bug was upstream we won't need a regression test.
MonilBhavsar commentedon Aug 10, 2023
Bumping to weekly, as it is on hold till 14/8
Christinadobrzyn commentedon Aug 18, 2023
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
s77rt commentedon Aug 19, 2023
@Christinadobrzyn Yes. Thank you!
MonilBhavsar commentedon Aug 21, 2023
Issuing payments here
Christinadobrzyn commentedon Aug 21, 2023
Awesome! Everyone has been paid through Upwork - Upwork job is closed - closing this GH.