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] [$2000] single backtick message selection has some extra padding at the top #15078

Closed
1 of 2 tasks
kavimuru opened this issue Feb 11, 2023 · 45 comments
Closed
1 of 2 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Monthly KSv2

Comments

@kavimuru
Copy link

kavimuru commented Feb 11, 2023

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:

  1. Navigate to any chat
  2. Send text message wrapped in single backtick, e.g. Hello world
  3. Long press the message
  4. Observe the selected message

Expected Result:

The selected area should have the same padding from the top and the bottom from the border

Actual Result:

top has some extra margin than bottom space

Workaround:

unknown

Platforms:

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

  • Android / native
  • iOS / native

Version Number: 1.2.69-2
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:

Screen_Recording_20230209_111746_New.Expensify.mp4

web

ios

Expensify/Expensify Issue URL:
Issue reported by: @jayeshmangwani
Slack conversation:
https://expensify.slack.com/archives/C049HHMV9SM/p1675802761130049
View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~015c356c51bf928ca6
  • Upwork Job ID: 1626148972311486464
  • Last Price Increase: 2023-02-23
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Feb 11, 2023
@melvin-bot melvin-bot bot locked and limited conversation to collaborators Feb 11, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

MelvinBot commented Feb 11, 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

@sophiepintoraetz
Copy link
Contributor

Came in over the weekend, will look into this tomorow.

@melvin-bot melvin-bot bot added the Overdue label Feb 15, 2023
@sophiepintoraetz
Copy link
Contributor

Android
image

iOS
image

@MelvinBot
Copy link

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

@sophiepintoraetz
Copy link
Contributor

Seems similar to #15195

@danieldoglas
Copy link
Contributor

Thanks @sophiepintoraetz . This one can be external, so adding the label.

@danieldoglas danieldoglas added the External Added to denote the issue can be worked on by a contributor label Feb 16, 2023
@melvin-bot melvin-bot bot unlocked this conversation Feb 16, 2023
@melvin-bot melvin-bot bot changed the title single backtick message selection has some extra padding at the top [$1000] single backtick message selection has some extra padding at the top Feb 16, 2023
@MelvinBot
Copy link

Job added to Upwork: https://www.upwork.com/jobs/~015c356c51bf928ca6

@MelvinBot
Copy link

Current assignee @sophiepintoraetz 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 - @0xmiroslav (External)

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

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

@melvin-bot melvin-bot bot added the Overdue label Feb 20, 2023
@bernhardoj
Copy link
Contributor

Proposal

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

There is an extra space above code text and it's noticeable when we highlight it.

What is the root cause of that problem?

On native, we are using WrappedText component to render code block. Inside of it, we wrap the text with 2 views.

const InlineCodeBlock = (props) => {
const TDefaultRenderer = props.TDefaultRenderer;
return (
<TDefaultRenderer
// eslint-disable-next-line react/jsx-props-no-spreading
{...props.defaultRendererProps}
>
<WrappedText
textStyles={[props.textStyle]}
wordStyles={[
props.boxModelStyle,
styles.codeWordStyle,
]}
>
{props.defaultRendererProps.tnode.data}
</WrappedText>
</TDefaultRenderer>
);
};

// Outer View is important to vertically center the Text
<View
// eslint-disable-next-line react/no-array-index-key
key={`${colText}-${colIndex}`}
style={styles.codeWordWrapper}
>
<View
style={[
props.wordStyles,
colIndex === 0 && styles.codeFirstWordStyle,
colIndex === rowText.length - 1 && styles.codeLastWordStyle,
]}
>
<Text style={props.textStyles}>{colText}</Text>
</View>
</View>

The outer view height is 20, while the inner view is 18 with top value is 4 (on iOS, the inner view height is 16). The height difference and the addition of the top is the culprit of this issue.

image

I think the reason we are doing that is to align the code block text well with other text. Here is the comparison.

With top Without top
330826 330827

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

To solve this, we can apply a bottom padding to InlineCodeBlock (native). 4 for iOS, 6 for Android. We need to apply different value because iOS codeWordStyle height is 16 while Android is 18. Or we can set both height to 18, so both padding will be 6.

@danieldoglas danieldoglas added Weekly KSv2 and removed Daily KSv2 labels Feb 20, 2023
@melvin-bot melvin-bot bot removed the Overdue label Feb 20, 2023
@allroundexperts

This comment was marked as off-topic.

@melvin-bot melvin-bot bot removed the Overdue label Mar 16, 2023
@melvin-bot melvin-bot bot added the Overdue label Mar 27, 2023
@sophiepintoraetz
Copy link
Contributor

Still holding on #4733

@sophiepintoraetz
Copy link
Contributor

Bumped the CME for that issue. Still holding.

@melvin-bot melvin-bot bot removed the Overdue label Apr 5, 2023
@sophiepintoraetz
Copy link
Contributor

CME is back from holiday

@sophiepintoraetz
Copy link
Contributor

Still holding.

2 similar comments
@sophiepintoraetz
Copy link
Contributor

Still holding.

@sophiepintoraetz
Copy link
Contributor

Still holding.

@sophiepintoraetz sophiepintoraetz added Monthly KSv2 and removed Weekly KSv2 labels May 3, 2023
@sophiepintoraetz
Copy link
Contributor

Still holding

@danieldoglas
Copy link
Contributor

Following the new guidelines for external issues, removing myself from this until we have approved proposals.

@danieldoglas danieldoglas removed their assignment Jun 16, 2023
@erikagail-binag

This comment was marked as off-topic.

@melvin-bot

This comment was marked as off-topic.

@melvin-bot melvin-bot bot added the Overdue label Jul 17, 2023
@sophiepintoraetz
Copy link
Contributor

Still holding.

@melvin-bot melvin-bot bot removed the Overdue label Jul 18, 2023
@melvin-bot melvin-bot bot added the Overdue label Aug 21, 2023
@sophiepintoraetz
Copy link
Contributor

OG issue is in review!

@melvin-bot melvin-bot bot removed the Overdue label Aug 22, 2023
@melvin-bot melvin-bot bot added the Overdue label Sep 22, 2023
@sophiepintoraetz
Copy link
Contributor

Original linked issue has been closed to work on a more holistic solution - so will likely fold this issue into that one and pay out the reporting bonus here.

@melvin-bot melvin-bot bot removed the Overdue label Sep 23, 2023
@sophiepintoraetz
Copy link
Contributor

Thought on this, and this does not seem to be something we will fix for the mean time. If this does get resolved, we can reference this issue for the original reporter. But going to close for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Monthly KSv2
Projects
None yet
Development

No branches or pull requests

9 participants