[HOLD for payment 2021-12-13] URL link is mangled up with the rest of the text
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:
- Wrote Chronos 10am update on desktop
- Added GH links to the update
- submitted
- opened conversation on mobile iOS
- 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
Expensify/Expensify Issue URL:
Triggered auto assignment to @michaelhaxhiu (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.
@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.
This happened when I added a url to my 10ams
@michaelhaxhiu yup! Saw for the first time last night or this morn. iOS v1.0.90-4
I'll move it along since you're likely already off Hax
Triggered auto assignment to @johnmlee101 (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.
@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!
@johnmlee101 Huh... This is 4 days overdue. Who can take care of this?
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?
Triggered auto assignment to @arielgreen (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.
Posted to Upwork here: ~https://www.upwork.com/jobs/~0113b0cbb1016c18de~ https://www.upwork.com/jobs/~01b36da7505c041642
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
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?
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.
That makes sense. Where are we with that fix so far?
I have started to debug the internal rendering for the lib. It looks complex but I will try to find a solution to it.
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)
On hold, not overdue.
As per research, rendering Views in Text has many issues thus react-native-render-html has also pointed this in its documentation.
-
Due to the recent change to URLs to show a different context menu #3931 , we have to use
PressableWithSecondaryInteractionwhich created a block inside the normal flow. -
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.
Still on hold, not overdue.
IMO this issue is severe/annoying enough that we should take it off hold.