App: Blocks of `quoted` text render incorrectly on mobile
If you haven’t already, check out our contributing guidelines for onboarding!
View the job on Upwork here.
Platform - version:
iOS and Android, build 263
Action Performed (reproducible steps):
- Type a sentence with code block formatting (single ticks) in the middle, like this:
This is a test to see how code renders in the middle
of a sentence on mobile.
- Notice that it renders strangely by either breaking the line or overflowing.
Expected Result:
It should render the same way it does here on GitHub.
This is a test to see how code renders in the middle
of a sentence on mobile.
Actual Result:
The line either breaks or overflows where the code formatting starts/ends
Notes/Photos/Videos:
We’ve seen multiple results from this bug. Here are some examples:
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 18 (14 by maintainers)
@sketchydroide I think this issue is hanging around for a long time. So I tried few techniques that could let us achieve the desired UI. I would like to work on this.
Problem
We(Including other contributors from the comments above) tried using a combination of
Text
&View
tag to achieve the above UI but there are a couple of issues as follows:border-radius
are not being rendered.Solution
I had an idea of tokenizing the text. Then apply the style selectively. This is working well. I have made a small snap here.
border-radius
for the first and last tokens.@mallenexpensify but PR is awaiting merge https://github.com/Expensify/Expensify.cash/pull/2527.
@parasharrajat I think that might work, would be happy to see a PR using this
I think for iOS we are expect the text to be on the same line as the rest of the text. It’s wrapping well, and going to the next line correctly, but it also should be on the same line of the rest of the text, not on a new line. Web looks good
Does that make sense @aliabbasmalik8
@sketchydroide assigning to you to review incoming proposals because you were picked via auto-assigner for the issue in the Expensify repo
@laurenreidexpensify upwork account - Eduard Rubin