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-05-05] [$1000] Settings - Contact method menu item right arrow icon is not vertically centre align #17756

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

Comments

@kbecciv
Copy link

kbecciv commented Apr 20, 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. Launch the app -> Login in account
  2. Navigate to setting
  3. Navigate to profile -> navigate to contact method
  4. Notice right arrow icon is not vertically centre align same as other page

Expected Result:

Right arrow beside email should be vertically centre align

Actual Result:

Right arrow beside email is not vertically centre align

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

Reproducible in staging?: Yes

Reproducible in production?: Yes

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

Simulator Screenshot - iPhone 14 - 2023-04-19 at 21 47 25

Expensify/Expensify Issue URL:

Issue reported by:@dhairyasenjaliya

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1681921369044789

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~019d89a1784228879a
  • Upwork Job ID: 1649463285704830976
  • Last Price Increase: 2023-04-21
@kbecciv kbecciv added Daily KSv2 Needs Reproduction Reproducible steps needed Bug Something is broken. Auto assigns a BugZero manager. labels Apr 20, 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 20, 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

@dhairyasenjaliya

This comment was marked as duplicate.

@MelvinBot
Copy link

Looks like something related to react-navigation may have been mentioned in this issue discussion.

As a reminder, please make sure that all proposals are not workarounds and that any and all attempt to fix the issue holistically have been made before proceeding with a solution. Proposals to change our DeprecatedCustomActions.js files should not be accepted.

Feel free to drop a note in #expensify-open-source with any questions.

@dhairyasenjaliya
Copy link
Contributor

Proposal

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

  • Contact method menu item right arrow icon is not vertically centre align

What is the root cause of that problem?

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

  • We just need to add props wrapperStyle={[styles.alignItemsCenter]} into <MenuItem> inside ContactMethodsPage.js

Changes

             <MenuItem
                   title={menuItemTitle}
                   description={description}
                   onPress={() => Navigation.navigate(ROUTES.getEditContactMethodRoute(partnerUserID))}
                   brickRoadIndicator={indicator}
                   shouldShowBasicTitle
                   shouldShowRightIcon
                   disabled={!_.isEmpty(pendingAction)}
+                    wrapperStyle={[styles.alignItemsCenter]}
               />

What alternative solutions did you explore? (Optional)

@MitchExpensify MitchExpensify added the External Added to denote the issue can be worked on by a contributor label Apr 21, 2023
@melvin-bot melvin-bot bot changed the title Settings - Contact method menu item right arrow icon is not vertically centre align [$1000] Settings - Contact method menu item right arrow icon is not vertically centre align Apr 21, 2023
@MelvinBot
Copy link

Job added to Upwork: https://www.upwork.com/jobs/~019d89a1784228879a

@MitchExpensify MitchExpensify removed the Needs Reproduction Reproducible steps needed label Apr 21, 2023
@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 - @parasharrajat (External)

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

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

@Pujan92
Copy link
Contributor

Pujan92 commented Apr 21, 2023

Proposal

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

Right arrow icon is not vertically aligned in the center for more than 1 line description

What is the root cause of that problem?

{Boolean(props.shouldShowRightIcon) && (
<View style={[styles.popoverMenuIcon, styles.pointerEventsAuto, props.disabled && styles.cursorDisabled]}>

For the right icon parent container, we are providing a fixed height of 40px. So even if its content is centered with below properties, it won't be vertically aligned center with the overall menuItem height.

App/src/styles/styles.js

Lines 1222 to 1227 in b74c71c

popoverMenuIcon: {
width: variables.componentSizeNormal,
height: variables.componentSizeNormal,
justifyContent: 'center',
alignItems: 'center',
},

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

We can remove the fixed height from the popoverMenuIcon container which seems not required here. With that, it will take the full available height same as the DotIndicator and shows the content vertically centered.

Result

Screen.Recording.2023-04-22.at.12.58.05.AM.mov

@parasharrajat
Copy link
Member

parasharrajat commented Apr 21, 2023

@dhairyasenjaliya Incorrect root cause.


@Pujan92 's proposal looks good to me. It is better to fix this for all not just the contact details page.

Suggestion:

I would just apply alignSelfCenter to the arrow icon

<View style={[styles.popoverMenuIcon, styles.pointerEventsAuto, props.disabled && styles.cursorDisabled]}>
to keep the impact minimal.

Other than this, @Pujan92 Can you please also add more Stories for MenuItem's different states? Normally, we extend stories while working on such issues.

cc: @techievivek

🎀 👀 🎀 C+ reviewed

@nurulmayapriyani
Copy link

Proposal

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

Contact method right arrow icon is not aligned to center vertically

What is the root cause of that problem?

Right icon View has fixed height so justify content is not sufficient.

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

We just need to add styles.alignSelfCenter to right icon.

App/src/components/MenuItem.js

Changes

-                            <View style={[styles.popoverMenuIcon, styles.pointerEventsAuto, props.disabled && styles.cursorDisabled]}>
+                           <View style={[styles.popoverMenuIcon, styles.pointerEventsAuto, props.disabled && styles.cursorDisabled, styles.alignSelfCenter]}>
                                <Icon
                                    src={props.iconRight}
                                    fill={StyleUtils.getIconFillColor(getButtonState(props.focused || hovered, pressed, props.success, props.disabled, props.interactive))}
                                />
                            </View>

What alternative solutions did you explore? (Optional)

@MelvinBot
Copy link

📣 @nurulmayapriyani! 📣

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. 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.
  2. 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.
  3. 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>

@dhairyasenjaliya
Copy link
Contributor

@parasharrajat I don't think popoverMenuIcon fixed height is an issue, the issue lies only in the contact method page, the fix I applied is working on all platforms and its minimal changes withoud affecting all other `

Result

WEB

Screenshot 2023-04-22 at 1 57 02 AM

**Android **

Screenshot 2023-04-22 at 2 03 15 AM

IOS

@Pujan92
Copy link
Contributor

Pujan92 commented Apr 21, 2023

@parasharrajat updated screencasts in the proposal.

@dhairyasenjaliya I believe the wrapper container doesn't require that fixed height here(as irrespective of height the icon needs to be in the center) and better to take the available height to easily place content in the center with already provided styles.

@nurulmayapriyani
Copy link

Contributor details
Your Expensify account email: nurulmayapriyani@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~016869947b8b6d29b6

@MelvinBot
Copy link

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

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

Adding @Pujan92 to the job.

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

📣 @Pujan92 You have been assigned to this job by @techievivek!
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 📖

@Pujan92
Copy link
Contributor

Pujan92 commented Apr 24, 2023

Thanks! PR is ready for review.

@MitchExpensify
Copy link
Contributor

Invites sent for eventual payment - Upwork job

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Apr 28, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Settings - Contact method menu item right arrow icon is not vertically centre align [HOLD for payment 2023-05-05] [$1000] Settings - Contact method menu item right arrow icon is not vertically centre align Apr 28, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Apr 28, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.7-3 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-05-05. 🎊

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

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@MelvinBot
Copy link

MelvinBot commented Apr 28, 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:

  • [@parasharrajat] The PR that introduced the bug has been identified. Link to the PR:
  • [@parasharrajat] 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:
  • [@parasharrajat] 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:
  • [@parasharrajat] Determine if we should create a regression test for this bug.
  • [@parasharrajat] 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.
  • [@MitchExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@MitchExpensify
Copy link
Contributor

Made a calendar reminder to pay out on the 5th! 🎉

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels May 4, 2023
@parasharrajat
Copy link
Member

Bump @MitchExpensify

@parasharrajat
Copy link
Member

[@parasharrajat] The PR that introduced the bug has been identified. Link to the PR: It was designed this way since the start and is not caused by any PR. Then we introduced description support to menuItem which required this change

[@parasharrajat] 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: NA
[@parasharrajat] 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: NA

[@parasharrajat] Determine if we should create a regression test for this bug.

No regression Test needed. This should be covered with storybooks.

@MitchExpensify
Copy link
Contributor

Bump @MitchExpensify

I ain't late 😆 (Thanks all the same)

@MitchExpensify
Copy link
Contributor

Paid and closing - Good job everyone!

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

No branches or pull requests

8 participants