Skip to content

[Due for payment 2025-09-02] Remove keyboard handling logic on native platforms #68644

Closed

Description

@mountiny

coming from here

Background

SearchList(used on the Reports page) includes custom logic that allows user to navigate through list items with keyboard arrow keys(this is implemented with useArrowKeyFocusManager, useKeyboardShortcut, useIsFocused, etc.). While this functionality is useful for web and desktop platforms that support external keyboards, it is not applicable to mobile platforms.

Problem

Custom logic for keyboard handling on SearchList adds additional overhead on platforms that don't use the keyboard and don't need this logic(iOS/Android). According to my measurments this can cause as much as 200 ms of overhead on Android.

Solution

Remove keyboard handling logic on native platforms:

  1. Split SearchList implementation into index.tsx and index.native.tsx.
  2. Remove the keyboard handling logic from index.native.tsx(and make sure no code duplication between index.tsx and index.native exists).
    Alternatively we can create a wrapper for SearchList that adds keyboard handling for the web/desktop and does nothing for native(also with the usage of index/index.native).

Benefits
I've measured total react work in ms and commits when entering Reports page on Android, here are the results:
Before Optimization

  • Total render time: ~2160 ms
  • Commits: ~20

After Optimization

  • Total render time: ~1980 ms - 9% better
  • Commits: ~19
Issue OwnerCurrent Issue Owner: @dylanexpensify

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Aug 18, 2025
  2. melvin-bot commented on Aug 18, 2025

    @melvin-bot

    Triggered auto assignment to @dylanexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  3. vnvianna commented on Aug 18, 2025

    @vnvianna
    Contributor
  4. linhvovan29546 commented on Aug 22, 2025

    @linhvovan29546
    Contributor

    @mountiny @dylanexpensify Could you please assign me here? Since i reviewed this PR #68455 (comment)

  5. 13 remaining items

  6. melvin-bot commented on Sep 2, 2025

    @melvin-bot

    Payment Summary

    Upwork Job

    • ROLE: @linhvovan29546 paid $(AMOUNT) via Upwork (LINK)
    • Contributor: @SzymczakJ is from an agency-contributor and not due payment

    BugZero Checklist (@dylanexpensify)

    • (if NewFeature) I have created a PR for any necessary HelpDot updates, or I confirmed no updates are necessary.
    • I have verified the correct assignees and roles are listed above and updated the necessary 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 verified the PR was not reverted
    • I have applied any discounts due to bugs/regressions introduced by this PR
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  7. melvin-bot commented on Sep 3, 2025

    @melvin-bot

    @dylanexpensify Huh... This is 4 days overdue. Who can take care of this?

  8. melvin-bot commented on Sep 5, 2025

    @melvin-bot

    @dylanexpensify Still overdue 6 days?! Let's take care of this!

  9. melvin-bot commented on Sep 9, 2025

    @melvin-bot

    @dylanexpensify 10 days overdue. Is anyone even seeing these? Hello?

  10. melvin-bot commented on Sep 11, 2025

    @melvin-bot

    @dylanexpensify 12 days overdue now... This issue's end is nigh!

  11. melvin-bot commented on Sep 15, 2025

    @melvin-bot

    This issue has not been updated in over 14 days. @mountiny, @dylanexpensify, @linhvovan29546, @SzymczakJ eroding to Weekly issue.

  12. linhvovan29546 commented on Sep 16, 2025

    @linhvovan29546
    Contributor

    @dylanexpensify Could you please handle payment? Thank you!

  13. changed the title [-][Due for payment 2025-09-02] [HOLD for payment 2025-08-28] Remove keyboard handling logic on native platforms[/-] [+][Due for payment 2025-09-02] Remove keyboard handling logic on native platforms[/+] on Sep 16, 2025
  14. dylanexpensify commented on Sep 18, 2025

    @dylanexpensify
    Contributor

    Payment summary:

    Contributor+: @linhvovan29546 $250 via NewDot

    Please apply/request!

  15. dylanexpensify commented on Sep 18, 2025

    @dylanexpensify
    Contributor

    @linhvovan29546 please apply here!

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.WeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions