Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Hold for payment 2021-08-17] Code blocks renders to the end of the edge of the window #4377

Closed
isagoico opened this issue Aug 2, 2021 · 19 comments · Fixed by #4399
Closed
Assignees
Labels
Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@isagoico
Copy link

isagoico commented Aug 2, 2021

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. Navigate to a conversation
  2. Send this message (with code markdown ` )
  3. Hello
  4. Send this other message
  5. Hello stop right there

Expected Result:

Code should be rendered only to the size of the text inside it. It should look something like the message sent in step 5.

Actual Result:

Code block extends to the edge of the window when sent individually.

Workaround:

N/A visual issue.

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

Version Number: 1.0.82-0

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

image

Expensify/Expensify Issue URL:

View all open jobs on Upwork


From @alex-mechler https://expensify.slack.com/archives/C01GTK53T8Q/p1627931956075500

When rendering a code fenced message on a line with no plain text, the code fence renders to the end of the line. If there is any plain text on the line this does not happen. Occurring on desktop

@MelvinBot
Copy link

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

@mountiny
Copy link
Contributor

mountiny commented Aug 2, 2021

Reproduced it on main, I believe this can be worked on by External contributor!

@mountiny mountiny added the External Added to denote the issue can be worked on by a contributor label Aug 2, 2021
@MelvinBot
Copy link

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

@parasharrajat
Copy link
Member

parasharrajat commented Aug 2, 2021

Ok. I think this is caused by a recent upgrade to react-native-render-html. This has also affected the inline links. @isagoico can confirm this. send a link and click on the far right on the web. Link should not open but it does. Notice the mouse position and the following image, it opens the link.
Screenshot 2021-08-03 01:50:39

Proposal

Relatively fix is minor. We have to add alignSelf: 'flex-start' to the baseFontStyle to fix this.

baseFontStyle: {

I tested it, works well and it does not break Native devices. Everything seems to work great. It also fixes the links. I will make sure via testing the everything is working as it should after this change.

@mountiny
Copy link
Contributor

mountiny commented Aug 2, 2021

Sounds good if you can make sure to test it in all possible scenarios (so it just does not introduce regression somewhere else).

Does this fix both: link and the code?

@parasharrajat
Copy link
Member

Yes, it fixes both.

@parasharrajat
Copy link
Member

@mountiny can I submit the PR? I believe it's kind of urgent it breaks many things. If so, @JmillsExpensify could this be assigned to exported and assigned to me?
Thanks.

@mountiny mountiny added External Added to denote the issue can be worked on by a contributor and removed External Added to denote the issue can be worked on by a contributor labels Aug 3, 2021
@MelvinBot
Copy link

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

@mountiny
Copy link
Contributor

mountiny commented Aug 3, 2021

@parasharrajat Yeah, sorry, good point, go for it. Jason was out of office recently I see.

Nicole will create a job posting for this tomorrow (as it is after working hours for her today I believe).

@mountiny mountiny self-assigned this Aug 3, 2021
@parasharrajat parasharrajat mentioned this issue Aug 3, 2021
5 tasks
@parasharrajat
Copy link
Member

Hey, @NicMendonca Any update on the posting for this? Thanks.

@mountiny
Copy link
Contributor

mountiny commented Aug 6, 2021

@parasharrajat Apologies for the delays, we are now having very busy days.

@mountiny
Copy link
Contributor

mountiny commented Aug 6, 2021

@Expensify/contributor-management Can anyone who has a bit of free time handle the Upwork job posting for this issue, please? 😊 🙏 We had couple days of delay here already. Thank you very much!

@arielgreen
Copy link
Contributor

Gotchu. Creating it now.

@arielgreen arielgreen assigned arielgreen and unassigned NicMendonca Aug 6, 2021
@michaelhaxhiu
Copy link
Contributor

Ariel smoked me in volunteering first, with the 2 min reply! Tag me in if I can help too.

@arielgreen
Copy link
Contributor

@parasharrajat , I just sent you an offer.

@arielgreen arielgreen reopened this Aug 6, 2021
@arielgreen arielgreen changed the title Code blocks renders to the end of the edge of the window [Hold for payment 2021-08-10] Code blocks renders to the end of the edge of the window Aug 6, 2021
@arielgreen arielgreen added Weekly KSv2 and removed Daily KSv2 labels Aug 6, 2021
@mountiny
Copy link
Contributor

mountiny commented Aug 6, 2021

Thank you very much for such a quick action! :one-team: 💪

@parasharrajat
Copy link
Member

parasharrajat commented Aug 6, 2021

Anyways, there is a regression which I will shortly. Thanks for the quick response.

@arielgreen
Copy link
Contributor

Fix (#4503) was merged Aug 10, updating pay-by date.

@arielgreen arielgreen changed the title [Hold for payment 2021-08-10] Code blocks renders to the end of the edge of the window [Hold for payment 2021-08-17] Code blocks renders to the end of the edge of the window Aug 13, 2021
@arielgreen
Copy link
Contributor

Paid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants