Skip to content

chore(ios): better visual feedback for keyboard search during poor internet connectivity#4573

Merged
jahorton merged 3 commits intobetafrom
chore/ios/4339-progress-feedback
Mar 3, 2021
Merged

chore(ios): better visual feedback for keyboard search during poor internet connectivity#4573
jahorton merged 3 commits intobetafrom
chore/ios/4339-progress-feedback

Conversation

@jahorton
Copy link
Copy Markdown
Contributor

@jahorton jahorton commented Mar 3, 2021

Fixes #4339.

Nobody likes a lack of feedback or when something instinctively feels broken. It's better to let a user know that progress is happening... even if so. So, toward that end... a batch of mini-features and fixes designed to better inform users of the app's progress during a keyboard search.

Something that may be worth keeping in mind: the package installer uses asynchronous code that makes it quite possible for associated lexical model queries to still be ongoing when the user reaches a package's welcome page. Commits 2 and 3 are about improving the UX in such conditions.


First commit: the keyboard search now displays a progress bar while loading relevant pages.

Blank page progress

That little bit of blue makes a world of difference. Without it... the search feels outright broken, with no indication that the issue is a poor 'net connection. Might not be a bad idea to have some sort of default text / a 'filler' page to display during the load as well, though. But... that's design work best left to another time.

It works for more than just the initial page load, too:

drill-down progress

It took a little while to work out just how to achieve that visual metaphor iOS users know and love, but it's there now. Of course, its actual responsiveness is also on par with the system's usual responsiveness. So... not that great, but at least it's there.


Second + third commits: the finalization process for package installation is now more polished - both in the frontend and the backend. The two "completion handler" pathways, which were confusing to manage, have now been successfully united into a single, consistent, and clearer-to-understand pathway. (Yay!)

In terms of user benefit, the keyboard will now never display until AssociatingPackageInstaller fully relinquishes control. (Well, once the fix within #4568 also lands.) Furthermore, if installations are delayed because of internet issues when attempting to look up associated lexical models, the welcome page (should it be available) will remain interactive, just with a wait-spinner on top of it.

Screen Shot 2021-03-03 at 12 59 32 PM

In such cases, lexical-model association queries are pending in the background. The view will auto-dismiss once those queries complete.

No welcome page? No problem! You'll be able to check out the readme page, but you won't be able to select anything or scroll the language list. Also has a spinner. A good test is with the following legacy package, though it does lack multiple language codes: https://downloads.keyman.com/keyboards/gff_bcq_7/1.0/gff_bcq_7.kmp

Screen Shot 2021-03-03 at 1 47 01 PM

Ideally, we'd use progress bars (like with the first commit) instead of spinners... but the code we'd need to actually track progress to give meaningful 'bar' information was triaged beyond 14.0.

(Refer to the final few lines of the following.)

/**
* Constructs an instance for installing the specified package alongside any detected packages containing specified types
* of associated resources for the languages that are selected for installation.
*
* - parameters:
* - package: An already-download package to install. Any language selection must choose languages supported by this package.
* - defaultLanguageCode: The BCP-47 code for the default language to select when prompting the user for languages.
* - withAssociators: A set of desired "language associations" to install alongside the package if they exist.
* Currently supports the following options:
* - `.lexicalModels`: intended for use with keyboard packages. Will query for and install lexical models for any
* picked languages as part of the installation process.
* - `.custom`: allows specifying custom language associations.
* - progressReceiver: This will _always_ be called, even should picking never start before the class is deinitialized.
* It will either receive `.cancelled` (exactly once) or a sequence like the following:
* - `.starting` (exactly once)
* - `.complete` (exactly once)
*
* In the future, `.inProgress` may be implemented; at that time, it will provide data for reporting installation progress and
* may be called multiple times between `.starting` and `.complete`.
*/

So, spinners.

@jahorton jahorton marked this pull request as ready for review March 3, 2021 06:27
@jahorton jahorton changed the title chore(ios): better visual feedback for keyboard search with poor internet connectivity chore(ios): better visual feedback for keyboard search during poor internet connectivity Mar 3, 2021
Copy link
Copy Markdown
Member

@mcdurdin mcdurdin left a comment

Choose a reason for hiding this comment

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

LGTM

@jahorton jahorton merged commit 4ab75ce into beta Mar 3, 2021
@jahorton jahorton deleted the chore/ios/4339-progress-feedback branch March 3, 2021 07:35
@keyman-server
Copy link
Copy Markdown
Collaborator

Changes in this pull request will be available for download in Keyman version 14.0.251-beta

@keyman-server
Copy link
Copy Markdown
Collaborator

Changes in this pull request will be available for download in Keyman version 15.0.19-alpha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(ios): poor indicators between search's selection, download, install phases

3 participants