App icon indicating copy to clipboard operation
App copied to clipboard

[HOLD for payment 2021-12-13] URL link is mangled up with the rest of the text

Open sketchydroide opened this issue 5 years ago • 60 comments

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Wrote Chronos 10am update on desktop
  2. Added GH links to the update
  3. submitted
  4. opened conversation on mobile iOS
  5. Links are on top of the other text

Expected Result:

The links should take their own space

Actual Result:

Link is on top of the normal text

Workaround:

N/A

Platform:

Where is this issue occurring?

  • iOS
  • Android (not sure, I haven't checked)

Version Number: V1.0.86-4 Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: Any additional supporting documentation IMG_3582 Expensify/Expensify Issue URL:

View all open jobs on GitHub

sketchydroide avatar Aug 30 '21 15:08 sketchydroide

Triggered auto assignment to @michaelhaxhiu (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

MelvinBot avatar Aug 30 '21 15:08 MelvinBot

@mallenexpensify I have searched titles with various naming conventions, but can't find another GH that looks like this one. Before I push this through, I'd love a buddy check from you 🙏 . Have you come across this before? I feel like I've seen it once before but can't tell if I'm crazy or not.

michaelhaxhiu avatar Sep 01 '21 20:09 michaelhaxhiu

This happened when I added a url to my 10ams

sketchydroide avatar Sep 01 '21 21:09 sketchydroide

@michaelhaxhiu yup! Saw for the first time last night or this morn. iOS v1.0.90-4 image I'll move it along since you're likely already off Hax

mallenexpensify avatar Sep 01 '21 23:09 mallenexpensify

Triggered auto assignment to @johnmlee101 (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

MelvinBot avatar Sep 01 '21 23:09 MelvinBot

@sketchydroide sorry for the confusion, I agree this is a real problem (I reproduced it myself 😄) but was trying to make sure it wasn't a duplicate. We are all set, thanks Matt!

michaelhaxhiu avatar Sep 02 '21 14:09 michaelhaxhiu

@johnmlee101 Huh... This is 4 days overdue. Who can take care of this?

MelvinBot avatar Sep 07 '21 19:09 MelvinBot

Oh! I think everything above looks good and should be good to toss this out for external contributions. I believe its contained to just long links if I'm not mistaken?

johnmlee101 avatar Sep 07 '21 21:09 johnmlee101

Triggered auto assignment to @arielgreen (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

MelvinBot avatar Sep 07 '21 21:09 MelvinBot

Posted to Upwork here: ~https://www.upwork.com/jobs/~0113b0cbb1016c18de~ https://www.upwork.com/jobs/~01b36da7505c041642

arielgreen avatar Sep 07 '21 23:09 arielgreen

I am able to fix this by commenting out the lineHeight css in baseFontStyle https://github.com/Expensify/App/blob/1f332a6ca3bac8fa3b747a0348a9af40c8a60cfa/src/styles/styles.js#L2133 not sure why. We could do that unless we have any reason to hardcode to 20 and not use the default lineHeight.

A little more context: the problem is with rendering the html which we are doing with RenderHTMLSource. This is also affected by TRenderEngineProvider and RenderHTMLConfigProvider https://github.com/Expensify/App/blob/f658da2826244c006d0d06243ea40e5e5abd0897/src/components/HTMLEngineProvider/BaseHTMLEngineProvider.js#L237-L254. I tried commenting out different props and trying to isolate the problem, and commenting out the lineHeight in baseStyle was when it started working.

Proposal

Remove lineHeight styling from baseFontStyle. https://github.com/Expensify/App/blob/1f332a6ca3bac8fa3b747a0348a9af40c8a60cfa/src/styles/styles.js#L2133

meetmangukiya avatar Sep 08 '21 05:09 meetmangukiya

I'm curious @meetmangukiya do you know why commenting that out fixes the issue? Is there another way for us to make sure word wrapping with urls works well?

johnmlee101 avatar Sep 08 '21 16:09 johnmlee101

There is more to it. Basically, BoxModel of RenderHTMLEngine is not compatible with this design so it is a technical limitation. #4733 is also caused by the same issue. I am trying to find a solution to it.

parasharrajat avatar Sep 09 '21 13:09 parasharrajat

That makes sense. Where are we with that fix so far?

johnmlee101 avatar Sep 09 '21 14:09 johnmlee101

I have started to debug the internal rendering for the lib. It looks complex but I will try to find a solution to it.

parasharrajat avatar Sep 09 '21 15:09 parasharrajat

Okay amazing. I'm going to put this issue on HOLD for the time being while we confirm these issues are interlinked and your fix will address this one (when you're done getting to the cause)

johnmlee101 avatar Sep 09 '21 15:09 johnmlee101

On hold, not overdue.

arielgreen avatar Sep 17 '21 19:09 arielgreen

As per research, rendering Views in Text has many issues thus react-native-render-html has also pointed this in its documentation.

  1. Due to the recent change to URLs to show a different context menu #3931 , we have to use PressableWithSecondaryInteraction which created a block inside the normal flow.

  2. It's hard to find a solution and the lib maintainer has also pointed out this to me. I will look into other ways to fix it now.

parasharrajat avatar Sep 18 '21 22:09 parasharrajat

Still on hold, not overdue.

arielgreen avatar Sep 27 '21 17:09 arielgreen

IMO this issue is severe/annoying enough that we should take it off hold.

roryabraham avatar Oct 04 '21 17:10 roryabraham