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-04-03] [$1000] Border line appears, then disappears, above the 1st search result #15963

Closed
1 of 6 tasks
kavimuru opened this issue Mar 14, 2023 · 44 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

@kavimuru
Copy link

kavimuru commented Mar 14, 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 Settings > Profile > Pronouns
  2. Type Hi
  3. Observe that the border doesn't show above the first result
  4. Type Hir
  5. Observe that the border now shows above the first result
  6. Hover over the first result
  7. Observe that the border no longer show above the first result

Expected Result:

There should not be a border line above the first item

Actual Result:

Initially there is a border above the first searched result and disappears when hovering over the item

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.2.84-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:

Recording.1707.mp4
pronounns-border-issue.mov
Border doesn't show above the first result Border shows above the first result After hover, border doesn't show above the first result
image image image

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

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~019f108d0e7679c2b4
  • Upwork Job ID: 1635885788604809216
  • Last Price Increase: 2023-03-15
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Mar 14, 2023
@melvin-bot melvin-bot bot locked and limited conversation to collaborators Mar 14, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

MelvinBot commented Mar 14, 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

@conorpendergrast
Copy link
Contributor

I've added a few more details to the reproduction steps, and a set of 3 screenshots to show more precisely the issue. Thanks!

@conorpendergrast conorpendergrast added the External Added to denote the issue can be worked on by a contributor label Mar 15, 2023
@melvin-bot melvin-bot bot unlocked this conversation Mar 15, 2023
@melvin-bot melvin-bot bot changed the title Border line appears above the 1st search result [$1000] Border line appears above the 1st search result Mar 15, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

Current assignee @conorpendergrast 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 - @s77rt (External)

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

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

@conorpendergrast conorpendergrast changed the title [$1000] Border line appears above the 1st search result [$1000] Border line appears, then disappears, above the 1st search result Mar 15, 2023
@tienifr
Copy link
Contributor

tienifr commented Mar 15, 2023

Proposal

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

Initially there is a border above the first searched result and disappears when hovering over the item in the pronoun list.

What is the root cause of that problem?

We're not checking the shouldHaveOptionSeparator prop in shouldComponentUpdate of OptionRow. So when shouldHaveOptionSeparator changes but other props remain the same, the component style is not updated and the border top remains.

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

Adding || this.props.shouldHaveOptionSeparator !== nextProps.shouldHaveOptionSeparator; to the shouldComponentUpdate of OptionRow here

shouldComponentUpdate(nextProps, nextState) {
will solve the issue.

What alternative solutions did you explore? (Optional)

NA

Result

Working well after the fix:

Screen.Recording.2023-03-15.at.13.24.59.mov

@jayeshmangwani
Copy link
Contributor

Proposal

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

When searching the pronounce then listing first item shows the top border

What is the root cause of that problem?

Initially, when we render the list we pass the shouldHaveOptionSeparator prop for checking if the index is greater than 0 and then show the top border, so initially, it is working but when we search the new list and the after new updated index of the OptionRow list does not rendering again due to keyExtractor function, where we have added only keyForList change to the render list

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

We can update the keyExtractor function of the SectionList to the when if index is updated then also render the list again

before
extractKey(option) {
    return option.keyForList;
}


after
extractKey(option, index) {
    return `${option.keyForList}${index}`
}

Fix

15963-solve.mov

What alternative solutions did you explore? (Optional)

  • none

@MelvinBot
Copy link

📣 @jayeshmangwani! 📣

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>

@jayeshmangwani
Copy link
Contributor

Contributor details
Your Expensify account email: jayeshmangwani@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~0113380ca9ab9a0820

@MelvinBot
Copy link

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

@MuhammadArslanKhan96
Copy link

the problem is in shouldComponentUpdate under OptionRow.js componenet, we are not re-rendering the component after update of border top condition.

I've fixed the issue please check

Screen.Recording.2023-03-15.at.3.14.02.PM.mov

@MelvinBot
Copy link

📣 @MuhammadArslanKhan96! 📣

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>

@MuhammadArslanKhan96
Copy link

Contributor details
Your Expensify account email: m.arslan2201@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~01cec63d38b37d453e

@MelvinBot
Copy link

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

@Pujan92
Copy link
Contributor

Pujan92 commented Mar 15, 2023

Proposal

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

Top border remains for the first option on filtering the pronouns list

What is the root cause of that problem?

OptionRow component seems not updated as it is not considering shouldHaveOptionSeparator property.

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

Instead of adding the separator(top border) manually, we can use the ItemSeparatorComponent prop for the SectionList which will take care of the separator of 1px border with the <View style={styles.borderTop} />} here in case the shouldHaveOptionSeparator is true.

What alternative solutions did you explore? (Optional)

We can add and consider prop shouldHaveOptionSeparator in shouldComponentUpdate of OptionRow as @tienifr proposed.

@s77rt
Copy link
Contributor

s77rt commented Mar 15, 2023

@tienifr Thanks for the proposal! Your RCA is correct and the fix is straightforward 👍

🎀 👀 🎀 C+ reviewed

cc @Beamanator

@s77rt
Copy link
Contributor

s77rt commented Mar 15, 2023

@jayeshmangwani Thanks for the proposal! I don't think the RCA is correct, it is intentional to use a constant key otherwise we will re-render every item that changes position even if it's content (and styles) didn't change.

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

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

@Beamanator
Copy link
Contributor

@s77rt it looks like you approved this proposal and I agree it looks perfect, so assigning @tienifr ! 👍

@melvin-bot melvin-bot bot removed the Overdue label Mar 20, 2023
@Beamanator
Copy link
Contributor

(p.s. sorry for the delay, had a crazy busy week last week at ExpensiConX)

@s77rt
Copy link
Contributor

s77rt commented Mar 20, 2023

@tienifr Please make sure to cover other missing cases besides props.shouldHaveOptionSeparator.

@conorpendergrast
Copy link
Contributor

Hiring for this job:

  • The Contributor+ @ $1000: @s77rt
  • The contributor fixing the issue @ $1000: @tienifr
  • The contributor who reported the issue/bug @ $250: @jayeshmangwani

@tienifr
Copy link
Contributor

tienifr commented Mar 27, 2023

Regression Test Proposal

Bug: Border line appears, then disappears, above the 1st search result

Proposed Test Steps:

For the main issue

  1. Navigate to Settings > Profile > Pronouns
  2. Type Hi
  3. Observe that the border doesn't show above the first result
  4. Type Hir
  5. Verify that the border still doesn't show above the first result

For the other pages that could be affected

PriorityModePage
  1. Navigate to Settings > Preferences > Priority mode
  2. Verify that the border doesn't show above the first item
  3. Verify that there is no error occur
LanguagePage
  1. Navigate to Settings > Preferences > Language
  2. Verify that the border doesn't show above the first item
  3. Verify that there is no error occur
ReportParticipantsPage
  1. Navigate to a report with multiple participants
  2. Click on the user list on the top to open Details page
  3. Verify that the border doesn't show above the first item
  4. Verify that there is no error occur
IOUConfirmationList
  1. Go to a report
  2. Choose Request money or Send money
  3. Type in an amount and move to the confirmation page
  4. Verify that there is no error occur
NewChatPage
  1. Click the plus button in the LHN page, select New chat
  2. Verify that the border doesn't show above the first item
  3. Verify that there is no error occur
SearchPage
  1. Click the search button in the LHN page
  2. Verify that the border doesn't show above the first item
  3. Verify that there is no error occur
IOUCurrencySelection
  1. Go to a report
  2. Choose Request money or Send money
  3. Select the currency to enter currency selection page
  4. Verify that the border doesn't show above the first item
  5. Verify that there is no error occur
IOUParticipantsRequest
  1. Click the plus button in the LHN page, select Request money
  2. Type in an amount and proceed
  3. Search for users
  4. Verify that the border doesn't show above the first item
  5. Verify that there is no error occur
IOUParticipantsSplit
  1. Click the plus button in the LHN page, select Split bill
  2. Type in an amount and proceed
  3. Search for users
  4. Verify that the border doesn't show above the first item
  5. Verify that there is no error occur
YearPickerPage
  1. Navigate to Settings > Profile > Personal details > Date of birth
  2. Select year dropdown
  3. Search for a year
  4. Verify that the border doesn't show above the first item
  5. Verify that there is no error occur
TimezoneSelectPage
  1. Navigate to Settings > Profile > Timezone
  2. Disable automatic timezone, then go to select time zone
  3. Verify that the border doesn't show above the first item
  4. Verify that there is no error occur
WorkspaceInvitePage
  1. Go to a workspace
  2. Select Manage members > Invite
  3. Search for a user
  4. Verify that the border doesn't show above the first item
  5. Verify that there is no error occur
WorkspaceMembersPage
  1. Go to a workspace
  2. Select Manage members
  3. Verify that the border doesn't show above the first item
  4. Verify that there is no error occur

image

Do we 👍 or 👎

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Mar 27, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Border line appears, then disappears, above the 1st search result [HOLD for payment 2023-04-03] [$1000] Border line appears, then disappears, above the 1st search result Mar 27, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Mar 27, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

MelvinBot commented Mar 27, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.89-0 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-04-03. 🎊

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.

Assigned 2023-03-20
Merged 2023-03-24
Standard payment (no bonus or penalty)

  • The Contributor+ @ $1000: @s77rt
  • The contributor fixing the issue @ $1000: @tienifr
  • The contributor who reported the issue/bug @ $250: @jayeshmangwani

@MelvinBot
Copy link

MelvinBot commented Mar 27, 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:

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

@s77rt
Copy link
Contributor

s77rt commented Mar 27, 2023


Regression Test Proposal

  1. Go to Settings > Profile > Pronouns
  2. In the search field, type Hi
  3. Verify that the border doesn't show above the first result
  4. Type Hir
  5. Verify that the border still doesn't show above the first result

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Apr 3, 2023
@Beamanator
Copy link
Contributor

Bump @conorpendergrast if you don't mind doing the payments here soon please :D

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

Sorry, missed this on Monday 🤦

@conorpendergrast
Copy link
Contributor

Payments made (this comment)

@conorpendergrast
Copy link
Contributor

Regression test steps proposed. All done!

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