refactor(web): extract suggestion-finalization block into its own function 📚
After working again with the main method for generating predictions over the past few PRs, I got reminded of just how long that method is. This was further complicated after recognizing issues regarding near-match suggestion prioritization (#11876).
With a bit of effort, we should be able to spin off individual 'sections' of the predict method into their own individual functions. This would help clarify exactly what each section specifically needs and increase code clarity for future maintainers.
For simplicity of review, I'll be doing one section at a time, working from bottom-to-top. Each section has effects for those that follow it, so this should minimize the number of cross-effects for the PR set as a whole.
@keymanapp-test-bot skip
User Test Results
Test specification and instructions
User tests are not required
Test Artifacts
- Android
- Developer
- iOS
- Keyboards
- Web
- Windows
Changes in this pull request will be available for download in Keyman version 18.0.75-alpha