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

[$1000] Inconsistent margins in Home address form #17632

Closed
6 tasks done
kavimuru opened this issue Apr 18, 2023 · 21 comments
Closed
6 tasks done

[$1000] Inconsistent margins in Home address form #17632

kavimuru opened this issue Apr 18, 2023 · 21 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 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

Comments

@kavimuru
Copy link

kavimuru commented Apr 18, 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. Go to settings -> Profile
  2. Personal details -> Home address

Expected Result:

Margins below each field should be consistent

Actual Result:

Margins below each fields are not consistent.

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

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.1
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

Screen.Recording.2023-04-16.at.6.27.55.PM.mov

Screenshot (305)

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

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~017ab6742c47754266
  • Upwork Job ID: 1650976064170250240
  • Last Price Increase: 2023-04-25
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Apr 18, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

MelvinBot commented Apr 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

@MitchExpensify
Copy link
Contributor

@kavimuru what pixel size spacing do we expect for these margins?

@melvin-bot melvin-bot bot added the Overdue label Apr 24, 2023
@MelvinBot
Copy link

@MitchExpensify Eep! 4 days overdue now. Issues have feelings too...

@MitchExpensify
Copy link
Contributor

This does look inconsistent and I am able to reproduce.

@melvin-bot melvin-bot bot removed the Overdue label Apr 25, 2023
@MitchExpensify MitchExpensify changed the title nconsistent margins in Home address form Inconsistent margins in Home address form Apr 25, 2023
@MitchExpensify MitchExpensify added the External Added to denote the issue can be worked on by a contributor label Apr 25, 2023
@melvin-bot melvin-bot bot changed the title Inconsistent margins in Home address form [$1000] Inconsistent margins in Home address form Apr 25, 2023
@MelvinBot
Copy link

Job added to Upwork: https://www.upwork.com/jobs/~017ab6742c47754266

@MelvinBot
Copy link

Current assignee @MitchExpensify 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 - @thesahindia (External)

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

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

@hoangzinh
Copy link
Contributor

hoangzinh commented Apr 25, 2023

Proposal

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

Inconsistent margins in Home address form

What is the root cause of that problem?

All of wrapper field in this form has been added same margin-bottom number in those lines. So it's good. But according to recording in GH issue, there are 2 places showing inconsistent margin:

  1. The zip code field => Root cause is this field having hint text, it adds an extra margin bottom (code ref)
    Screenshot 2023-04-26 at 05 59 08

  2. Country field => The inconsistent margin visualize is not come from this field itself, but come from SubmitButton, where it set margin-top to 20px
    Screenshot 2023-04-26 at 05 59 22

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

To fix:

  1. I think we can remove margin-bottom style in this line. Because it should not carry margin-bottom itself, otherwise it will lead to adding extra spaces like this case. Even with the main component (Input/Checkbox...), it doesn't have default margin-bottom. The margin should be proactive set where it's needed (Or If we want a safer way, we can adding a additional prop hintStyle into TextInput component, so we can adding custom styles for hint message)
  2. I don't think we should do anything in this component. Because extra margin is not come from itself.

@ahmedGaber93
Copy link
Contributor

ahmedGaber93 commented Apr 25, 2023

Proposal

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

Inconsistent margins in Home address form for input zip code

What is the root cause of that problem?

every input in the form has margin-bottom: 16px; but zip code have extra margin by FormHelpMessage which add margin-bottom: 4px;
Screenshot 2023-04-26 at 12 52 16 AM

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

remove margin-bottom from FormHelpMessage component it self, or add prop style HelpMessageStyle for TextInput and pass it down to FormHelpMessage.
we can also decrease FormHelpMessage marign-top to be 4px rather than 8px to show constant, but i think no need to remove it

What alternative solutions did you explore? (Optional)

@dukenv0307
Copy link
Contributor

dukenv0307 commented Apr 26, 2023

Proposal

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

Inconsistent margins in forms: Company Step, Personal information, Home Address Form,...

What is the root cause of that problem?

  • The help message have margin bottom 4px. That makes us think that the margin of each field that has help message is larger
    <View style={[styles.flexRow, styles.alignItemsCenter, styles.mt2, styles.mb1, ...props.style]}>
  • With the last field of a form it doesn't have margin bottom, that margin bottom belongs to the container of submit buttom submit buttom and it have margin top and bottom is 20px
    containerStyles={[styles.mh0, styles.mt5, styles.flex1]}

    containerStyles={[styles.mh5, styles.mb5, styles.justifyContentEnd, ...props.containerStyles]}

    This is base component of form so that many forms in product have same issue.

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

To be consistent, we should remove margin bottom of help message in here

<View style={[styles.flexRow, styles.alignItemsCenter, styles.mt2, styles.mb1, ...props.style]}>

And change margin top and bottom of the container of submit buttom in here to 16px

containerStyles={[styles.mh0, styles.mt5, styles.flex1]}

containerStyles={[styles.mh5, styles.mb5, styles.justifyContentEnd, ...props.containerStyles]}

In RequestorStep.js I saw that micro text has margin has margin bottom 20px while each field in form has margin bottom 16px. Is this an inconsistent? If yes, we also need to fix it.

<View style={[styles.mb5, styles.mt1, styles.dFlex, styles.flexRow]}>

Screenshot 2023-04-26 at 15 34 18

What alternative solutions did you explore? (Optional)

NA

@thesahindia
Copy link
Member

It feels like a minor issue. I think we ask @shawnborton for their thoughts.

@shawnborton, do you think we should work on this?

@shawnborton
Copy link
Contributor

Technically this is a design bug but I feel like we should just fix this internally quickly. cc @Beamanator @cristipaval I think we just want 20px below each input grouping (could be just an input, or input + hint text).

@cristipaval
Copy link
Contributor

yes, this can be quickly fixed in the PR on which @gedu is working atm to align the Home Address screen to the push-to-page design. Could we assign @gedu to this one as well?

@Beamanator
Copy link
Contributor

@cristipaval that makes sense, but you can probably also just include this requirement in their PR and close this out now 🤷 Either way sounds reasonable to me 👍

@cristipaval
Copy link
Contributor

just include this requirement in their PR and close this out now

Great idea!

@cristipaval
Copy link
Contributor

I'll actually reopen it and let the asignees close it when they consider, as I think there is a reporting bonus to pay.

@MitchExpensify
Copy link
Contributor

offer sent to @DinalJivani for reporting bonus payment, will close this out when paid!

@DinalJivani
Copy link

@MitchExpensify
Offer accepted.

@MitchExpensify
Copy link
Contributor

Paid! Thanks

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. Daily KSv2 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
Projects
None yet
Development

No branches or pull requests