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 March 4th][HOLD for payment 2024-02-15] [$500] Search - "Invite a friend" banner do not move up when input field is focused in search page #35182

Closed
1 of 6 tasks
lanitochka17 opened this issue Jan 25, 2024 · 35 comments
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 Reviewing Has a PR in review Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Jan 25, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 1.4.32-2
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
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Issue found when executing PR #33925

Action Performed:

  1. Navigate to staging.new.expensify.com & log in
  2. Tap search icon
  3. Click on input field to get focused

Expected Result:

"Invite a friend, get $250" banner should move up (above the keypad) once the input field is focused

Actual Result:

"Invite a friend" banner do not move up when input field is focused in search page. The banner still pinned below, hidden behind the keypad

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

Add any screenshot/video evidence

Bug6355070_1706212514389.mweb-invitefriendbanner.mp4

View all open jobs on GitHub

@lanitochka17 lanitochka17 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 Jan 25, 2024
@melvin-bot melvin-bot bot changed the title Search - "Invite a friend" banner do not move up when input field is focused in search page [$500] Search - "Invite a friend" banner do not move up when input field is focused in search page Jan 25, 2024
Copy link

melvin-bot bot commented Jan 25, 2024

Job added to Upwork: https://www.upwork.com/jobs/~011428dae6c887429f

Copy link

melvin-bot bot commented Jan 25, 2024

Triggered auto assignment to @slafortune (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 Jan 25, 2024
Copy link

melvin-bot bot commented Jan 25, 2024

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

@neonbhai
Copy link
Contributor

neonbhai commented Jan 25, 2024

Proposal

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

"Invite a friend" banner do not move up when input field is focused in search page

What is the root cause of that problem?

The ReferralCTA is not nested in any parent KeyboardAvoidingView

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

We should pass shouldEnableKeyboardAvoidingView as false here:

App/src/pages/SearchPage.js

Lines 172 to 177 in 83a7535

<ScreenWrapper
includeSafeAreaPaddingBottom={false}
testID={SearchPage.displayName}
onEntryTransitionEnd={updateOptions}
navigation={navigation}
>

and wrap the children with KeyboardAvoidingView like we do here

Alternatively:

For a deeper fix, the ReferralCTA here and the parent view here can be wrapped in a keyboard avoiding view

@neonbhai
Copy link
Contributor

Proposal

Updated

@aeioual
Copy link
Contributor

aeioual commented Jan 25, 2024

Proposal

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

"Invite a friend" banner do not move up when input field is focused in search page

What is the root cause of that problem?

We forget to pass shouldEnableMaxHeight prop in ScreenWrapper in the SearchPage page and hence the banner does not move up when input field is focused.

App/src/pages/SearchPage.js

Lines 172 to 177 in 8cc80e6

<ScreenWrapper
includeSafeAreaPaddingBottom={false}
testID={SearchPage.displayName}
onEntryTransitionEnd={updateOptions}
navigation={navigation}
>

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

We simply need to pass the prop shouldEnableMaxHeight in ScreenWrapper and we we will get the desired functionality.

We already do the same implementation in NewChatpage

<ScreenWrapper
shouldEnableKeyboardAvoidingView={false}
includeSafeAreaPaddingBottom={isOffline}
shouldShowOfflineIndicator={false}
includePaddingTop={false}
shouldEnableMaxHeight

Result:

RPReplay_Final1706220901.MP4

What alternative solutions did you explore? (Optional)

Referring to comment, if we want to disable to functionality of pushing the banner up when there is onscreen keyboard then we just have to remove the shouldEnableMaxHeight prop in MoneyRequestParticipantsPage page and NewChatPage page.

<ScreenWrapper
includeSafeAreaPaddingBottom={false}
shouldEnableMaxHeight={DeviceCapabilities.canUseTouchScreen()}

<ScreenWrapper
shouldEnableKeyboardAvoidingView={false}
includeSafeAreaPaddingBottom={isOffline}
shouldShowOfflineIndicator={false}
includePaddingTop={false}
shouldEnableMaxHeight
testID={NewChatPage.displayName}
>

@c3024
Copy link
Contributor

c3024 commented Jan 26, 2024

Once the keyboard appears there is barely any space left to see the user details/reports. Perhaps not pushing the banner up when there is onscreen keyboard is intended.

cc: @Expensify/design @slafortune

@aeioual
Copy link
Contributor

aeioual commented Jan 26, 2024

Once the keyboard appears there is barely any space left to see the user details/reports. Perhaps not pushing the banner up when there is onscreen keyboard is intended.

hello @c3024, If this is the case then I have added a alternate proposal to not push the banner up when there is onscreen keyboard :) my proposal can work both ways, looking forward for comments from the design team.

Proposal

@shawnborton
Copy link
Contributor

Hmm I could have sworn this was intentional, because if the banner moves up, we'll have virtually no space left on the screen? cc @Expensify/design for thoughts there, I can't remember where we landed.

cc @jamesdeanexpensify in case you remember, too.

@dannymcclain
Copy link
Contributor

@shawnborton As far as I remember, we made the banner dismissible so that we could keep it above the keyboard but still allow people to get it out of the way when searching. A lot of these screens auto-focus the keyboard upon arrival, so if we leave it stuck to the bottom even when the keyboard is open, a lot of users will never see it at all.

Here's the issue where we talked about and decided that: #32499 (if you want to slog through all the comments 😬)

@shawnborton
Copy link
Contributor

Ah okay cool! Thanks for confirming, so sounds like this is a bug then.

@jamesdeanexpensify
Copy link
Contributor

Also, just an update on making the banners permanently dismissible, that's being worked on here.

@melvin-bot melvin-bot bot added the Overdue label Jan 29, 2024
@c3024
Copy link
Contributor

c3024 commented Jan 29, 2024

Proposal here by @Amarparab2024 looks good to me.

🎀 👀 🎀 C+ Reviewed

Copy link

melvin-bot bot commented Jan 29, 2024

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

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 29, 2024
@aeioual
Copy link
Contributor

aeioual commented Jan 30, 2024

Haven't received any offer on Upwork, do I have to initiate something?

@c3024
Copy link
Contributor

c3024 commented Jan 30, 2024

Automation fails sometimes. You may work on the PR. An offer will be sent in the meantime.

Copy link

melvin-bot bot commented Feb 8, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.38-6 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 2024-02-15. 🎊

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

  • @c3024 requires payment (Needs manual offer from BZ)
  • @Amarparab2024 requires payment (Needs manual offer from BZ)

Copy link

melvin-bot bot commented Feb 8, 2024

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:

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

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Feb 15, 2024
Copy link

melvin-bot bot commented Feb 15, 2024

Payment Summary

Upwork Job

  • ROLE: @c3024 paid $(AMOUNT) via Upwork (LINK)
  • ROLE: @Amarparab2024 paid $(AMOUNT) via Upwork (LINK)

BugZero Checklist (@slafortune)

  • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
  • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants//hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

@aeioual
Copy link
Contributor

aeioual commented Feb 15, 2024

@stitesExpensify , still haven't received upwork offer for this issue :) can you please take a look

@melvin-bot melvin-bot bot removed the Overdue label Feb 15, 2024
@stitesExpensify
Copy link
Contributor

Hey @slafortune could you help @Amarparab2024 out please? :)

@slafortune
Copy link
Contributor

@stitesExpensify @Amarparab2024 definitely! Payment is due today 👍

@slafortune
Copy link
Contributor

@c3024 can you please complete the checklist?

@slafortune
Copy link
Contributor

Offer sent here @Amarparab2024
Offer sent here @c3024

@aeioual
Copy link
Contributor

aeioual commented Feb 15, 2024

Thanks for the swiftness :)

@melvin-bot melvin-bot bot added the Overdue label Feb 19, 2024
Copy link

melvin-bot bot commented Feb 19, 2024

@slafortune, @stitesExpensify, @c3024, @Amarparab2024 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@slafortune
Copy link
Contributor

@c3024 will you be able to complete the checklist in the next day or two?

@melvin-bot melvin-bot bot removed the Overdue label Feb 19, 2024
@c3024
Copy link
Contributor

c3024 commented Feb 20, 2024

Unfortunately 😞 , the file SearchPage.js in which we fixed this has been deleted from the repo. It has been replaced with SearchPage/index.js.

The changes made in this PR are not reflected in this index.js file so the bug still exists.

searchPageBanner.mp4

Could you raise a PR adding this prop in SearchPage/index.js? Thanks. @Amarparab2024

cc: @slafortune @stitesExpensify

@aeioual
Copy link
Contributor

aeioual commented Feb 20, 2024 via email

@aeioual
Copy link
Contributor

aeioual commented Feb 20, 2024

PR is up @c3024 :)

@slafortune slafortune changed the title [HOLD for payment 2024-02-15] [$500] Search - "Invite a friend" banner do not move up when input field is focused in search page [HOLD for payment March 4th][HOLD for payment 2024-02-15] [$500] Search - "Invite a friend" banner do not move up when input field is focused in search page Feb 28, 2024
@slafortune
Copy link
Contributor

Looks like the automation isn't working - I've updated the title.

When you have a chance @c3024 can you complete the checklist?

  1. The PR that introduced the bug has been identified. Link to the PR:

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

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

  4. Determine if we should create a regression test for this bug.

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

@c3024
Copy link
Contributor

c3024 commented Mar 1, 2024

  1. The PR that introduced the bug has been identified. Link to the PR: Feature : Added Promote referral program messaging to OptionsSelector component #30372
  2. 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: https://github.com/Expensify/App/pull/30372/files#r1509085869
  3. 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: No discussion was started. This is an edge case and not something that is serious so such discussion does not appear useful.
  4. Determine if we should create a regression test for this bug: No. This is about the referral program banner which foes behind the on screen keyboard on mWeb. This is not a serious enough bug to warrant a regression test.
  5. 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: NA

@slafortune
Copy link
Contributor

Paid 👍

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 Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

9 participants