question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Blocks of `quoted` text render incorrectly on mobile

See original GitHub issue

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):

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

  1. 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:

101217023-6e804a00-3635-11eb-9bb9-2e37a0eeccbb

102281699-4c22f080-3f94-11eb-878b-345b9d978e46

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:18 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
parasharrajatcommented, Apr 7, 2021

@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:

  1. Text is rendered as a block box but we want inline text.
  2. In Another way, we can get the inline text but border and 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.

  1. we create one wrapper component which divides the text into tokens(words) divided based on word break. This component put the text tokens inline into a view and renders it.
  2. We can then pass styles selectively to tokens and manage the border-radius for the first and last tokens.
1reaction
parasharrajatcommented, Apr 28, 2021
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found