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 2023-03-13] [$1000] No spacing/margins above and below a Codeblock #15299

Closed
kavimuru opened this issue Feb 20, 2023 · 46 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@kavimuru
Copy link

kavimuru commented Feb 20, 2023

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. Open a chat
  2. Send one message - a normal word/sentence, then space and send a codeblock. Then space and send another normal word/sentence.

Expected Result:

There should be space between the normal messages and codeblock.

Actual Result:

There's no spacing around the codeblock.

However, we want an 8 px margin above and below a codeblock.

Workaround:

unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • [ x] Android / native
  • [ x] Android / Chrome
  • [x ] iOS / native
  • [x ] iOS / Safari
  • [x ] MacOS / Chrome / Safari
  • [ x] MacOS / Desktop

Version Number: 1.2.74-0
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:
image (1)
Untitled 1png

Expensify/Expensify Issue URL:
Issue reported by: @cead22
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1676670453605579

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~018d44cb79f9fd71df
  • Upwork Job ID: 1630342851487846400
  • Last Price Increase: 2023-02-27
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Feb 20, 2023
@MelvinBot
Copy link

Triggered auto assignment to @jliexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot melvin-bot bot locked and limited conversation to collaborators Feb 20, 2023
@MelvinBot
Copy link

MelvinBot commented Feb 20, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@jliexpensify jliexpensify changed the title Spacing around Codeblock message has less margin No spacing around Codeblock Feb 21, 2023
@jliexpensify jliexpensify changed the title No spacing around Codeblock No spacing/margins above and below a Codeblock Feb 21, 2023
@jliexpensify
Copy link
Contributor

@jliexpensify
Copy link
Contributor

jliexpensify commented Feb 21, 2023

Slack comment here from Bondy saying it's not related to his PR. Back to the drawing board!

@jliexpensify
Copy link
Contributor

Alright, I've identified a previous issue and PR (Slack comment). Asking about the next steps in-thread.

@jliexpensify
Copy link
Contributor

@jliexpensify
Copy link
Contributor

Alright, this is not a regression. Moving to External!

@jliexpensify jliexpensify added the External Added to denote the issue can be worked on by a contributor label Feb 27, 2023
@melvin-bot melvin-bot bot unlocked this conversation Feb 27, 2023
@melvin-bot melvin-bot bot changed the title No spacing/margins above and below a Codeblock [$1000] No spacing/margins above and below a Codeblock Feb 27, 2023
@MelvinBot
Copy link

Job added to Upwork: https://www.upwork.com/jobs/~018d44cb79f9fd71df

@MelvinBot
Copy link

Current assignee @jliexpensify is eligible for the External assigner, not assigning anyone new.

@MelvinBot
Copy link

Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak (External)

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 27, 2023
@MelvinBot
Copy link

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

@daraksha-dk
Copy link
Contributor

Proposal

Please re-state the problem that we are trying to solve in this issue.

No spacing/margins above and below a Codeblock

What is the root cause of that problem?

We aren't not defining any margin for the codeblock message which is resulting in this problem.

What changes do you think we should make in order to solve the problem?

We can fix this by setting marginTop & marginBottom to some value like 8px here

What alternative solutions did you explore? (Optional)

@MelvinBot
Copy link

📣 @daraksha-dk! 📣

Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  2. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  3. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.

Screen Shot 2022-11-16 at 4 42 54 PM

Format:

Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@allroundexperts
Copy link
Contributor

Proposal

Please re-state the problem that we are trying to solve in this issue.

Missing spacing above and below the code block.

What is the root cause of that problem?

The root cause for this is missing margins for the code block.

What changes do you think we should make in order to solve the problem?

We have to carefully add the margins in order to preserve the tab behaviour. Adding it here will sort of break the tab selection (screen shot attached).
Screenshot 2023-02-28 at 4 33 17 AM

We should add the margins here instead. This will preserve the default tab behaviour that we have right now.

Works well after the fix.

Screenshot 2023-02-28 at 4 35 20 AM

What alternative solutions did you explore? (Optional)

None

@daraksha-dk
Copy link
Contributor

We have to carefully add the margins in order to preserve the tab behaviour. Adding it here will sort of break the tab selection

I believe displaying outlines for messages is itself a bug, and it's not intentional to show them only for codeblocks within a message. There is no reason to use an outline here as those items are not actionable/interactable. However, since this is ultimately an accessibility issue, we are currently putting it on hold until we can address it properly.

For reference:

Production (NewDot)

tab-bug.mp4

Slack's treatment

slack-tab.mp4

@daraksha-dk

This comment was marked as off-topic.

@MelvinBot
Copy link

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@allroundexperts
Copy link
Contributor

We have to carefully add the margins in order to preserve the tab behaviour. Adding it here will sort of break the tab selection

I believe displaying outlines for messages is itself a bug, and it's not intentional to show them only for codeblocks within a message. There is no reason to use an outline here as those items are not actionable/interactable. However, since this is ultimately an accessibility issue, we are currently putting it on hold until we can address it properly.

For reference:

Production (NewDot)

Slack's treatment

Thank you for your deep insight @daraksha-dk!

I think this is needed because on mobile, we're making code blocks pressable.

@mountiny
Copy link
Contributor

Thanks @eVoloshchak for the review

thanks also to @daraksha-dk for the proposal but going with @allroundexperts feel free to raise a PR! Thanks!

@melvin-bot melvin-bot bot added the Reviewing Has a PR in review label Feb 28, 2023
@allroundexperts
Copy link
Contributor

PR created.
#15570

@jliexpensify
Copy link
Contributor

Hired @eVoloshchak and @allroundexperts

@mountiny
Copy link
Contributor

mountiny commented Mar 2, 2023

@jliexpensify merged, this should be available for the bonus if no regression

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Mar 6, 2023
@melvin-bot melvin-bot bot changed the title [$1000] No spacing/margins above and below a Codeblock [HOLD for payment 2023-03-13] [$1000] No spacing/margins above and below a Codeblock Mar 6, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Mar 6, 2023
@MelvinBot
Copy link

Reviewing label has been removed, please complete the "BugZero Checklist".

@MelvinBot
Copy link

MelvinBot commented Mar 6, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.78-0 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-03-13. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@MelvinBot
Copy link

MelvinBot commented Mar 6, 2023

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Mar 12, 2023
@allroundexperts
Copy link
Contributor

allroundexperts commented Mar 13, 2023

Regression Test Proposal

  1. Go to https://staging.new.expensify.com/ and open any chat.
  2. Enter any comment such that the first line is plain text, second line is a code block and third line is plain text again.
  3. Verify that equal amount of margin appears between the lines.
    image

Do we agree 👍 or 👎

@eVoloshchak
Copy link
Contributor

eVoloshchak commented Mar 15, 2023

  • The PR that introduced the bug has been identified. Link to the PR:
    Judjing by this comment this was fixed by Set default lineHeight for webViewStyles(HTML rendered messages) #14360. I've tested that PR, but it still isn't fixed.
    I think that this image contains wrong testing steps. The issue appears if you have a single message that contains both plain text and code. I might be wrong, but on the image code blocks and plain text are on separate messages.
    I've also tested a couple of old commits that change BasePreRenderer, the issue still persisted, so it seems like that's how it was implemented initially.

  • A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: this is a visual bug that could be caught during review, I don't think there are additional checklist items we should add

@jliexpensify
Copy link
Contributor

Sorry, I was at a conference the last 3 days - will look at payments now!

@jliexpensify
Copy link
Contributor

Paid @allroundexperts and @eVoloshchak

@jliexpensify
Copy link
Contributor

I'll get @mountiny to cast his eyes on #15299 (comment) and I'll whip up that GH

@melvin-bot melvin-bot bot added the Overdue label Mar 20, 2023
@mountiny
Copy link
Contributor

@jliexpensify I think that looks good, but I also think we should include a screenshot to the steps if we can to make sure its easier for the tester to confirm it looks correct

@melvin-bot melvin-bot bot removed the Overdue label Mar 20, 2023
@jliexpensify
Copy link
Contributor

@allroundexperts - could you take a look at Vit's feedback and incorporate a screenshot into your Proposal? I'll get that GH sorted after that.

@allroundexperts
Copy link
Contributor

allroundexperts commented Mar 20, 2023

@jliexpensify I'm not sure if I am understanding this correctly. Can you please explain what sort of screenshot you're looking for? TIA!
I see that my proposal does contain a screenshot of how it looks after the fix.

@mountiny
Copy link
Contributor

@allroundexperts sorry, I cannot see any screenshot in the comment
image

Basically any screenshot of how the spacing should look like correctly now would be good.

@allroundexperts
Copy link
Contributor

@mountiny I thought you wanted that in my original issue Proposal 😅 . I've added it to my regression test proposal as well 🙏

@mountiny
Copy link
Contributor

Ahahah, nono, int he regression steps proposal, thank you!

I think this is good to go now @jliexpensify

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

7 participants