Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.16k stars 2.64k forks source link

[HOLD for payment 2023-05-23] [$1000] Chat - The cursor absent in the chat input field #17187

Closed kbecciv closed 1 year ago

kbecciv commented 1 year ago

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. Open the App
  2. Login with any account
  3. Open any different chats one by one

Expected Result:

The cursor present in input field.

Actual Result:

The cursor is sometimes present, but in most cases absent in the chat input field.

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

Version Number: 1.2.97.2

Reproducible in staging?: Yes

Reproducible in production?: Yes

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

Notes/Photos/Videos: Any additional supporting documentation

https://user-images.githubusercontent.com/93399543/230912246-4a6bd626-ef64-4281-8b3f-b9668cdedf95.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~010ec7a699a5894775
  • Upwork Job ID: 1645416218945282048
  • Last Price Increase: 2023-05-02
0xmiroslav commented 1 year ago

this.props.isKeyboardShown what's this for? why should this be added to autofocus condition?

hoangzinh commented 1 year ago

@0xmiroslav I was completely wrong when adding check this.props.isKeyboardShown. Please ignore it. After consider, I reverted my proposal back to only check !DeviceCapabilities.canUseTouchScreen(). It might not cover the case of laptop touch screen but I couldn't think out better solution. If we want to support this case, there are 2 not good options are:

But I think !DeviceCapabilities.canUseTouchScreen() are good enough for us atm.

melvin-bot[bot] commented 1 year ago

@flodnv @bfitzexpensify @0xmiroslav this issue is now 4 weeks old and preventing us from maintaining WAQ, can you:

Thanks!

melvin-bot[bot] commented 1 year ago

Current assignee @0xmiroslav is eligible for the Internal assigner, not assigning anyone new.

flodnv commented 1 year ago

@0xmiroslav I think @hoangzinh's latest proposal looks good to me: https://github.com/Expensify/App/issues/17187#issuecomment-1513523839

Do you agree?

sakluger commented 1 year ago

@0xmiroslav thanks I think you're right! Closing this one.

sakluger commented 1 year ago

Whoops, wrong issue, sorry about that!

0xmiroslav commented 1 year ago

@dukenv0307 was the first to provide that solution

@dukenv0307 your root cause is correct but solution is not 100%. input will not be auto-focused on touchable laptops.

This was my concern and I hesitated to approve proposal. @flodnv do you think we can skip this case?

flodnv commented 1 year ago

I think it's fine to be honest.

However,

input will not be auto-focused on touchable laptops.

Are we sure about this? If yes, do we not have something that can tell us if we're in a touchable laptop?

0xmiroslav commented 1 year ago

I am not sure about that to be honest. As I don't have touchable laptop, no way to test 😄

flodnv commented 1 year ago

Why do we have the platform inconsistency where we auto focus on touchable devices? Do you know?

When is the input auto focused? I am kinda getting lost...

flodnv commented 1 year ago

I've looked around the blame and got even more lost. My recommendation may be to remove the platform differences. Can we simplify this autoFocus logic and make it work the same everywhere? Something like: !this.props.modal.isVisible && this.isEmptyChat?

0xmiroslav commented 1 year ago

I haven't found link but I remember discussion where autofocus always on web but not on mobile because when keyboard opened, chat view is too small and hard to read previous messages.

0xmiroslav commented 1 year ago

I think input is always autofocused these cases:

flodnv commented 1 year ago

devices where keyboard doesn't show

What does this mean? Like my Android phone?

Can we just change this code so that we auto focus the input when it's a new chat and call it a day?

0xmiroslav commented 1 year ago

We should always autofocus on web no matter it's new chat or old. If needed, we can open wider discussion for the expected behavior

0xmiroslav commented 1 year ago

This is actually a regression from https://github.com/Expensify/App/pull/14230 and we can just revert this line change to fix this issue which is @dukenv0307's proposal.

flodnv commented 1 year ago

Ok, hopefully you're right, let's do that then. cc @bondydaa

flodnv commented 1 year ago

Why isn't the automation working?

melvin-bot[bot] commented 1 year ago

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

melvin-bot[bot] commented 1 year ago

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

melvin-bot[bot] commented 1 year ago

📣 @dukenv0307 You have been assigned to this job by @flodnv! Please apply to this job in Upwork and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻 Keep in mind: Code of Conduct | Contributing 📖

melvin-bot[bot] commented 1 year ago

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

dukenv0307 commented 1 year ago

@0xmiroslav @flodnv The PR is ready to review.

melvin-bot[bot] commented 1 year ago

Reviewing label has been removed, please complete the "BugZero Checklist".

melvin-bot[bot] commented 1 year ago

The solution for this issue has been :rocket: deployed to production :rocket: in version 1.3.14-14 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-05-23. :confetti_ball:

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

melvin-bot[bot] commented 1 year ago

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:

bfitzexpensify commented 1 year ago

All payments issued. @0xmiroslav please complete the BugZero checklist https://github.com/Expensify/App/issues/17187#issuecomment-1550461040 - thanks!

0xmiroslav commented 1 year ago

This was caught by Applause team so no further regression test step is needed.

bfitzexpensify commented 1 year ago

Great, let's close this out. Thanks for the work here everyone!