Blocks of `quoted` text render incorrectly on mobile
See original GitHub issueIf 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:
Issue Analytics
- State:
- Created 3 years ago
- Comments:18 (14 by maintainers)
Top Results From Across the Web
Code blocks are rendered with inconsistent font sizes on mobile
I thought it was something to do with the <pre> block not inheriting the font-size from .doc pre , but <pre> blocks with...
Read more >css - Center blockquote on page but keep text left-aligned and ...
I created a simple page with Bootstrap and would like to have my blockquotes (including the left quotation mark added with ...
Read more >Table is rendering incorrectly on mobile - Klaviyo Community
One solution that comes to mind would be disabling the mobile optimization setting and using a header block using the link only options....
Read more >The Difference Between Blockquotes and Pull Quotes | Blog
A blockquote is used in online writing to differentiate a section of quoted text from the text around it. When used correctly, it...
Read more >Text blocks – Quotes: Mobile view - WordPress.org
The first time I inspected your code I saw that your blockquotes has a ridiculously wide left and right padding for mobile, e.g.,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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.