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.35k stars 2.77k forks source link

[HOLD for #37437][$2000] Pressing `space` 2 times `.` appears in display name #17153

Open kavimuru opened 1 year ago

kavimuru 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. Go to iOS settings > iPhone Settings >> General >> Keyboards > toggle on "." Shortcut
  2. Open the ios mobile app or iOS Safari or Mac Desktop Chrome
  3. Tap Setting > Profile
  4. Tap Display Name remove name
  5. Write new text and press space button 2 times and see the result (the "." shortcut doesn't work even though it's enabled)

Expected Result:

if "." shortcut is enabled, the shortcut should work when tapping the space 2 times

Actual Result:

if "." shorcut is enabled, the shortcut doesn't work when tapping the space 2 times

Workaround:

unknown

Platforms:

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

Version Number: 1.2.96-4 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 Notes/Photos/Videos: Any additional supporting documentation

https://user-images.githubusercontent.com/43996225/230680037-97e38841-3890-4671-a905-6757633be3f0.mp4

https://user-images.githubusercontent.com/43996225/230680041-a8b718bc-2575-43d1-9d83-dc2662c3094a.mp4

https://user-images.githubusercontent.com/43996225/230680087-d94f2354-2a45-498a-9705-f9f691ea13e3.MP4

Expensify/Expensify Issue URL: Issue reported by: @harshad2711 Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1680851400066889

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0194127eb40345b2ea
  • Upwork Job ID: 1646595046183731200
  • Last Price Increase: 2023-04-20
MelvinBot commented 1 year ago

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

MelvinBot commented 1 year ago

Bug0 Triage Checklist (Main S/O)

PrashantMangukiya commented 1 year ago

This is not issue. This is iOS keyboard specific features.

Follow this Steps to Disable It: Go to iPhone Settings >> General >> Keyboards >>

You will see this screen, So disable "." Shortcut settings as show below, It will solve the problem. IMG_5909

MelvinBot commented 1 year ago

@Christinadobrzyn Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

Christinadobrzyn commented 1 year ago

Thanks @PrashantMangukiya! I'll reach out in the slack chat to see if we can do some more testing - https://expensify.slack.com/archives/C049HHMV9SM/p1681247093995989?thread_ts=1680851400.066889&cid=C049HHMV9SM

Christinadobrzyn commented 1 year ago

did some testing and updated the OP - asking for a quick review to make sure I understand correctly - https://expensify.slack.com/archives/C049HHMV9SM/p1681334171519149?thread_ts=1680851400.066889&cid=C049HHMV9SM

MelvinBot commented 1 year ago

Job added to Upwork: https://www.upwork.com/jobs/~0194127eb40345b2ea

MelvinBot commented 1 year ago

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

Christinadobrzyn commented 1 year ago

Updated OP based on Slack chat - I think this can be External.

MelvinBot commented 1 year ago

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

MelvinBot commented 1 year ago

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

MelvinBot commented 1 year ago

@chiragsalian, @Christinadobrzyn, @0xmiroslav Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

hasebsiddiqui commented 1 year ago

https://github.com/facebook/react-native/issues/27693

Christinadobrzyn commented 1 year ago

Looks like we're waiting on more proposals

MelvinBot commented 1 year ago

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

MelvinBot commented 1 year ago

Upwork job price has been updated to $2000

Christinadobrzyn commented 1 year ago

Raised price to $2000

PrashantMangukiya commented 1 year ago

@Christinadobrzyn @chiragsalian @0xmiroslav I think this is working as expected in our app and there is no issue.

Here is what happen, When you tap space twice at the end of sentence it will put "." Now delete that dot and tap space twice again it will not put dot.

Add some text and tap space twice it will put "." Now delete that dot and tap space twice again it will not put dot.

Add some text and tap space twice it will put "." Now delete that dot and tap space twice again it will not put dot.

Repeat this step, it will show same behaviour.

I tested it within message app. This is expected behaviour, it looks like there is not any issue in our app. Below is the video for comparison.

Expensify App

https://user-images.githubusercontent.com/7823358/233493871-7b6aceaf-c00f-46b1-a684-dda02288b526.mov

Message App

https://user-images.githubusercontent.com/7823358/233494889-9c5bf7b4-164e-4563-98a9-0f1690427c98.mov

Thank you.

Christinadobrzyn commented 1 year ago

Thanks for reviewing @PrashantMangukiya! To confirm, do you have "." enabled or disabled in the iOS settings?

PrashantMangukiya commented 1 year ago

Thanks for reviewing @PrashantMangukiya! To confirm, do you have "." enabled or disabled in the iOS settings?

@Christinadobrzyn Yes "." enabled in the iOS keyboards settings.

Christinadobrzyn commented 1 year ago

ah okay! I'll close this for now. Thank you so much for your help looking into this!

harshad2711 commented 1 year ago

@Christinadobrzyn Why did you close this bug, I still have a problem

harshad2711 commented 1 year ago

https://user-images.githubusercontent.com/123926740/233534492-095b75f8-a3ea-4a2a-93e2-b7dac47d4b3f.MOV

See this @Christinadobrzyn @PrashantMangukiya

PrashantMangukiya commented 1 year ago

@Christinadobrzyn I think what @harshad2711 said in above comment is correct for iOS native.

In fact what I noticed is, in iOS Safari it shows dot upon double space. But in iOS Native it is does not show, wired behaviour. i.e. three dot works on iOS Safari but not iOS native. I think we should re-open issue to make it working for iOS Native also. Sorry for the confusion.

iOS Native (Dot Not Working)

https://user-images.githubusercontent.com/7823358/233536734-ad486aad-18ca-491f-b86a-fd6e312959bf.MP4

iOS Safari (Dot Working)

https://user-images.githubusercontent.com/7823358/233536839-8ff4a215-a16a-4eb2-b9f2-99acb04dd88b.MP4

chiragsalian commented 1 year ago

Yup reopening, looks like a legit bug

harshad2711 commented 1 year ago

Thank you😃

MelvinBot commented 1 year ago

@chiragsalian, @Christinadobrzyn, @0xmiroslav Whoops! This issue is 2 days overdue. Let's get this updated quick!

Christinadobrzyn commented 1 year ago

Looks like we're waiting on some proposals.

MelvinBot commented 1 year ago

📣 @mohamedwshams! 📣

Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:

  1. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  2. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  3. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.

Screen Shot 2022-11-16 at 4 42 54 PM

Format:

Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
gedu commented 1 year ago

Hey, hey, I am from Callstack - expert contributor group, I can take a look

MelvinBot commented 1 year ago

📣 @gedu You have been assigned to this job by @chiragsalian! 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 📖

chiragsalian commented 1 year ago

Assigned the issue over to you @gedu

gedu commented 1 year ago

Still looking into this, my current findings are:

Seems that if we don't use the value prop from TextInput, the double-tapping space works, it adds the dot.

Here I start debugging the Bridge and if I don't use the value from Native it sends the . after the second space

textInput_no_value_prop

But when I add the value prop, Native doesn't send the . after the second space.

textInput_value_prop

I will need to dig deeper, I will start looking at react-native TextInput source code and see what happens with the value prop at that level.

gedu commented 1 year ago

Didn't have the time today to take a deeper look, I'm almost finishing the other task, as soon as I finished I continue with this one

Christinadobrzyn commented 1 year ago

Still investigating, please feel free to provide more of an update when you have one @gedu!

gedu commented 1 year ago

Tomorrow will make some time to look at this

gedu commented 1 year ago

New finding. if we use the prop value the double-space won't work, because of some logic that is given in RCTSinglelineTextInputView.

textInput_value_NO_multiline

(Here are some of the steps, the dot isn't added)

But if we add the prop multiline (to be true) internally it uses RCTMultilineTextInputView and it works (even with the prop value)

textInput_value_multiline

(Here are some steps that and it adds the dot)

Internally they use an Input adapter RCTBackedTextFieldDelegateAdapter, which is different for each, and it differs in some small flows. I couldn't find the main diff between them, so I will keep looking.

Note: Seems that using multiline works on every environment

melvin-bot[bot] commented 1 year ago

@gedu @chiragsalian @Christinadobrzyn @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.

Christinadobrzyn commented 1 year ago

Not sure what we need to do next for this to stay on schedule. @0xmiroslav or @chiragsalian would you have some insights into what to do next?

0xmiros commented 1 year ago

We're still waiting for @gedu's final proposal. No other actions needed to be taken.

gedu commented 1 year ago

Hey, still digging into this, because adding multiline to all our inputs I don't think is a good solution, I wanna track what are the differences between RCTSinglelineTextInputView and RCTMultilineTextInputView so maybe I can come up with a final proposal.

gedu commented 1 year ago

Hey, trying to wrap another task, as soon as I finish I will continue here

gedu commented 1 year ago

Hey, still couldn't find the time to take a look, but found that is something that was already asked but closed. I will make some time tomorrow to take a look

gedu commented 1 year ago

Hey today I've been checking more about how the native inputs behave on iOS, Still couldn't find the right path, I will start doing a flow chart to see in which steps Multiline and Single line differ and also create an issue on react-native GH so I can get some inputs from them and probably they can guide me.

gedu commented 1 year ago

Looking into this a bit further, it could be something related to the autocorrect but not sure, so I created an issue on react-native: https://github.com/facebook/react-native/issues/37437

This will take longer than expected, can we change the label to weekly? @Christinadobrzyn

strepanier03 commented 1 year ago

👋 hey, quick note that we should keep all e/app GHs as daily unless they have "Hold" in the title. I'm going to flip this back to daily as I'm doing the resync and it's step in the SO process guide.

gedu commented 1 year ago

I did some deeper investigation and created an Objective-C project to test the different behaviors, I could set and understand better the flow of the UITextField used by Singleline component. Also trying to get in touch with some devs in Meta/FB so I can get my issue reviewed or get some help

gedu commented 1 year ago

Ok I think I found a fix for it

The issue:

It appears that when the value prop is not set in the SinglelineTextInput component, an internal state is established only once. However, when the value prop is set, the internal updateState method is invoked at least twice. Interestingly, after the first invocation, the state remains unchanged. This repeated execution of the updateState method disrupts the expected double-tapping behavior since the double-space input does not occur consistently.

To address this issue, I am currently conducting tests. It seems that preventing the updateState method from being executed multiple times will resolve the problem and restore the desired functionality.

gedu commented 1 year ago

I run some tests, and seems to be working, I'm discussing a proposal internally