Focus remains on the hint text box after selecting something, so the user doesn't have to click it before hitting enter
Text in the dropdown is now left-aligned
The dropdown is now navigable with up/down keys
Fixed a mypy issue
How was this tested?
Played around with it on the sc2 client:
Tested clicking a dropdown option put it in the textbox, with focus on the textbox
Tested up/down keys navigate the dropdown
Tested pressing enter while a dropdown option is highlighted pastes the dropdown option's item name in the text box
Tested pressing enter while no dropdown option is highlighted immediately tries to hint the contents of the textbox
Tested selecting an option with the mouse while a dropdown option is highlighted behaves the same as clicking an option without keyboard dropdown highlight
Tested focus remains on the textbox after a hint command is sent out
Remaining issues
There was some slowdown holding delete when the list item name matches is large (noticed with "Progressive" in the sc2 item pool)
Navigating down with arrow keys doesn't scroll the dropdown when selection goes off-screen
Narrowing the window causes search result text to squish onto multiple lines in a bit of a mess rather than truncating
Fuzzy search could be better
Search results don't include item groups
Decision point: should the textbox be cleared when a hint is sent out?
If this makes graphical changes, please attach screenshots.
Navigating with arrow keys, deleting, then navigating to "Marine" with arrow keys and selecting "Laser Targeting System" with the mouse:
It's still possible to get undefined focus if you type something, go down on the list with arrow keys, then click the text input again. Not sure what's going on there.
What is this fixing or adding?
Replacing changes with multiple commits, and trying to get some better code quality out of them. Currently ported changes:
Old changes:
Various fixes and improvements for PR #3535:
How was this tested?
Played around with it on the sc2 client:
Remaining issues
Navigating down with arrow keys doesn't scroll the dropdown when selection goes off-screenIf this makes graphical changes, please attach screenshots.
Navigating with arrow keys, deleting, then navigating to "Marine" with arrow keys and selecting "Laser Targeting System" with the mouse:![hint_search_demo](https://github.com/ArchipelagoMW/Archipelago/assets/31861583/92050e40-0e5a-4c57-9d79-6a7d8068337d)