Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input switch between focus and blurr state on click & label is selected with respect to input text #4515

Closed
parasharrajat opened this issue Aug 9, 2021 · 45 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@parasharrajat
Copy link
Member

parasharrajat commented Aug 9, 2021

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 Profile Page.
  2. Click on the First name input.
  3. Now click on the First Name label over it. You should see that input is losing focus and then regaining it.
  4. Now click on the text on the input.
  5. Now click on the empty area on the right side of First Name label inside the whole blue box.
  6. You should see that input is losing focus and then regaining it..

Expected Result:

Already focused input should not switch between focused and blur state. the label should be static after the first focus. label text should not be selectable.

Actual Result:

Input switch between blur and focused state. Label text is selectable.

Workaround:

None. UI glitch

Platform:

Where is this issue occurring?

  • Web
  • Desktop App

Version Number:
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

input-lag.mp4

Expensify/Expensify Issue URL:

View all open jobs on Upwork

view this job

@parasharrajat parasharrajat added AutoAssignerTriage Auto assign issues for triage to an available triage team member Daily KSv2 labels Aug 9, 2021
@MelvinBot
Copy link

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

@MelvinBot MelvinBot removed the AutoAssignerTriage Auto assign issues for triage to an available triage team member label Aug 9, 2021
@AlfredoAlc
Copy link
Contributor

PROPOSAL

  1. Make the label text not selectable: Set selectable prop of Animated.Text to false.

const ExpensiTextInputLabel = ({
label,
labelTranslateY,
labelTranslateX,
labelScale,
}) => (
<Animated.Text
style={[
styles.expensiTextInputLabel,
styles.expensiTextInputLabelDesktop,
styles.expensiTextInputLabelTransformation(
labelTranslateY,
labelTranslateX,
labelScale,
),
]}
>
{label}
</Animated.Text>
);

  1. To prevent the TextInput to switch between blur and focus, it needs to change some styling:
  • In expensiTextInputLabel, setting the zIndex prop to -1, to keep from interfering with TextInput area.

    App/src/styles/styles.js

    Lines 514 to 522 in 75a1fe0

    expensiTextInputLabel: {
    position: 'absolute',
    left: 12,
    top: 14,
    fontSize: variables.fontSizeNormal,
    color: themeColors.textSupporting,
    fontFamily: fontFamily.GTA,
    width: '100%',
    },
  • Change expensiTextInputContainer padding props to expensiTextInput.

    App/src/styles/styles.js

    Lines 502 to 513 in 75a1fe0

    expensiTextInputContainer: {
    flex: 1,
    borderWidth: 1,
    borderRadius: variables.componentBorderRadiusNormal,
    borderColor: themeColors.border,
    paddingTop: 25,
    paddingBottom: 8,
    paddingHorizontal: 12,
    justifyContent: 'center',
    height: '100%',
    backgroundColor: themeColors.componentBG,
    },

The area of the TextInput is limited by the padding of the TouchableWithoutFeedback which is what triggers focus on the TextInput, by passing that padding into the TextInput style, the styling is the same but the area of the TextInput increases at the same size of the container.

This is the area of the TextInput (Black border), that is why if the user clicks somewhere outside this area, blur is called.

Screen Shot 2021-08-10 at 15 36 17

By moving the padding props from TouchableWithoutFeedback to TextInput, the area will be the following (Black border).

Screen Shot 2021-08-10 at 15 37 55

Screen Shot 2021-08-10 at 15 38 07

@conorpendergrast
Copy link
Contributor

@parasharrajat I'm struggling to reproduce this one too! I'm on web app Staging (v1.0.83-1) and It looks like I'm seeing something different. Is the account you're seeing this on a beta that I can add?

2021-08-11_14-10-24

@parasharrajat
Copy link
Member Author

@conorpendergrast Sorry, it's a little early. This is yet to be deployed to staging.

@MelvinBot
Copy link

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

@MelvinBot
Copy link

@parasharrajat 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

@MelvinBot
Copy link

@parasharrajat 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!

@parasharrajat
Copy link
Member Author

parasharrajat commented Aug 20, 2021

I am sure about the process anymore. cc: @mallenexpensify .
I used to think that proposals should be submitted after the task is triaged but that is not the case anymore and why the engineer was removed from this issue.

@MelvinBot MelvinBot removed the Overdue label Aug 20, 2021
@mallenexpensify
Copy link
Contributor

@parasharrajat , right now it's still in the triage state because Conor wasn't able to reproduce. After triage it goes to our general Engineering pool to see if the issue can be worked on by an External contributor. The it's assigned to a Contributor Manager (CM) to post to upwork then a Contributor Manager Engineer (CME ) is assigned to review proposals.
Is the issue reproducible on staging and/or production now?

@parasharrajat
Copy link
Member Author

Yes, it is reproducible on Staging.

@MelvinBot
Copy link

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

@mallenexpensify
Copy link
Contributor

@parasharrajat I'm still unable to reproduce on web-staging. Should I be doing something else?

2021-08-25_08-07-24.mp4

@parasharrajat
Copy link
Member Author

Look at the Video https://user-images.githubusercontent.com/24370807/128778144-f822a3e3-7596-4efc-a97b-d441fb746719.mp4 @mallenexpensify

I am clicking on the label and you can also try clicking the empty area next to the label.

@MelvinBot MelvinBot removed the Overdue label Aug 25, 2021
@mallenexpensify
Copy link
Contributor

I see it in your vid, is that web? If so, what browsers? and... can you confirm you're on staging?
I tried firefox and chrome on staging and was unable to reproduce

@parasharrajat
Copy link
Member Author

@mallenexpensify I found this on staging v1.0.86-10 Web firefox/It's also on chrome.

input.mp4

@MelvinBot
Copy link

@parasharrajat Eep! 4 days overdue now. Issues have feelings too...

@mallenexpensify mallenexpensify changed the title Input switch between focus and blurr state on click & label is selected with respect to input text [HOLD for reproduction] Input switch between focus and blurr state on click & label is selected with respect to input text Aug 30, 2021
@mallenexpensify mallenexpensify added Weekly KSv2 and removed Daily KSv2 labels Aug 30, 2021
@MelvinBot MelvinBot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 6, 2021
@parasharrajat
Copy link
Member Author

I would be reviewing PR for this issue @timszot and update on the PR if that is ready for final review or merge.

@mallenexpensify mallenexpensify self-assigned this Oct 8, 2021
@timszot
Copy link
Contributor

timszot commented Oct 14, 2021

PR caused a regression, it's being worked on still, not overdue.

@parasharrajat
Copy link
Member Author

PR caused another regression #5704 (comment).

@botify botify added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Oct 23, 2021
@botify
Copy link

botify commented Oct 23, 2021

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

If no regressions arise, payment will be issued on 2021-10-30. 🎊

@botify botify changed the title Input switch between focus and blurr state on click & label is selected with respect to input text [HOLD for payment 2021-10-30] Input switch between focus and blurr state on click & label is selected with respect to input text Oct 23, 2021
@botify botify added Weekly KSv2 and removed Weekly KSv2 labels Oct 28, 2021
@botify botify changed the title [HOLD for payment 2021-10-30] Input switch between focus and blurr state on click & label is selected with respect to input text [HOLD for payment 2021-11-04] [HOLD for payment 2021-10-30] Input switch between focus and blurr state on click & label is selected with respect to input text Oct 28, 2021
@botify
Copy link

botify commented Oct 28, 2021

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

If no regressions arise, payment will be issued on 2021-11-04. 🎊

@mallenexpensify
Copy link
Contributor

Paid @AlfredoAlc $250 in Upwork.
@parasharrajat should you be compensated for reporting the issue? I think so... but we've updated a process a lot the past three months :)

@parasharrajat
Copy link
Member Author

@mallenexpensify Yes, I think I should be.

@mallenexpensify mallenexpensify changed the title [HOLD for payment 2021-11-04] [HOLD for payment 2021-10-30] Input switch between focus and blurr state on click & label is selected with respect to input text Input switch between focus and blurr state on click & label is selected with respect to input text Nov 2, 2021
@mallenexpensify
Copy link
Contributor

@parasharrajat , can you apply here then comment on this GH and I'll get you paid. Thanks

@parasharrajat
Copy link
Member Author

@mallenexpensify Done.

@mallenexpensify
Copy link
Contributor

Hired @parasharrajat , let me know once you've accepted and I'll pay (can't wait for this process to be more streamlined, should be soon)

@parasharrajat
Copy link
Member Author

@mallenexpensify Done.

@mallenexpensify
Copy link
Contributor

Paid @parasharrajat in Upwork, closing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
None yet
Development

No branches or pull requests