Skip to content

Commit

Permalink
autocomplete: Put best matches near input field.
Browse files Browse the repository at this point in the history
This commit reverses the list that was originally
presented to the user while showing the typeahead
menu.

This makes sense since on mobile its easier to click
on options closer to the input box, i.e. where your
fingers are currently present, instead of pressing
arrow keys on a keyboard which is true on a desktop
setup.

Hence we place the best matching options not at the
top of the typeahead menu, but instead put them at
the bottom for better reachability and convenience of
the user.

Fixes  zulip#1123.
Fixes zulip#1121.
  • Loading branch information
apoorvapendse committed Dec 11, 2024
1 parent cf19d68 commit 83d7b26
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/widgets/autocomplete.dart
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ class _AutocompleteFieldState<QueryT extends AutocompleteQuery, ResultT extends
constraints: const BoxConstraints(maxHeight: 300), // TODO not hard-coded
child: ListView.builder(
padding: EdgeInsets.zero,
reverse: true,
shrinkWrap: true,
itemCount: _resultsToDisplay.length,
itemBuilder: _buildItem))));
Expand Down

0 comments on commit 83d7b26

Please sign in to comment.