-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
fix(web): clears repeating bksp on keyboard reload ⬅️ #6786
Conversation
User Test ResultsTest specification and instructions
Test Artifacts
|
It's puzzling to me why we would ever need a reload except for switching keyboards? |
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.
Changes LGTM -- root cause[s] aside, this is essential mopping up that should be done in any case on shutdown.
Once this passes test, it should be cherry-picked to stable-15.0. Fixing the underlying reload requirement may well address other glitches apart from the backspace stickiness, such as performance woes, sticky key previews, etc. |
As far as I know, KeymanWeb has always taken a rather lazy approach to mobile device rotation. Rotate => reload the OSK. That's where all the computation logic was, anyway. I did a lot of work in 15.0 to allow us to be less lazy and eventually use the newer |
But, continuing from that chain of thought... I figured "why not?" and investigated how much effort it'd take to change this. Probably a bit less stable than desired for |
Can you explain for me why it would be a bit less stable than desired? I'm not following ;-) |
... because it involves somewhat significant internal/structural changes, compated to this one? We know our keyboard construction is pretty much rock-solid, so using that to construct a rotated keyboard is very stable - KMW's been doing this since, at minimum, version 10. There were a couple of times a little targeted maintenance was needed, but that's it. This approach throws that approach out in favor of something that's only now possible due to all the big OSK refactoring work during 15.0. It's handled some small-scale resizing while live, but nothing as pronounced or significant as full-on rotation handling before that PR. It'll be a fairly bad look if this ends up breaking keyboard rotation in certain use cases we haven't foreseen. Sure, it should handle it fine, but we haven't regression-tested with its changes in place... and we still have a few other regression test rounds in the pipeline. We're a bit bottlenecked there at the moment, aren't we? |
OK 😄 Gotcha! One of the process changes you might have missed when you were away is that we are trying to raise the bar on alpha PRs -- we want to be confident that they are solid when merged. So if you are not 100% confident that this is not going to break things, then we need to be doing testing before merge to catch the issues. That's the job of the test team, and unit tests. I'll try and articulate, hopefully somewhat clearly. During release retrospective, we identified that we had a lot of issues in the beta cycle that we should really have picked up earlier in the release cycle. This led me to conclude:
All of these hamper us in our chase for a shorter release cycle. So, as the team has grown (yes, we are in a pinch this week ... but not generally), and we have more capacity to raise the quality bar, I think we can afford to slow down a little on our PRs and make sure they are really good. This is all subjective to a degree of course. For example, I won't merge the 🎢 PR chain until all the end-user-impacting issues are tested and sorted. But I may merge it before 100% of the code layout impurities are addressed -- because this is a net improvement without additional regressions. In terms of prioritisation in PRs, for end-user facing UX:
Now that we have solid test and deploy environments for all platforms in all PR builds, I think this is achievable. We no longer need to merge to alpha in order to actually use Keyman. As always, these priorities are subject to triage and negotiation -- these are guidelines, but they are solid ones that we will follow as far as we can. Flexibility still needs to stay a part of our process! And yeah, I don't think any of this is rocket science, but more a reflection of the fact that as the Keyman codebase is maturing and the team is growing, we will continue to identify places where we can improve our processes, and it's exciting to be able to do so. Finally, if you see places where my code changes don't meet this bar, please do let me know (kindly!). I'm sure I'm not always doing a great job of keeping up with this (or even articulating it clearly), particularly in my current situation. (Update: copied this text to our wiki at https://github.com/keymanapp/keyman/wiki/Principles-of-Keyman-Code-Changes) |
GROUP_ANDROID: Using the Keyman app on any real Android device...
|
Test ResultsTested on iPod touch 7th gen running iOS 15.4.1. GROUP_IOS: Using the Keyman app on any real iOS device...
|
Changes in this pull request will be available for download in Keyman version 16.0.23-alpha |
Fixes #6735.
May also fix #1930, but I have been unable to repro it on (emulated) Android using #6735's repro.
Turns out a very natural assumption for us to make actually isn't valid - for iOS, at least, it is possible for the OSK itself to be reloaded during a backspace event. (I haven't been able to succesfully reproduce this with emulated Android yet.) With how KMW is structured, a reload results in the OSK being rebuilt from the ground up.
When this occurs - a backspace at the same time as an OSK reload, with the old OSK's final event being a 'touchstart' on
K_BKSP
- we get a permanently-sticky backspace key, as the new OSK has no reference for the repeatingK_BKSP
's timer.Note that we'll want a more comprehensive rework to prevent the event that's causing the full OSK reload, as that could easily interfere with a multitap, something we're considering adding in 16.0. That, or prevent the full reload itself. Lots of 15.0 work went into things that should facilitate the latter idea, fortunately... but it's still for another PR, as we need this fix for 15.0 stable.
User Testing
Testing environments
Just in case, be sure that your test device's settings do not suppress device rotation events. There is a chance that such a setting may interfere with the repros.
GROUP_IOS: Using the Keyman app on any real iOS device...
GROUP_ANDROID: Using the Keyman app on any real Android device...
Tests
Note that for both tests that follow, step 2 represents our best-known reproduction strategies for issues #1930 and #6735.
TEST_PLAIN_STICKY: Attempt to reproduce the sticky backspace issue and FAIL this test if successful.
TEST_ROTATING_STICKY: Attempt to reproduce the sticky backspace issue and FAIL this test if successful.