Skip to content

[HOLD for payment 2021-12-27] Add support for Frequently/Recently Used Emojis #4559

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
mananjadhav opened this issue Aug 11, 2021 · 64 comments
Closed
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@mananjadhav
Copy link
Collaborator

mananjadhav commented Aug 11, 2021

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


With respect to comment #4456 (comment), adding this issue.

Action Performed:

  1. Click on Chat
  2. Open Emoji Picker

Expected Result:

There should be an option to see Recently used or Frequently used Emojis.

Actual Result:

No option to use recently used/frequently used Emojis.
image

Workaround:

User has to find the Emoji and enter again

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

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

View all open jobs on Upwork

Upwork job: https://www.upwork.com/jobs/~010528886766f948f5

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

Triggered auto assignment to @sonialiap (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 11, 2021
@mananjadhav
Copy link
Collaborator Author

Proposal

We should have additional category Frequently Used and/or Recently Used emojis.

It could have a set of default emojis in the list by default if we choose to keep Frequently used. Based on the user behavior we can sync this with Onyx and ensure that it available for the user to use. I don't think it is necessary to sync it across devices, but can be discussed.

Changes:

An additional FlatList in EmojiPicker with a recentEmojis

<FlatList
	ref={el => this.recentEmojiList = el}
	data={this.state.recentEmojis}
	renderItem={this.renderItem}
	keyExtractor={item => `emoji_picker_${item.code}`}
	numColumns={this.numColumns}
	style={styles.emojiPickerList}
	extraData={[this.state.filteredEmojis, this.state.highlightedRecentIndex]}
	stickyHeaderIndices={this.state.headerIndices}
	onScroll={e => this.currentScrollOffset = e.nativeEvent.contentOffset.y}
/>	

Extend onEmojiSelected/addEmojiToTextBox to add recently used emojis. We can restrict the maximum number of emojis for this category.

addEmojiToTextBox(emoji) {
	
	if(recentEmojis.length >= maxAllowedRecent) {
		recentEmojis.splice(-1)
	}
	recentEmojis.unshift(emoji);

	Onyx.set(ONYXKEYS.RECENT_EMOJIS, recentEmojis);

	// existing code

}

For frequently used, the logic would differ. We would have to somehow manage a counter { 1faa: 10, 1f78: 45, ...}. The logic of the map would also change as we would then add based on the counter.

Apple adds to the list by using both - Recently used anf Frequently used. Your frequently used appear first and then your recently used. A combined list could also work for us.

@MelvinBot
Copy link

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

@MelvinBot
Copy link

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

@sonialiap sonialiap removed their assignment Aug 18, 2021
@MelvinBot MelvinBot removed the Overdue label Aug 18, 2021
@MelvinBot
Copy link

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

@sonialiap

This comment has been minimized.

@timszot timszot removed their assignment Aug 19, 2021
@timszot timszot added the External Added to denote the issue can be worked on by a contributor label Aug 19, 2021
@MelvinBot
Copy link

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

@Expensify Expensify deleted a comment from MelvinBot Aug 31, 2021
@Expensify Expensify deleted a comment from MelvinBot Aug 31, 2021
@Expensify Expensify deleted a comment from MelvinBot Aug 31, 2021
@michaelhaxhiu
Copy link
Contributor

@mananjadhav thank you for being patient on this :). The past 2 weeks have been abnormal for us, and we are just getting back to normal operations (especially true for me).

@MelvinBot MelvinBot removed the Overdue label Aug 31, 2021
@michaelhaxhiu
Copy link
Contributor

Job posted here. https://www.upwork.com/jobs/~010528886766f948f5

@MelvinBot MelvinBot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 31, 2021
@MelvinBot MelvinBot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 2, 2021
@mallenexpensify
Copy link
Contributor

@mananjadhav , I assigned issue to you, can you apply to the Upwork job so I can get you hired there? https://www.upwork.com/jobs/~01055c345a6223f23c

Please confirm in a comment here once you have

@stitesExpensify
Copy link
Contributor

What I meant is, do we sync on every frequent emoji list change or add a delay, storing them in Onyx and then sync as a batch?

I think we can just do it every time someone sends an emoji, it's not that big of a deal IMO

I didn't understand when you said run the whole thing? I was sorting to get the more frequently used first.

I was suggesting we just run through the unsorted list and find the most used ones, but I changed my mind 😄 I think sorting like you suggested makes sense

@stitesExpensify
Copy link
Contributor

@mananjadhav Any progress here? :)

@MelvinBot MelvinBot removed the Overdue label Nov 12, 2021
@mananjadhav
Copy link
Collaborator Author

All done, will raise Pr today

@mallenexpensify
Copy link
Contributor

@mananjadhav , when can we expect the PR?

@mananjadhav
Copy link
Collaborator Author

PR Raised. There was a small issue with EmojiPicker padding in iOS, which I thought was caused by my code. Turns out it exists in the main branch too. I've fixed that anyway with the current PR.

@Jag96 Jag96 added the Reviewing Has a PR in review label Dec 2, 2021
@botify botify added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Dec 20, 2021
@botify botify changed the title Add support for Frequently/Recently Used Emojis [HOLD for payment 2021-12-27] Add support for Frequently/Recently Used Emojis Dec 20, 2021
@botify
Copy link

botify commented Dec 20, 2021

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.1.21-1 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-12-27. 🎊

@mananjadhav
Copy link
Collaborator Author

@mallenexpensify I was checking in my Upwork account I can't seem to find this job. I had applied to the job linked here #4559 (comment) but it says Job no longer available.

@stitesExpensify
Copy link
Contributor

Hey @mallenexpensify I think we should double the price of this to $500. The PR was solid and @mananjadhav put in a lot of work 😄

@mallenexpensify
Copy link
Contributor

Thanks @stitesExpensify. Here's what I'm seeing for the breakdown

  • $500 - job
  • $250 - reporting
  • $250 - n6 bonus
  • $250 - company offsite hold bonus (I forgot to label a handful of existing issues with this)
  • $1250 total.

@mananjadhav does that look right? I created a new job, can you apply and confirm in a comment once you have?
https://www.upwork.com/jobs/~017f2e7aaa6e10e35e

@mananjadhav
Copy link
Collaborator Author

Thanks @stitesExpensify and @mallenexpensify. Applied on Upwork.

@mallenexpensify
Copy link
Contributor

Hired you @mananjadhav , add a comment here once you've accepted the offer and I'll pay. Thanks

@mananjadhav
Copy link
Collaborator Author

Accepted @mallenexpensify

@mallenexpensify
Copy link
Contributor

I just paid this, it looks like it's a few days early, we normally pay 7 days after code has hit production, if no regressions. I'm going to 🤞 and hope there are no regressions. If there are.. please reopen

@mananjadhav
Copy link
Collaborator Author

Yeah, I was just about to ping that it got paid early. I'll take up if there's any regression,

@mallenexpensify
Copy link
Contributor

I don't think you're going anywhere @mananjadhav . Congrats on being a top 3 contributor!!
image

@mananjadhav
Copy link
Collaborator Author

Thank you 😄

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 External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests