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

Workspace - Incorrect left padding for the button which has a left icon #29967

Closed
6 tasks done
kbecciv opened this issue Oct 19, 2023 · 11 comments
Closed
6 tasks done

Workspace - Incorrect left padding for the button which has a left icon #29967

kbecciv opened this issue Oct 19, 2023 · 11 comments
Assignees

Comments

@kbecciv
Copy link

kbecciv commented Oct 19, 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!


Version Number: 1.3.87.0
Reproducible in staging?: y
Reproducible in production?: n
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
Expensify/Expensify Issue URL:
Issue reported by: Pujan92
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1697713080450809

Action Performed:

  1. Open any screen which has a large button with left icon
  2. Go to workspaces -> select any workspace -> Cards
  3. Observe the left icon alignment for the button "Connect bank account"

Expected Result:

Left icon should not be much closer to the left border

Actual Result:

Left icon is closer to the left border

Workaround:

Unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Android: Native

Screenshot_1697713163

Android: mWeb Chrome

Screenshot_1697717911

iOS: Native

Simulator Screen Shot - iPhone 14 Pro Max - 2023-10-19 at 16 28 43

iOS: mWeb Safari

Simulator Screen Shot - iPhone 14 Pro Max - 2023-10-19 at 17 45 56

MacOS: Chrome / Safari

Screenshot 2023-10-19 at 16 27 41

MacOS: Desktop

Screenshot 2023-10-19 at 17 41 56

View all open jobs on GitHub

@kbecciv kbecciv added the DeployBlockerCash This issue or pull request should block deployment label Oct 19, 2023
@kbecciv kbecciv changed the title Bank Account - Incorrect left padding for the button which has a left icon Workspace - Incorrect left padding for the button which has a left icon Oct 19, 2023
@yh-0218
Copy link
Contributor

yh-0218 commented Oct 19, 2023

Proposal

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

Incorrect left padding for the button which has a left icon

What is the root cause of that problem?

We don’t have any additional left padding for left-icon of button.

<View style={[styles.mr1, ...this.props.iconStyles]}>

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

We can add additional left padding

<View style={[styles.mr1, this.props.large && styles.ml2, ...this.props.iconStyles]}>

<View style={[styles.mr1, ...this.props.iconStyles]}>

What alternative solutions did you explore? (Optional)

@OSBotify
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open StagingDeployCash deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@melvin-bot
Copy link

melvin-bot bot commented Oct 19, 2023

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

@ginsuma
Copy link
Contributor

ginsuma commented Oct 19, 2023

Proposal

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

Incorrect left padding for the button which has a left icon

What is the root cause of that problem?

This is a regression from #29787. It changes the paddingLeft of the large button to 10.

Screen Shot 2023-10-19 at 7 54 22 PM

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

We should add a condition to set paddingLeft is 10 if the button doesn't have an icon to fix #29759, and 18 if yes.

buttonLarge: (hasIcon: Boolean) => ({
    borderRadius: variables.buttonBorderRadius,
    minHeight: variables.componentSizeLarge,
    paddingTop: 8,
    paddingRight: 10,
    paddingBottom: 8,
    paddingLeft: hasIcon ? 18 : 10,
    backgroundColor: theme.buttonDefaultBG,
}),

Change this LOC:

this.props.large ? styles.buttonLarge : undefined,

To:

this.props.large ? styles.buttonLarge(Boolean(this.props.icon)) : undefined,

@narefyev91
Copy link
Contributor

@yh-0218 go ahead and create a PR - let's resolve this quick

@ginsuma
Copy link
Contributor

ginsuma commented Oct 19, 2023

@narefyev91, @yh-0218's solution won't fix #29759. That is the issue #29787 tried to fix.
I'm sorry. I didn't test his solution carefully.

@amyevans
Copy link
Contributor

The blocker is stemming from #29759 so I'll assign the original authors/reviewers

@yh-0218
Copy link
Contributor

yh-0218 commented Oct 19, 2023

Hi, @narefyev91 PR is ready for review. Please check.

@cristipaval
Copy link
Contributor

Thanks for triaging this @amyevans!

@cristipaval cristipaval removed the DeployBlockerCash This issue or pull request should block deployment label Oct 19, 2023
@cristipaval
Copy link
Contributor

Removed the DeployBlockerCash label as this is a minor visual bug.

@amyevans amyevans added Weekly KSv2 and removed Hourly KSv2 labels Oct 20, 2023
@cristipaval
Copy link
Contributor

Given that the fix for this is production and it was a regression and no payment is due, I'm going to close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants