-
Notifications
You must be signed in to change notification settings - Fork 226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
autocomplete: Put best matches near input field. #1131
base: main
Are you sure you want to change the base?
autocomplete: Put best matches near input field. #1131
Conversation
a146a49
to
bd3a205
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @apoorvapendse! Left some comment.
This doesn't fix #1123 because the emoji picker (added in #1103) is a feature separate from autocompletion, so please update the PR comment and the commit message to reflect that.
test/widgets/autocomplete_test.dart
Outdated
await tester.enterText(composeInputFinder, 'hello @A'); | ||
await tester.pumpAndSettle(); | ||
//only first seven users render initially, 8th user has to be accessed by scrolling up | ||
for(int i = 0 ;i < 7 ;i++){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: consistent spacing (and at other places)
for (int i = 0; i < 7; i++) {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay, I've updated so that no matches are found for //[a-z][A-Z]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bump. Looks like this still needs to be fixed:
for(int i = 0 ;i < 7 ;i++){ | |
for (int i = 0; i < 7; i++) { |
bd3a205
to
129434b
Compare
129434b
to
b35ddbf
Compare
@PIG208 thank you for clarifying , Open to your feedback. |
b35ddbf
to
df05da4
Compare
Hey @PIG208, I added a comment mentioning that dependency here in the latest commit. Is that what was expected? |
df05da4
to
5ae02ae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update! Left some more comments. I read the first test and skimmed the second one. It looks like the current approach of getting scroll offset is not working properly.
For the next revision, please do a round of self-review addressing the style issues mentioned in the comments, and apply it to other places as well.
test/widgets/autocomplete_test.dart
Outdated
await tester.enterText(composeInputFinder, 'hello @A'); | ||
await tester.pumpAndSettle(); | ||
//only first seven users render initially, 8th user has to be accessed by scrolling up | ||
for(int i = 0 ;i < 7 ;i++){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bump. Looks like this still needs to be fixed:
for(int i = 0 ;i < 7 ;i++){ | |
for (int i = 0; i < 7; i++) { |
95f971d
to
2f522f5
Compare
Change Summary for @PIG208
Thank you for being patient. |
e2bd10c
to
cd4226e
Compare
cd4226e
to
1b8cf39
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update! I revised the @-mentions test as an example of what we usually expect for testing. Please read it and try to apply the same approach to the similar test for emojis.
1b8cf39
to
4b9245b
Compare
Hi @PIG208, Change Summary:
Happy to get feedback on this. |
3a19206
to
dc1a5eb
Compare
dc1a5eb
to
c1ac550
Compare
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. Tests have been added to verify the emoji and mention render behavior. Also mentions dependencies on zulip#226 where required. Co-authored-by: Zixuan James Li <[email protected]> Fixes zulip#1121.
c1ac550
to
08f9b96
Compare
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 to navigate through the options on a keyboard which is convenient on a desktop setup.
Hence we place the best matching options not at the top of the typeahead menu, but instead at the bottom for better reachability and convenience of the user.
CZO
Fixes #1121.
Here is a demo:
Screencast from 12-11-2024 12:38:19 PM.webm