Skip to content

[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

Description

@lanitochka17

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com 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

Activity

  1. added
    External
    Daily
    Bug
    on Jan 25, 2024
  2. 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[/+] on Jan 25, 2024
  3. melvin-bot commented on Jan 25, 2024

    @melvin-bot
  4. melvin-bot commented on Jan 25, 2024

    @melvin-bot

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

  5. added
    Help Wanted
    on Jan 25, 2024
  6. melvin-bot commented on Jan 25, 2024

    @melvin-bot

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

  7. neonbhai commented on Jan 25, 2024

    @neonbhai
    Contributor

    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

  8. neonbhai commented on Jan 25, 2024

    @neonbhai
    Contributor

    Proposal

    Updated

  9. aeioual commented on Jan 25, 2024

    @aeioual
    Contributor

    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}
    >

  10. c3024 commented on Jan 26, 2024

    @c3024
    Contributor

    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

  11. aeioual commented on Jan 26, 2024

    @aeioual
    Contributor

    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

  12. 38 remaining items

  13. melvin-bot commented on Feb 19, 2024

    @melvin-bot

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

  14. slafortune commented on Feb 19, 2024

    @slafortune
    Contributor

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

  15. c3024 commented on Feb 20, 2024

    @c3024
    Contributor

    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

  16. aeioual commented on Feb 20, 2024

    @aeioual
    Contributor
  17. added
    Reviewing
    Weekly
    and removed
    Daily
    on Feb 20, 2024
  18. aeioual commented on Feb 20, 2024

    @aeioual
    Contributor

    PR is up @c3024 :)

  19. 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[/+] on Feb 28, 2024
  20. slafortune commented on Feb 28, 2024

    @slafortune
    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

  21. c3024 commented on Mar 1, 2024

    @c3024
    Contributor
    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
  22. slafortune commented on Mar 6, 2024

    @slafortune
    Contributor

    Paid 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugExternalReviewingWeekly

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions