Skip to content

improved emoji handleing#332

Merged
andrewtavis merged 4 commits intoscribe-org:mainfrom
bhanu-dev82:emoji_suggestion_space
Mar 13, 2025
Merged

improved emoji handleing#332
andrewtavis merged 4 commits intoscribe-org:mainfrom
bhanu-dev82:emoji_suggestion_space

Conversation

@bhanu-dev82
Copy link
Collaborator

Contributor checklist


Description

@github-actions
Copy link

Thank you for the pull request! ❤️

The Scribe-Android team will do our best to address your contribution as soon as we can. 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 attending our bi-weekly Saturday dev syncs. It'd be great to meet you 😊

@github-actions
Copy link

github-actions bot commented Mar 10, 2025

Maintainer Checklist

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 :)

  • 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)

@bhanu-dev82 bhanu-dev82 changed the title impeoved emoji handleing improved emoji handleing Mar 10, 2025
@andrewtavis
Copy link
Member

Thanks for the PR, @bhanu-dev82! We'll get to the review in the coming days :)

internal companion object {
const val DEFAULT_SHIFT_PERM_TOGGLE_SPEED = 500
const val TEXT_LENGTH = 20
const val MAX_EMOJI_KEYWORD_LENGTH = 20
Copy link
Member

Choose a reason for hiding this comment

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

One thing here @bhanu-dev82 is that this might not hold always. Maybe we can load this in from the DB for the emojis table? Let me know what you think here :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes i will implement it and commit

@andrewtavis
Copy link
Member

Aside from the comment above all's looking and working great, @bhanu-dev82! Let us know what you think about getting that value from the DB and we can go from there :)

@andrewtavis
Copy link
Member

We can also make an issue for that as well, if you'd prefer 😊

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.

I only felt one thing within the emoji replacement. It felt a little laggy. Maybe this is my personal issue as I am on an emulator. If not we could have an issue to look into this as well.
We could look into batch edit within the IME feature for optimizing this a bit probably.

@andrewtavis
Copy link
Member

Ya maybe a separate issue for that would be good :) Do you want to make an issue, @angrezichatterbox? Please let us know if you'd like to do the work of figuring out the max keyword length via the database in this PR, @bhanu-dev82!

@angrezichatterbox
Copy link
Member

Ya maybe a separate issue for that would be good :) Do you want to make an issue, @angrezichatterbox?

I would create an issue for it once this is merged in :)

@bhanu-dev82
Copy link
Collaborator Author

I only felt one thing within the emoji replacement. It felt a little laggy. Maybe this is my personal issue as I am on an emulator. If not we could have an issue to look into this as well. We could look into batch edit within the IME feature for optimizing this a bit probably.

yes we can improve the performance, i will update and commit

@bhanu-dev82
Copy link
Collaborator Author

Ya maybe a separate issue for that would be good :) Do you want to make an issue, @angrezichatterbox? Please let us know if you'd like to do the work of figuring out the max keyword length via the database in this PR, @bhanu-dev82!

i will figure out the make keyword length from database

@bhanu-dev82
Copy link
Collaborator Author

I have updated the code with batch editing and database integration for maxlen. kindly provide feedback

@andrewtavis
Copy link
Member

Wonderful work, @bhanu-dev82! I'll let @angrezichatterbox confirm given his comment on the performance. Looking forward to bringing this in! 🚀

@angrezichatterbox
Copy link
Member

angrezichatterbox commented Mar 12, 2025

Wonderful work, @bhanu-dev82! I'll let @angrezichatterbox confirm given his comment on the performance. Looking forward to bringing this in! 🚀

I will look into this PR and the other one tmrw. There was a little mess-up in my android studio configuration. I am currently trying to fix it.

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.

It looks fine to me. Something interesting is that the emoji insertion is slow if the first word is an emoji otherwise it is handled fine. We could look into this as another issue I think.
I think the code can be simplified a bit. Instead of having separate cases. The line could be split by space and emoji suggestion could be replaced for the last word. Instead of having a when case.

@andrewtavis
Copy link
Member

Assuming it's fine to send along 88d62b0 as we're not using MAX_EMOJI_KEYWORD_LENGTH :)

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.

Amazing work, @bhanu-dev82, and thanks for the support and review, @angrezichatterbox! 😊 Hope we can work with you again soon on another issue, @bhanu-dev82!

@andrewtavis andrewtavis merged commit f016f38 into scribe-org:main Mar 13, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants