Skip to content

[HOLD for payment 2022-07-15] [$250] Emoji Search Bar focus indicator is missing - reported by Santhoshkumar Sellavel #9410

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

Closed
mvtglobally opened this issue Jun 13, 2022 · 26 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@mvtglobally
Copy link

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Open new Expensify in web/desktop
  2. Open any chat
  3. Click on the emoji icon in the composer
  4. Enter the search input

Expected Result:

Search input has a focus indicator, like other search inputs

Actual Result:

Search input has no focus indicator.

Workaround:

unknown

Platform:

Where is this issue occurring?

  • Web
  • Desktop App

Version Number: 1.1.76-0
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

Expensify/Expensify Issue URL:

Screen.Recording.2022-05-21.at.2.48.45.AM.mov

Issue reported by: @Santhosh-Sellavel
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1653082016688519

View all open jobs on GitHub

@mvtglobally mvtglobally added AutoAssignerTriage Auto assign issues for triage to an available triage team member Daily KSv2 labels Jun 13, 2022
@melvin-bot
Copy link

melvin-bot bot commented Jun 13, 2022

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

@melvin-bot melvin-bot bot removed the AutoAssignerTriage Auto assign issues for triage to an available triage team member label Jun 13, 2022
@Puneet-here
Copy link
Contributor

Proposal

We can make a state isFocused and we can make it true at onFocus and false at onBlur

<Composer
textAlignVertical="top"
placeholder={this.props.translate('common.search')}
placeholderTextColor={themeColors.textSupporting}
onChangeText={this.filterEmojis}
style={styles.textInput}

we need to use it like this:

onFocus={() => this.setState({isFocused: true})}
onBlur={() => this.setState({isFocused: false})}

now we have to use isFocused to change border color. We can do that by using the below line at composer

 style={[styles.textInput, this.state.isFocused && styles.borderColorFocus]}

@Harshdeepjoshi
Copy link
Contributor

Harshdeepjoshi commented Jun 13, 2022

Proposal

we should use TextInput instead of Composer as Composer is intended to compose messages and should not be used in this place.

<Composer
textAlignVertical="top"
placeholder={this.props.translate('common.search')}
placeholderTextColor={themeColors.textSupporting}
onChangeText={this.filterEmojis}
style={styles.textInput}

we should do

<TextInput 
textAlignVertical="top" 
placeholder={this.props.translate('common.search')} 
placeholderTextColor={themeColors.textSupporting} 
onChangeText={this.filterEmojis} 
style={styles.textInput}

Doing this would solve the issue but will alter the height of the input field slightly, but it would be the same as all the other input fields so I think this would not be a problem but, it could be changed if necessary.

@MitchExpensify
Copy link
Contributor

This would be consistent but I'm not sure it adds much value, do you think this change is worth it in the name of consistency @michelle-thompson ?

@michelle-thompson
Copy link
Contributor

Hmm, not sure what would be best here so adding Engineering label here!

1 similar comment
@michelle-thompson
Copy link
Contributor

Hmm, not sure what would be best here so adding Engineering label here!

@melvin-bot
Copy link

melvin-bot bot commented Jun 14, 2022

Triggered auto assignment to @TomatoToaster (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@MitchExpensify MitchExpensify removed their assignment Jun 15, 2022
@TomatoToaster
Copy link
Contributor

I think it's worth fixing this - it's definitely a small visual change but it feels like it would look better. I'm not on the management team so I'll let an engineer from there review the proposals and confirm this is worth it.

@TomatoToaster TomatoToaster added the External Added to denote the issue can be worked on by a contributor label Jun 16, 2022
@melvin-bot
Copy link

melvin-bot bot commented Jun 16, 2022

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

@TomatoToaster TomatoToaster removed their assignment Jun 16, 2022
@Christinadobrzyn Christinadobrzyn changed the title Emoji Search Bar focus indicator is missing - reported by Santhoshkumar Sellavel [$250] Emoji Search Bar focus indicator is missing - reported by Santhoshkumar Sellavel Jun 16, 2022
@Christinadobrzyn
Copy link
Contributor

@melvin-bot
Copy link

melvin-bot bot commented Jun 16, 2022

Triggered auto assignment to Contributor-plus team member for initial proposal review - @Santhosh-Sellavel (Exported)

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 16, 2022
@melvin-bot
Copy link

melvin-bot bot commented Jun 16, 2022

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

@Santhosh-Sellavel
Copy link
Collaborator

Open for new proposals.

@Harshdeepjoshi
Copy link
Contributor

@Santhosh-Sellavel Please share your reviews on this proposal.

@liyamahendra
Copy link
Contributor

Proposal

Problem

The Composer is not having the styles.borderColorFocus assigned to it.

Solution

  • Add highlightComposer: false, to the state to keep track of whether the Composer is focused or not.
  • Add onFocus and onBlur event handler to the composer to update the highlightComposer state variable.
  • Set the style on the Composer based on the highlightComposer state variable.

Code changes:

this.state = {
    filteredEmojis: this.emojis,
    headerIndices: this.unfilteredHeaderIndices,
    highlightedIndex: -1,
    arePointerEventsDisabled: false,
    highlightComposer: false,
    selection: {
        start: 0,
        end: 0,
    },
};
<Composer
    textAlignVertical="top"
    placeholder={this.props.translate('common.search')}
    placeholderTextColor={themeColors.textSupporting}
    onChangeText={this.filterEmojis}
    onFocus={() => this.setState({highlightComposer: true})}
    onBlur={() => this.setState({highlightComposer: false})}
    style={[styles.textInput, this.state.highlightComposer && styles.borderColorFocus]}
    defaultValue=""
    ref={el => this.searchInput = el}
    autoFocus
    selectTextOnFocus={this.state.selectTextOnFocus}
    onSelectionChange={this.onSelectionChange}
/>

Screencast:

screencast.2022-06-18.19-20-35.mp4

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jun 18, 2022
@Puneet-here
Copy link
Contributor

@Santhosh-Sellavel, can you review my proposal ?

@Luke9389
Copy link
Contributor

@liyamahendra's proposal is just restating @Puneet-here's from above.
Also @Santhosh-Sellavel can you give a written explanation (even just a short one) when you 👎 proposals, please?
Contributors need to know why their work is not accepted in order to improve.

@Santhosh-Sellavel
Copy link
Collaborator

On @Harshdeepjoshi proposal,

Doing this would solve the issue but will alter the height of the input field slightly.

Not on board with changing the component itself as it might cause unexpected regressions. So gave 👎

Sorry, somehow I missed @Puneet-here's comment!
@liyamahendra's Proposal is the same as Puneet's.

So I like @Puneet-here Proposal here. Looks good to me!
🎀 👀 🎀 C+ reviewed

cc: @Luke9389

@Luke9389
Copy link
Contributor

OK cool, go ahead ands start a PR @Puneet-here!

@Luke9389
Copy link
Contributor

Now that this is assigned I'm going to bump it down to weekly.

@Luke9389 Luke9389 added Weekly KSv2 and removed Daily KSv2 labels Jun 21, 2022
@Christinadobrzyn
Copy link
Contributor

Hired in Upwork

@Christinadobrzyn Christinadobrzyn removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 21, 2022
@Puneet-here
Copy link
Contributor

The PR is ready
cc: @Luke9389 @Santhosh-Sellavel

@melvin-bot melvin-bot bot added the Overdue label Jun 29, 2022
@Luke9389
Copy link
Contributor

I'll let @Santhosh-Sellavel do the initial review.

@melvin-bot melvin-bot bot removed the Overdue label Jun 30, 2022
@Santhosh-Sellavel
Copy link
Collaborator

@Luke9389 PR is already merged

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jul 8, 2022
@melvin-bot melvin-bot bot changed the title [$250] Emoji Search Bar focus indicator is missing - reported by Santhoshkumar Sellavel [HOLD for payment 2022-07-15] [$250] Emoji Search Bar focus indicator is missing - reported by Santhoshkumar Sellavel Jul 8, 2022
@melvin-bot
Copy link

melvin-bot bot commented Jul 8, 2022

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.1.79-17 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 2022-07-15. 🎊

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jul 14, 2022
@Christinadobrzyn
Copy link
Contributor

Looks like no regressions.
Paid
@Puneet-here for the fix
@Santhosh-Sellavel as the C+ with a $250 bonus for reporting

closing job and this GH.

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 Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

10 participants