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-12-29] [Paid] [$500] Web - I accept checkbox is not aligned with errors #27703

Closed
6 tasks
kbecciv opened this issue Sep 18, 2023 · 75 comments
Closed
6 tasks
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@kbecciv
Copy link

kbecciv commented Sep 18, 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. Open the app
  2. Open settings->workspaces->any workspaces-> bank account -> connect manually
  3. Click on Continue
  4. Observe that I accept checkbox is not aligned with errors and red dot on the page

Expected Result:

I accept checkbox should be aligned with errors red dot

Actual Result:

I accept checkbox is not aligned with errors red dot

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.71.4
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: Any additional supporting documentation

image (47)
image (46)

Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1694958144361539

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~015553e32dfe1adcdf
  • Upwork Job ID: 1703830965747298304
  • Last Price Increase: 2023-09-25
  • Automatic offers:
    • mollfpr | Reviewer | 27001512
    • BhuvaneshPatil | Contributor | 27001514
@kbecciv kbecciv added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 18, 2023
@melvin-bot melvin-bot bot changed the title Web - I accept checkbox is not aligned with errors [$500] Web - I accept checkbox is not aligned with errors Sep 18, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 18, 2023

Job added to Upwork: https://www.upwork.com/jobs/~015553e32dfe1adcdf

@melvin-bot
Copy link

melvin-bot bot commented Sep 18, 2023

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

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

melvin-bot bot commented Sep 18, 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

@melvin-bot
Copy link

melvin-bot bot commented Sep 18, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 18, 2023

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

@puneetlath puneetlath removed their assignment Sep 18, 2023
@ZhenjaHorbach
Copy link
Contributor

ZhenjaHorbach commented Sep 18, 2023

Proposal

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

The red dot and the checkout are not centered

What is the root cause of that problem?

Since the red dot is smaller in size than checkbox, so checkbox is not aligned with errors red dot

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

We can create wrapper for red dot which will correspond to the checkout sizes and place the dot in the middle with styles
[{height: 24, width: 24}, styles.alignItemsCenter, styles.justifyContentCenter]

For this dot

{props.isError && (
<Icon
src={Expensicons.DotIndicator}
fill={themeColors.danger}
/>
)}

Screenshot 2023-09-22 at 13 30 14

And if we want to make text as the same level we can also change styles here like

wrapperStyle={[styles.ml2, styles.pr2, styles.w100, styles.flexWrap, styles.flexShrink1]}

wrapperStyle={[styles.ml3, styles.pr2, styles.w100, styles.flexWrap, styles.flexShrink1]}

Screenshot 2023-09-22 at 13 28 12

What alternative solutions did you explore? (Optional)

NA

@BhuvaneshPatil
Copy link
Contributor

BhuvaneshPatil commented Sep 18, 2023

Proposal

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

I accept checkbox is not aligned with errors

What is the root cause of that problem?

we have given padding: 2px style for check box, that padding pushes the checkbox a little to right and that's why we are seeing it on right.

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

In order to solve this issue, we need to apply margin-left of -2px to here -

<PressableWithFeedback
disabled={props.disabled}
onPress={firePressHandlerOnClick}
onMouseDown={props.onMouseDown}
ref={props.forwardedRef}
style={[props.style, styles.checkboxPressable]}
onKeyDown={handleSpaceKey}
accessibilityRole={CONST.ACCESSIBILITY_ROLE.CHECKBOX}
accessibilityState={{checked: props.isChecked}}
accessibilityLabel={props.accessibilityLabel}
pressDimmingValue={1}
>

But as CheckBox component is being used at many places as Stand alone component example -

so We shall not change the styles here above.
We shall use styles prop and pass extra styles.

as we are adding props.styles to CheckBox here.

style={[props.style, styles.checkboxPressable]}

We shall pass the new styles of margin-left: -2px in CheckboxLabel component to CheckBox.

Example - CheckboxLabel

                <Checkbox
                    isChecked={isChecked}
                    onPress={toggleCheckbox}
                    label={props.label}
                    style={[styles.mln2]} // new style added
                    hasError={Boolean(props.errorText)}
                    forwardedRef={props.forwardedRef}
                    accessibilityLabel={props.accessibilityLabel || props.label}
                />

What alternative solutions did you explore? (Optional)

@iamkunal9
Copy link

Screenshot 2023-09-18 at 11 57 20 PM

?

@melvin-bot
Copy link

melvin-bot bot commented Sep 18, 2023

📣 @iamkunal9! 📣
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. Make sure you've read and understood the contributing guidelines.
  2. 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.
  3. 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.
  4. 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>

@iamkunal9
Copy link

Contributor details
Your Expensify account email: kunalsharma0553@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~0160b4a00c99ccd2c9

@melvin-bot
Copy link

melvin-bot bot commented Sep 18, 2023

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

@fabrianibrahim
Copy link

fabrianibrahim commented Sep 19, 2023

Proposal

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

I accept checkbox is not aligned with errors red dot

What is the root cause of that problem?

the label wrapper style has too much margin left ml3

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

change ml3 in the PressableWithFeedback wrapperStyle to ml1

@trjExpensify
Copy link
Contributor

@mollfpr over to you to review!

@mollfpr
Copy link
Contributor

mollfpr commented Sep 19, 2023

Removing the padding: 2 doesn't feel right.

Screenshot 2023-09-19 at 21 51 03

The padding is used to give a space between the checkbox and the outline.

Screenshot 2023-09-19 at 22 01 21

So any proposal that change the padding of the checkbox will have a regression.

@ZhenjaHorbach
Copy link
Contributor

@mollfpr
So In this case, we can add marginLeft: -2 for wrapper to not increase the distance between the checkout and the text and not harm the outline

<View style={[styles.flexRow, styles.alignItemsCenter, styles.breakWord]}>

Screenshot 2023-09-19 at 17 37 45

@alifhaider
Copy link

Proposal

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

Checkbox and Other error texts are not aligned

What is the root cause of that problem?

For now, checkbox text has 12px marginLeft and error checkbox has 8px marginLeft.
And also the checkbox has a width and height of 20px checkbox w/h, 2px focus padding, in total 24px but our <DotIndicator /> icon has 20px of width and height

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

We can decrease the checkbox text to marginLeft: 8px or increase the error text to marginLeft: 12px

And, also we need to add a wrapper view to add padding: 2px to <DotIndicator /> wrapper view,

<Icon
src={Expensicons.DotIndicator}
fill={themeColors.danger}
/>

By this height/width of checkbox and Icon will be same 24px.

Change with

<View style={[styles.errorIconDefault]}> //padding: 2px
                    <Icon
                        src={Expensicons.DotIndicator}
                        fill={themeColors.danger}
                    />
</View>
[Result] Screenshot 2023-09-20 at 12 38 21 AM

What alternative solutions did you explore? (Optional)

Adding padding to the Icon wrapper will make the Icon not aligned with the input field. Icon will have extra 2px padding. Instead we can add 4px of paddingRight to Icon wrapper view.

Or,
We can use ml4 for to add this extra padding as a margin to the next element.

<View style={[styles.flex1, props.isError && styles.ml2]}>

Change ml2 to ml4

[Result] Screenshot 2023-09-20 at 12 45 10 AM

@trjExpensify
Copy link
Contributor

Can we get a sense check from @shawnborton or @dannymcclain on what it should be?

@dannymcclain
Copy link
Contributor

@trjExpensify I'm thinking that this is what it should be, where all input elements are aligned left. The yellow line shows left key line (fancy term for the optical line created by the alignment) and the pink line shows the centerline of the error dots and checkbox. @shawnborton let me know if this is off, but this makes sense to me.

In the original screenshot it looks to me like the only issue is that the checkbox + text are a few pixels too far to the right.

image

@shawnborton
Copy link
Contributor

Yup, agree with Danny here. The red dots also sit slightly inside of a 20x20 bounding box, so there is a bit of negative space between the dot shape and the outer box. The outer box in this case lines up with the key line shown above.

@trjExpensify
Copy link
Contributor

Cool, thanks for confirming ya'll!

@mollfpr
Copy link
Contributor

mollfpr commented Sep 22, 2023

Thanks, @dannymcclain, for the confirmation.

@ZhenjaHorbach @fabrianibrahim Please update it to your proposal so that I can review it easily.

@alifhaider I think we are good with the text gap, and adding new padding for the dot indicator will make the text move further away. Also, from Danny's comment here, the checkbox or other inputs should be sitting exactly on the yellow line, while currently, the checkbox is a few pixels far from the line.

@melvin-bot melvin-bot bot added the Overdue label Oct 30, 2023
@trjExpensify
Copy link
Contributor

Yes please, @mollfpr!

@melvin-bot melvin-bot bot removed the Overdue label Oct 30, 2023
@mollfpr
Copy link
Contributor

mollfpr commented Oct 30, 2023

I'll prepare the PR soon!

@mollfpr
Copy link
Contributor

mollfpr commented Nov 1, 2023

@trjExpensify @deetergp The checklist update is ready #30699

@trjExpensify
Copy link
Contributor

Nice, thanks for getting that up!

@trjExpensify
Copy link
Contributor

@mollfpr let's get that PR checklist update PR done! Then we can close this.

@trjExpensify trjExpensify changed the title [HOLD for payment 2023-10-18] [$500] Web - I accept checkbox is not aligned with errors [Paid] [$500] Web - I accept checkbox is not aligned with errors Nov 22, 2023
@melvin-bot melvin-bot bot added Monthly KSv2 and removed Weekly KSv2 labels Dec 15, 2023
Copy link

melvin-bot bot commented Dec 15, 2023

This issue has not been updated in over 15 days. @deetergp, @trjExpensify, @mollfpr, @BhuvaneshPatil eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@trjExpensify trjExpensify added Weekly KSv2 and removed Monthly KSv2 labels Dec 18, 2023
@trjExpensify
Copy link
Contributor

@mollfpr @0xmiroslav can you finish up getting that PR checklist update merged today?

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Dec 22, 2023
@melvin-bot melvin-bot bot changed the title [Paid] [$500] Web - I accept checkbox is not aligned with errors [HOLD for payment 2023-12-29] [Paid] [$500] Web - I accept checkbox is not aligned with errors Dec 22, 2023
Copy link

melvin-bot bot commented Dec 22, 2023

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Dec 22, 2023
Copy link

melvin-bot bot commented Dec 22, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.15-5 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-12-29. 🎊

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

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Dec 22, 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:

  • [@mollfpr] The PR that introduced the bug has been identified. Link to the PR:
  • [@mollfpr] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@mollfpr] 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:
  • [@mollfpr] Determine if we should create a regression test for this bug.
  • [@mollfpr] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@trjExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added the Overdue label Jan 1, 2024
@deetergp
Copy link
Contributor

deetergp commented Jan 3, 2024

@mollfpr Can you check complete the checklist?

@melvin-bot melvin-bot bot removed the Overdue label Jan 3, 2024
@trjExpensify
Copy link
Contributor

No need for the second checklist for that, it was a follow-up PR to update the PR checklist. Very meta. Closing now, thanks!

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. External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
None yet
Development

No branches or pull requests