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

Add emoji autocompletions #220

Merged
merged 7 commits into from
Oct 26, 2024
Merged

Conversation

Linfye
Copy link
Collaborator

@Linfye Linfye commented Oct 22, 2024

Contributor checklist


Description

This is a draft PR, and the functionality is not yet complete. I will improve it following the steps below.

  1. Load the external English language database into a hash table for easy querying.
  2. Obtain the words the user is typing.
  3. Retrieve the corresponding emoji from the hash table.
  4. Display the emoji on the button.
  5. Output the emoji when the button is clicked.
  6. Implement these functionalities in SimpleKeyboard to extend support for other languages.

Related issue

Copy link

github-actions bot commented Oct 22, 2024

Thank you for the pull request!

The Scribe team will do our best to address your contribution as soon as we can. The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)

If you're not already a member of our public Matrix community, please consider joining! We'd suggest using Element as your Matrix client, and definitely join the General and Android rooms once you're in. Also consider joining our bi-weekly Saturday dev syncs. It'd be great to have you!

Maintainer checklist

  • The linting and formatting workflows within the PR checks do not indicate new errors in the files changed

  • The CHANGELOG has been updated with a description of the changes for the upcoming release and the corresponding issue (if necessary)

@Linfye Linfye force-pushed the emoji-autocompletions branch from 22a9246 to 7e48e2e Compare October 23, 2024 15:04
@andrewtavis andrewtavis added the hacktoberfest-accepted Accepted as a part of Hacktoberfest label Oct 24, 2024
@Linfye Linfye marked this pull request as ready for review October 24, 2024 02:06
@Linfye
Copy link
Collaborator Author

Linfye commented Oct 24, 2024

@andrewtavis I have completed this work, could you review the code? Thanks. 😊

There is still an small problem. After outputting an emoji using this feature, you need to press the backspace twice to delete the outputted emoji.

This seems to be related to the encoding method of the emoji, and it should be possible to resolve this issue by modifying the MyKeyboard.KEYCODE_DELETE part in the onKey function. Or do you have any other suggestions? I can open an issue for this problem after this PR is completed.

@andrewtavis andrewtavis requested review from andrewtavis and angrezichatterbox and removed request for andrewtavis October 24, 2024 14:47
Copy link
Member

@angrezichatterbox angrezichatterbox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @Linfye for this. Everything looks and functions great.

And yes, I do think modifying the delete key function would be the right choice. We could add a condition where if the previous character is an emoji, it would delete the surrounding twice and the other cases as usual.

Copy link
Member

@andrewtavis andrewtavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really appreciate you keeping at this for as long as you have, @Linfye 😊 So great to have you on the project, and looking forward to seeing this feature develop even more!

@andrewtavis andrewtavis merged commit 43f71a8 into scribe-org:main Oct 26, 2024
2 checks passed
@andrewtavis andrewtavis mentioned this pull request Oct 26, 2024
2 tasks
@Linfye Linfye deleted the emoji-autocompletions branch October 26, 2024 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted Accepted as a part of Hacktoberfest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants