firmware
firmware copied to clipboard
Canned message usability improvements
This PR fixes some usability issues I've encountered with the canned message module and a standalone keyboard.
-
The Screen timer jumps away from the CannedMessageModule frame while the user is typing a message. Kinda annoying. Solution: Return early from Screen::handleOnPress if cannedMessageModule->shouldDraw() returns True.
-
The CannedMessageModule thread was not being scheduled to process the INACTIVATE_AFTER_MS timeout, because CannedMessageModule::runOnce() was running in the caller's context (e.g. the keyboard thread). Solution: Pass the return value of CannedMessageModule::runOnce() to setIntervalFromNow().
-
Don't reset half-typed messages when timing out back to regular screens, so the user can resume typing later.
-
Canned message list sometimes fails to timeout. Solution: Change timeout comparison operator from ">" to ">="
-
Don't inconsistently clear freetext when scrolling canned message list.
-
Restore old canned message state after displaying popup message (the user might be typing another msg). Also don't clear freetext/state after displaying popup message.
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
Note: user button will no longer dismiss the canned message frame. Some input methods will need to wait 20 seconds for timeout.
Merge only if this is acceptable.
is there a way to allow the user button to still dismiss the canned message frame? it's a button and it can be easily pressed by mistake. Having to wait 20sec does stop you from looking at other things that may be needed urgently.
This PR fixes some usability issues I've encountered with the canned message module and a standalone keyboard.
- The Screen timer jumps away from the CannedMessageModule frame while the user is typing a message. Kinda annoying. Solution: Return early from Screen::handleOnPress if cannedMessageModule->shouldDraw() returns True.
- The CannedMessageModule thread was not being scheduled to process the INACTIVATE_AFTER_MS timeout, because CannedMessageModule::runOnce() was running in the caller's context (e.g. the keyboard thread). Solution: Pass the return value of CannedMessageModule::runOnce() to setIntervalFromNow().
- Don't reset half-typed messages when timing out back to regular screens, so the user can resume typing later.
- Canned message list sometimes fails to timeout. Solution: Change timeout comparison operator from ">" to ">="
- Don't inconsistently clear freetext when scrolling canned message list.
- Restore old canned message state after displaying popup message (the user might be typing another msg). Also don't clear freetext/state after displaying popup message.
does this allow the escape button to still clear the message? because having to backspace a whole message may be a huge chore we didn't otherwise have to do before.
is there a way to allow the user button to still dismiss the canned message frame?
There'd definitely be a way to make that happen. It'd mean suppressing the carousel behavior in a slightly different spot; maybe somewhere like here?
This PR fixes some usability issues I've encountered with the canned message module and a standalone keyboard.
1. The Screen timer jumps away from the CannedMessageModule frame while the user is typing a message. Kinda annoying. **Solution:** Return early from Screen::handleOnPress if cannedMessageModule->shouldDraw() returns True. 2. The CannedMessageModule thread was not being scheduled to process the INACTIVATE_AFTER_MS timeout, because CannedMessageModule::runOnce() was running in the caller's context (e.g. the keyboard thread). **Solution:** Pass the return value of CannedMessageModule::runOnce() to setIntervalFromNow(). 3. Don't reset half-typed messages when timing out back to regular screens, so the user can resume typing later. 4. Canned message list sometimes fails to timeout. **Solution:** Change timeout comparison operator from ">" to ">=" 5. Don't inconsistently clear freetext when scrolling canned message list. 6. Restore old canned message state after displaying popup message (the user might be typing another msg). Also don't clear freetext/state after displaying popup message.
I'm not seeing a 20 second timeout, or any timeout when I start typing and stop using CardKB. I'm running the 2.5.0 technical preview on a RAK board. Are you using some custom firmware build where this occurs?
Here's my point-by-point observation of your observations:
1. The Screen timer jumps away from the CannedMessageModule frame while the user is typing a message. Kinda annoying.
- I don't experience this.
2. The CannedMessageModule thread was not being scheduled to process the INACTIVATE_AFTER_MS timeout, because CannedMessageModule::runOnce() was running in the caller's context (e.g. the keyboard thread).
- No comment.
3. Don't reset half-typed messages when timing out back to regular screens, so the user can resume typing later.
- I don't experience a timeout, and half-typed messages are not reset. Just keep typing, it switches back to the freetext entry screen and you can pick up where you left off.
4. Canned message list sometimes fails to timeout.
- Again I never experience a timeout at all, so if there is supposed to be one then it is indeed failing.
5. Don't inconsistently clear freetext when scrolling canned message list.
- I experience clearing of a typed, but not sent message if I start typing then press the up or down key to enter canned messages mode. If I resume typing the previously typed, unsent message has been cleared. This happens every time for me, not inconsistent.
6. Restore old canned message state after displaying popup message (the user might be typing another msg). Also don't clear freetext/state after displaying popup message.
- This would be nice, I agree. Right now you can resume typing but it's not obvious. If the user presses the Enter key, the half-typed message is sent. If the user presses Esc in an attempt to clear the received message screen, the half-typed message is lost.
I'm not seeing a 20 second timeout, or any timeout when I start typing and stop using CardKB. I'm running the 2.5.0 technical preview on a RAK board. Are you using some custom firmware build where this occurs?
I saw the carousel timeout issue when testing with 2.4.2 and 2.4.3 on a RAK4631. Do you have "Auto screen carousel" set to a low number like 10 seconds? If so then I will re-check on 2.5.0
The 20 sec canned message timeout is currently nonfunctional due to a couple of bugs, fixed in this PR.
does this allow the escape button to still clear the message? because having to backspace a whole message may be a huge chore we didn't otherwise have to do before.
Yes, canned message will still close on reception of a meshtastic_ModuleConfig_CannedMessageConfig_InputEventChar_CANCEL message, which is generated by the ESC key
@tropho23 - does this patch break anything for you?
Has anyone found that abnormal behavior cannot be switched when switching target nodes in canned message mode
There are some good ideas in this PR. How shall we move forward?
Sorry I haven't put much attention into this lately. Does it need splitting up into smaller PRs?
@robertfisk we moved to a completely new UI implementation. Can you please check if any of the usability issues you encountered are left with the new system? if so we'd gladly review a PR again.
Thanks for the update. I'll open a new PR if I find anything that needs fixing in the new implementation