Skip to content

[HOLD][$250] Dev - Getting console warning in android #11733

Closed

Description

@kavimuru

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. build the app
  2. immediately see the errors

Expected Result:

No console warnings displayed

Actual Result:

Console warnings about keyboardAvoidingViewBehavior are present

Workaround:

Unknown

Platform:

Where is this issue occurring?

  • Android

Version Number: 1.2.12-3
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:
2022-10-11_11-14-40
2022-10-11_11-14-48

Expensify/Expensify Issue URL:
Issue reported by: @aneequeahmad
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1665522948008369

View all open jobs on GitHub

Activity

  1. melvin-bot commented on Oct 11, 2022

    @melvin-bot

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

  2. removed
    AutoAssignerTriageAuto assign issues for triage to an available triage team member
    on Oct 11, 2022
  3. aimane-chnaif commented on Oct 12, 2022

    @aimane-chnaif
    Contributor

    Proposal

    keyboardAvoidingViewBehavior={Platform.OS === 'android' ? '' : 'padding'}

    The issue happens from above line added here

    keyboardAvoidingViewBehavior: PropTypes.oneOf(['padding', 'height', 'position']),

    keyboardAvoidingViewBehavior props value is expected one of these 3 but in android it's set to ''

    Solution:

    -               keyboardAvoidingViewBehavior={Platform.OS === 'android' ? '' : 'padding'}

    remove this line
    By doing this, android keyboardAvoidingViewBehavior set to height and iOS keyboardAvoidingViewBehavior keeps padding unchanged.

    The default values are found here
    ios:

    keyboardAvoidingViewBehavior: 'padding',

    android:
    defaultProps.keyboardAvoidingViewBehavior = 'height';

  4. hungvu193 commented on Oct 12, 2022

    @hungvu193
    Contributor

    Actually, change the default proptypes can effect other screens.
    For this case I think we should change:

    keyboardAvoidingViewBehavior={Platform.OS === 'android' ? '' : 'padding'}

    into:

    -  keyboardAvoidingViewBehavior={Platform.OS === 'android' ? '' : 'padding'} 
    +  keyboardAvoidingViewBehavior={Platform.OS === 'android' ? undefined : 'padding'} 

    After that, the warning will disappear and also it won't effect other screens.

  5. thesahindia commented on Oct 12, 2022

    @thesahindia
    Member

    I vote we close this issue as it's not a big problem and will be fixed after #10648

  6. marcaaron commented on Oct 12, 2022

    @marcaaron
    Contributor

    Please wait until the issue has been triaged and Help Wanted label added.

  7. added
    ExternalAdded to denote the issue can be worked on by a contributor
    and removed on Oct 12, 2022
  8. melvin-bot commented on Oct 12, 2022

    @melvin-bot

    Current assignee @MitchExpensify is eligible for the External assigner, not assigning anyone new.

  9. 37 remaining items

  10. Luke9389 commented on Nov 7, 2022

    @Luke9389
    Contributor

    still on hold

  11. aimane-chnaif commented on Nov 8, 2022

    @aimane-chnaif
    Contributor

    #11586 is merged already and the current codebase is what I proposed here.
    Since this issue no longer happens, can be closed now.

  12. MitchExpensify commented on Nov 17, 2022

    @MitchExpensify
    Contributor

    @Luke9389 What do you think about closing this given the above comment?

  13. Luke9389 commented on Nov 17, 2022

    @Luke9389
    Contributor

    Gotta read this one back over.

  14. Luke9389 commented on Nov 17, 2022

    @Luke9389
    Contributor

    Yep we can close this now. Thanks @aimane-chnaif.

  15. aneequeahmad commented on Nov 17, 2022

    @aneequeahmad
    Contributor

    @MitchExpensify This one is fixed in production, am i eligible for reporting bonus ?

  16. MitchExpensify commented on Nov 17, 2022

    @MitchExpensify
    Contributor

    Yes @aneequeahmad, paying now

  17. MitchExpensify commented on Nov 17, 2022

    @MitchExpensify
    Contributor

    Mind applying here and I'll issue the reporting bonus? Thanks @aneequeahmad

  18. aneequeahmad commented on Nov 18, 2022

    @aneequeahmad
    Contributor

    @MitchExpensify applied thanks

  19. MitchExpensify commented on Nov 18, 2022

    @MitchExpensify
    Contributor

    Paid!

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.EngineeringExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributorsWeeklyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions