-
-
Notifications
You must be signed in to change notification settings - Fork 57
Add comprehensive emoji search functionality #321
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
Conversation
…view This commit introduces a comprehensive emoji search feature and the necessary infrastructure to support it. Key changes include: - Adds a search bar to the emoji palette. - Implements `OtherInputConnection.kt` to handle text input into the `AppCompatAutoCompleteTextView` used for emoji search, allowing the keyboard to type into the search field. - Creates a new view for displaying emoji search results, which shows recent emojis by default and updates based on the user's query. - Adds CSV files (`emoji_category_*.csv`) containing emojis and associated search keywords for various categories (People, Nature, Food, etc.). - Updates `EmojiHelper.kt` to parse the new CSV files and adds a `searchEmojis` function. - Integrates the search logic into `MyKeyboardView.kt`, handling focus changes and text input for the search bar. - Adds new string resources, colors, and a search icon to support the UI changes. - Modifies `SimpleKeyboardIME.kt` to switch between the standard input connection and the new `OtherInputConnection` when the emoji search is active. - Introduces new methods in the `OnKeyboardActionListener` interface for handling search view focus and updating the shift state.
Improve emoji handling and add constants
This commit introduces several improvements to the emoji handling functionality:
- **Refactors emoji search and recents:**
- Defines a `MAX_RECENT_EMOJIS` constant for clarity when retrieving recently used emojis.
- Adds a `MAX_SEARCH_RESULTS` constant to limit the number of emojis returned from a search.
- **Enhances error handling:**
- Improves exception handling in `getEmojisFromAssets` to catch more specific `IOException`, `IllegalArgumentException`, and `IndexOutOfBoundsException` during emoji file parsing.
- Adds specific `IOException` and `JSONException` handling when parsing raw JSON files.
- **Code cleanup:**
- Simplifies conditional logic in `getEmojisFromAssets`.
Replaces the `IndexOutOfBoundsException` catch block with a more general `IOException` to handle potential file reading errors. This provides more robust error logging when processing emoji data files.
|
I'm androidx.emojipicker guy |
|
Dude I'm waiting. Are you reviewing the changes or is something is wrong here, if something has then please mention me, I will fix that |
|
Yes, I'll check this soon. |
|
Any updates? |
|
Please be patient. When it is reviewed, you'll be notified. |
naveensingh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, but even without the emoji picker module, this still isn't the approach.
- The CSV dataset will not be easy to localize, and that is a major blocker. Fossify users are from all over the globe.
- The dataset contains many unnecessary NSFW descriptors for emojis that will get flagged on the stores. Some are also politically leaning instead of being neutral. References like
SpongeBob's houseandI'm dyingalso do not belong in a static dataset. - The search UI is very old school.
And again, please try not to ignore issue assignments. If you'd like to work on any other feature, here are some open issues.
|
Sorry, it's my first ever PR request, here are a few points I want to say
At last I will add localize and translated emoji search term and in place of more modern and NSFW Content I will add more generic search term in the xml format and at last if you say I can use more modern Searchview by researching more on this, I also have one of my keyboard app on the play store that uses fork of SimpleKeyboard that have word suggestion and tenor gifs API. Looking forward for your reply. |
|
I'll be working on this feature. |
|
soon I will send the PR again after fixing the point that you mentioned |
|
I meant I'll be working on #23 myself. Please stop working on it. |
|
That means all my hardwork is gone I thought I wll add this on my resume either way, if possible, make my work useful by adding my code or algorithm in this issue, Sad to say but ok understood I will not work on this issue :] |

Type of change(s)
What changed and why
This pull request introduces a complete emoji search feature to enhance usability and make emoji selection faster and more intuitive.
Key improvements include:
OtherInputConnection.ktto allow typing into theAppCompatAutoCompleteTextViewused for emoji search.emoji_category_*.csv) containing emojis and search keywords for all categories.EmojiHelper.ktto parse the CSV files and added the newsearchEmojisfunction.MyKeyboardView.kt, handling focus changes and input routing.SimpleKeyboardIME.ktto switch between the default input connection andOtherInputConnectionwhen the search view is active.OnKeyboardActionListener.Tests performed
Before & after preview
Video demonstration
Closes the following issue(s)
Checklist