Closed kavimuru closed 1 year ago
Triggered auto assignment to @jliexpensify (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Platforms
in OP are β
)Slack comment here from Bondy saying it's not related to his PR. Back to the drawing board!
Alright, I've identified a previous issue and PR (Slack comment). Asking about the next steps in-thread.
Alright, this is not a regression. Moving to External!
Job added to Upwork: https://www.upwork.com/jobs/~018d44cb79f9fd71df
Current assignee @jliexpensify is eligible for the External assigner, not assigning anyone new.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak (External
)
Triggered auto assignment to @mountiny (External
), see https://stackoverflow.com/c/expensify/questions/7972 for more details.
No spacing/margins above and below a Codeblock
We aren't not defining any margin for the codeblock message which is resulting in this problem.
We can fix this by setting marginTop
& marginBottom
to some value like 8px
here
π£ @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:
Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
Missing spacing above and below the code block.
The root cause for this is missing margins for the code block.
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).
We should add the margins here instead. This will preserve the default tab behaviour that we have right now.
Works well after the fix.
None
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.
Contributor details Your Expensify account email: daraksha.dk001@gmail.com Upwork Profile Link: https://www.upwork.com/freelancers/~01e4a575df78cb91c6
β Contributor details stored successfully. Thank you for contributing to Expensify!
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.
I think this is needed because on mobile, we're making code blocks pressable.
@allroundexperts - I'm unsure if this is what was intended here for platforms other than Mobile. As you can see, we swapped out the "Pressable" component with "TouchableWithoutFeedback" to eliminate the cursor here in this issue. Therefore, it wouldn't be logical to have an outline here.
Let me know your thoughts.
@daraksha-dk That's a good point that you've raised. In my opinion, with the margin applied inside TouchableWithoutFeedback
, the clickable area of the code block will extend beyond its border which would be a visual bug.
the clickable area of the code block will extend beyond its border which would be a visual bug.
Would it be possible for you to demonstrate this here
@daraksha-dk Sure. I've attached a couple of videos. The first one is with margin applied inside the Touchable
component. Notice that if I click outside the border (but with the margin), the whole message does not get highlighted before the menu opening. If we put the margin at top, long pressing above the code block border highlights the whole message properly.
@daraksha-dk Another example on desktop. If you long click the code block, on desktop, the context menu opens up. If you long press on the rest of the message nothing happens. Here's a comparison of both approaches on Desktop:
@allroundexperts - Thank you for sharing these videos! Based on this, it seems like placing the margin at the top of the component rather than inside it will avoid this concern.
@daraksha-dk, @allroundexperts, thank you for the thorough testing
@allroundexperts's proposal looks good to me, we indeed shouldn't break tab selection.
Why are we adding styles to BasePreRenderer
, shouldn't code be rendered by CodeRenderer
?
@daraksha-dk, @allroundexperts, thank you for the thorough testing @allroundexperts's proposal looks good to me, we indeed shouldn't break tab selection. Why are we adding styles to
BasePreRenderer
, shouldn't code be rendered byCodeRenderer
?
@eVoloshchak Thank you for considering my proposal. CodeRenderer
is using the InlineCodeBlock
component which does not expose any style property on the container. It just has the textStyle
property which takes effect somewhere deep. We can also expose a containerStyles
property in BasePreRenderer
and add it in CodeRenderer
if this works for you.
We can also expose a containerStyles property in BasePreRenderer and add it in CodeRenderer if this works for you.
Let's do that, I think having code styles in CodeRenderer
is better for readability
@allroundexperts proposal looks good to me
πππ C+ reviewed!
cc: @mountiny
π£ @allroundexperts You have been assigned to this job by @mountiny! Please apply to this job in Upwork and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review π§βπ» Keep in mind: Code of Conduct | Contributing π
Thanks @eVoloshchak for the review
thanks also to @daraksha-dk for the proposal but going with @allroundexperts feel free to raise a PR! Thanks!
PR created. https://github.com/Expensify/App/pull/15570
Hired @eVoloshchak and @allroundexperts
@jliexpensify merged, this should be available for the bonus if no regression
Reviewing
label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 1.2.78-0 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2023-03-13. :confetti_ball:
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.
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
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:
Regression Test Proposal
Do we agree π or π
The PR that introduced the bug has been identified. Link to the PR:
Judjing by this comment this was fixed by https://github.com/Expensify/App/pull/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
Sorry, I was at a conference the last 3 days - will look at payments now!
Paid @allroundexperts and @eVoloshchak
I'll get @mountiny to cast his eyes on https://github.com/Expensify/App/issues/15299#issuecomment-1467083970 and I'll whip up that GH
@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
@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.
@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.
@allroundexperts sorry, I cannot see any screenshot in the comment
Basically any screenshot of how the spacing should look like correctly now would be good.
@mountiny I thought you wanted that in my original issue Proposal π . I've added it to my regression test proposal as well π
Ahahah, nono, int he regression steps proposal, thank you!
I think this is good to go now @jliexpensify
If you havenβt already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
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?
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:
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