Skip to content

[HOLD for payment June 27] Emoji Picker is slow to add emoji on Native Platforms and doesn't pull up the keyboard afterwards #2920

Closed

Description

@jasperhuangg

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Upwork posting: https://www.upwork.com/jobs/~01572e274a1ada4be0

Expected Result:

The emoji picker should add the emoji instantaneously and pull up the keyboard afterwards.

Actual Result:

The emoji picker takes a half second to add an emoji once it's been tapped on, and the keyboard isn't pulled up afterwards.

Action Performed:

  1. Navigate to any conversation on mobile.
  2. Open the emoji picker and tap on any emoji.

Workaround:

Yep, just bad UX

Platform:

Where is this issue occurring?

iOS
Android

View all open jobs on Upwork

Activity

  1. changed the title [-]Emoji Picker is slow to add emoji on Native Platforms and doesn't pull up keyboard afterwards[/-] [+]Emoji Picker is slow to add emoji on Native Platforms and doesn't pull up the keyboard afterwards[/+] on May 14, 2021
  2. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on May 21, 2021
  3. MelvinBot commented on May 21, 2021

    @MelvinBot
    Contributor

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

  4. Jag96 commented on May 24, 2021

    @Jag96
    Contributor
  5. waheed25 commented on May 24, 2021

    @waheed25

    Keyboard will keep open while it is in the focus and once it goes out of focus it will be hide and will be focused once it is in the focus, there requires a textInput with some emoji value which you wanted to display, Pressing on it will immediately open the keyboard while in the focus we can get the value of input from state to add the emoji.

  6. Jag96 commented on May 24, 2021

    @Jag96
    Contributor

    @waheed25 per our contributing guidelines, could you please add some more details about what is causing the issue and what changes you'll make to the code to fix this issue?

  7. waheed25 commented on May 24, 2021

    @waheed25

    @Jag96 The reason of keyboard get hidden because it gets unfocused somehow and, keyboard will keep displayed as it in focus we need to make sure that keyboard not goes out of focus, also if we wanted to perform some action on keyboard open and close we can use keyboard listeners.
    Slowness could be some extra re-renders so need to look which components get re-renders on this change.
    The ultimate goal is to achieve 60FPS with all the interaction and smooth user experience.

  8. aliabbasmalik8 commented on May 25, 2021

    @aliabbasmalik8
    Contributor
  9. jasperhuangg commented on May 25, 2021

    @jasperhuangg
    ContributorAuthor

    @aliabbasmalik8

    and need to value={this.comment} at this pace to update instantaneously

    Not sure if that will change anything, since we're already directly setting the value attribute here, which should be the same thing (I could be wrong though). Also, we'd have to set it up as a state value to get the component to re-render.

    and for focus issue need to call focus method in this method

    I might have tried this to no success. Since it's a relatively quick change, can you try it out first and post a screen recording of it working with your proposal?

    cc @Jag96

  10. aliabbasmalik8 commented on May 25, 2021

    @aliabbasmalik8
    Contributor

    @jasperhuangg
    I added setTimeout(this.focus, 400); at this place
    https://github.com/Expensify/Expensify.cash/blob/641acd1641cbb7144b3dc89ff60dc1ca30ae67bb/src/pages/home/report/ReportActionCompose.js#L274

    NOTE: we used react-native-modal package to show modal and in modal it takes 300 ms to animateOut so that the reason I used setTimeout

    and added value={this.comment} at this place to update instantaneously
    https://github.com/Expensify/Expensify.cash/blob/641acd1641cbb7144b3dc89ff60dc1ca30ae67bb/src/pages/home/report/ReportActionCompose.js#L393

    and it worked accordingly.
    https://user-images.githubusercontent.com/31027036/119446325-17555b00-bce3-11eb-8c87-c602bd07bd71.mp4

    Thanks

  11. 21 remaining items

  12. added
    ReviewingHas a PR in review
    and removed on Jun 10, 2021
  13. Jag96 commented on Jun 22, 2021

    @Jag96
    Contributor

    Reopening, regression found here: #3392 (comment)

  14. reopened this on Jun 22, 2021
  15. parasharrajat commented on Jun 22, 2021

    @parasharrajat
    Member

    @Jag96 I tried few approaches but all seem to fail. Safari blocks the keyboard on Async call of focus. More info here #3719 (comment).
    So I think we won't be able to do it at the moment. Let me know what do you think here.

  16. Jag96 commented on Jun 23, 2021

    @Jag96
    Contributor

    Let me know what do you think here.

    Thanks for the context, I agree we can leave it as is then since it only affects Safari on iOS 👍. Closing

  17. changed the title [-]Emoji Picker is slow to add emoji on Native Platforms and doesn't pull up the keyboard afterwards[/-] [+][HOLD for payment June 27] Emoji Picker is slow to add emoji on Native Platforms and doesn't pull up the keyboard afterwards[/+] on Jun 23, 2021
  18. Jag96 commented on Jun 23, 2021

    @Jag96
    Contributor

    And reopening to keep track of payment 😄

  19. reopened this on Jun 23, 2021
  20. Jag96 commented on Jun 29, 2021

    @Jag96
    Contributor

    Paid!

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

Metadata

Metadata

Labels

EngineeringExternalAdded to denote the issue can be worked on by a contributorImprovementItem broken or needs improvement.ReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions