feat(web): add osk.gestureParams for better gesture-config persistence#12176
feat(web): add osk.gestureParams for better gesture-config persistence#12176
Conversation
User Test ResultsTest specification and instructions User tests are not required Test Artifacts
|
|
When do the parameters take effect? Is the update instant? This works for this type of parameter but there may be others where it would be better to have a function approach rather than a property approach particularly if 'batching' many options. |
The update is instantly applied for any gestures not currently active and for future instances of the same gesture. For any configurable aspect of a gesture, the gesture specs refer to it through the same instance returned by this property. (For a longpress, the There's no "rebuilding" of the models involved here; only the thing "pointed to" / "referenced" is changed. We could change fields on the object and its subobjects in a batch the same way we do for a single copy; that'd be fine here. I made sure to design it this way during 17.0 gesture work. |
|
Don't forget to update the API documentation |
|
Changes in this pull request will be available for download in Keyman version 18.0.89-alpha |
Are you saying to make it official API on help.keyman.com? Wasn't sure if we wanted this to be internal and wait to design something better or if we wanted to go ahead and make it external. |
I don't think we should be writing undocumented internal APIs any more. We are trying to get better at doing APIs and each undocumented API we add just makes it worse. So, we need to document it as an API, whether that is as a public API on help.keyman.com or a private API on the wiki I am less sure about. |
I have added a new wiki page: https://github.com/keymanapp/keyman/wiki/Mobile-app-%E2%80%90-app-webview-API It's linked by the main Wiki index at the bottom of the first section ("API documentation"). |
Adds a more 'stable' internal API point (
keyman.osk.gestureParams) for configuring gesture parameterization settings. I'm not convinced it's the long-term best solution as the "true" API point, but I think that even if not, it's likely to be quite usable by whatever we decide on making that API point.With this changeset, the gesture parameters only need to be adjusted once; the new setting will persist for the lifetime of the OSK, even across keyboard swaps.
Example:
@keymanapp-test-bot skip