-
Notifications
You must be signed in to change notification settings - Fork 52
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 Autosuggestion Buttons #158
Add Emoji Autosuggestion Buttons #158
Conversation
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
|
Sorry for the delay in my response. I had some college work yesterday. So you have two choices to prevent those from going null. You could initialize the controller in the individual keyboard IME class and accordingly use them. The binding is inflated only in the individual keyboard IME. Alternatively, you could move the controller code to the simple keyboard IME abstract class that consists of the keyboard's current functions and then call them from the individual keyboard IME. |
The binding has to be passed as a parameter to the functions if the second thought is considered. I think it is the same for the first way but not so sure. |
Within 24 hours isn't a delayed response, @angrezichatterbox :) School's important and certainly the priority 😊 Thanks for the suggestions! |
Hey @Linfye 👋 Checking in to see what your thoughts are on @angrezichatterbox's feedback :) Let's us know if you need any support here! Hope you're well 😊 |
I apologize for not informing you earlier. I had to return to my hometown recently to deal with some urgent matters, and I didn’t have the time or proper environment to work, which is why I haven’t been able to respond. I’ll be returning to school tomorrow and should be able to resume work within the next couple of days. I'm very sorry for making you wait so long. |
No need to apologize whatsoever, @Linfye! The assumption on my part was that something was up, so wanted to check in. Hope that you're doing ok, and take your time jumping back in here :) |
I put the controller code in the SimpleKeyboardIME. But it seemed that |
I will look into it and get back to you :) |
The Simple Keyboard IME is an abstract class that consists of any functions that are being used by all the languages. The individual languages have their codebase for the setup of the keyboard. You could call the function from the individual keyboard IME. Also, could you use binding instead of calling using findViewById? Thanks :) You could initialize the function in onCreateInputView and onStartupInputView for the individual language IME. |
@angrezichatterbox Now the And in my development branch, whenever I press the backspace key, the built app crashes. Do you have this issue? If so, we can file a bug report. cc: @andrewtavis |
I will reply for the first thing later on as I'm travelling. |
I've changed to another way of passing parameters, allowing However, as shown in #186, this problem also exists in the latest main branch. So to test the current feature, you should return to the phone's Home screen without going back to the Settings page after modifying the Switch, and then open the keyboard to test. I don't know the cause of #186; the Autosuggest Emojis Switch was also added by me referring to the Double Space Peroids code, but this problem occurred. I've rebased the code from the main branch, but the Backspace crash issue that I mentioned earlier still exists. Have you tested it on your machine? If you have, it might just be my problem, and I will try to resolve it later. The current code implements two Emoji versions for the phone view. If this works fine for you, I would like to merge the current PR first. For the three Emoji versions of the tablet view, I think a new issue can be created for other contributors to refer to and work on for hacktoberfest. Of course, if no one takes it on, I can handle it. Thank you for your help on this issue. 😊 @angrezichatterbox @andrewtavis |
For #186 the value gets changed however there is a typo in the value that is checked is retrieving Is the app crashing on everytime the back space is used ? |
Scribe-Android/app/src/main/java/be/scri/services/EnglishKeyboardIME.kt Lines 193 to 214 in 6758b8f
Could you replace for every time the Scribe State is idle for binding to be null? The problem was not fixed for the English Keyboard. It does not happen for the other keyboard right. |
You mean like this? but it still crashed in English keyboard. @angrezichatterbox |
Pass it like binding = null. Similar to how it is done for the German and other keyboards. |
OK, problem solved. Thanks! |
Are we good for a final check here? Thank you both for the great collaboration! |
And does this also solve #186? |
Yes, you can close both issues together after this pull request is successfully merged. 😊 |
Could u also add the initialization and update to the other Keyboard IME |
Are you referring to languages other than English and German? |
Yes |
👌 |
Could we get the most recent conflicts fixed and then I'll do a final review? :) |
Okay, could you resolve the conflicting code to keep these features? I don't have the permission to do this. 😊
|
Oh, I know now. But it's midnight here. 💤 If you have time, could you do this? Or wait until I can do it tomorrow. 😁 |
eeb03ce
to
1f02cbb
Compare
Thanks for getting to this, @Linfye! Quite busy with all the activity in the projects right now, so this really does help 😊 |
Let us know when it's ready :) |
I think I've resolved the code conflicts and also implemented the emoji autosuggest button for tablets now. Could you find some time to review it? If there are any issues, please let me know at any time. 😊 |
Could we ask you for one more check here, @angrezichatterbox? :) |
I'll check it again by tomorrow afternoon. I'm travelling right now :) |
@Linfye, could we make the button visibility based on the application's state? Currently, when users goes to select a command, the Plural Button gets hidden behind the auto-suggestions. Additionally, once the user returns to the idle state, the auto-suggestions button disappears. |
Thanks, I didn't notice this before. I'll fix this later today. @angrezichatterbox |
I've fixed the bug, and now the emoji autosuggest buttons appear only when in the SELECT_COMMAND state. If you there‘s any other issues, please feel free to let me know. :) |
I guess it should be shown only in idle state. Could you make that change as well :) Thanks |
Hehe sorry I need to read a bit better. Absolutely correct, @angrezichatterbox :) Should only be shown on idle 😊 |
Now the autosuggest buttons show in idle state. 😊 |
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.
Looking really great to me, @Linfye! Thanks so much for the dedication in getting this done 😊 So awesome to have you as such a reliable contributor here :) :)
Contributor checklist
Description
This PR adds buttons for emoji suggestions for mobile view and the logic to enable these buttons; the tablet view has not been added yet.
The current code implementation has some issues. I've added log statements as follows:
However, this code does not work properly. It seems that
EmojiButtonController.kt
has not successfully obtained the button elements fromkeyboard_view_command_options.xml
and made modifications. I've tried many methods but to no avail. Can you help me with this?Related issue