-
Notifications
You must be signed in to change notification settings - Fork 399
Retention of scroll offset in emoji #1269
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
base: main
Are you sure you want to change the base?
Retention of scroll offset in emoji #1269
Conversation
|
Hello @chrisbobbe , |
chrisbobbe
left a comment
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! Small comments from a quick review; also, please change the commit message to match the project style.
|
Thanks @AshutoshKhadse23 for picking this up! We're now focusing more strictly on launch issues until the app's launch is ready, and this is a post-launch issue. I'll leave this PR as an exception where we'll proceed with it anyway, because it looks like it may be possible for the fix to be quite small. The next step will be for you to revise it to address each of @chrisbobbe's comments above. Then we can give it a new round of review. Because we're prioritizing launch issues, this PR may wait longer for review than others. If you're interested in contributing to Zulip, I recommend taking a look also at open issues in the upcoming milestones up through M5 Launch. |
|
Cross-linking because I happened across it while scanning through PRs during triage: it looks like a previous iteration of this PR was @AshutoshKhadse23 as a reminder of comments you received earlier at #1232 (comment) and #1232 (comment): when revising a PR, please update the existing PR rather than sending a new one. (In any case, for this PR the next step is for you to revise it as described above.) |
|
Hello @chrisbobbe, |
|
Before we can review this, it will need to meet the two basic requirements described in our README: It needs tests, and it needs to be organized in clear and coherent commits. |
77bb431 to
bad7df0
Compare
|
@gnprice @chrisbobbe Sorry for the delay, but now it is ready for review. |
bad7df0 to
bf35b81
Compare
|
OK, this looks ready for review, thanks. @AshutoshKhadse23 I see you have several other PRs open too: #2058, #2073, #2075. Please stick to just one issue until your first PR is merged. See the contributing guide: So please pick one of these four PRs to continue with, and close the other three for now. You can always reopen them later if the corresponding issues are still open. |
|
@gnprice @chrisbobbe, |
chrisbobbe
left a comment
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.
The commit message refers to #1121, which is the wrong issue. That's confusing; please fix that.
See also one comment below.
Also: I see you have not done this; please do it. |
8ff046b to
1f2e2b7
Compare
I did this |
1f2e2b7 to
2854428
Compare
|
@chrisbobbe Could you review it now? |
chrisbobbe
left a comment
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! Comments below about the test.
test/widgets/autocomplete_test.dart
Outdated
| // Find the autocomplete ListView's Scrollable. | ||
| final listViewFinder = find.descendant( | ||
| of: find.byType(Material), | ||
| matching: find.byType(ListView), | ||
| ); | ||
| final scrollableFinder = find.descendant( | ||
| of: listViewFinder, | ||
| matching: find.byType(Scrollable)); | ||
|
|
||
| // Scroll until the last item is visible. | ||
| await tester.scrollUntilVisible(find.text('sz_last_item'), 50, | ||
| scrollable: scrollableFinder); | ||
| await tester.pump(); |
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.
Do we really need to pass a value for the optional scrollable: in the tester.scrollUntilVisible call? What happens if we don't?
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.
Yes, by thinking deeply, I understoodthat this is the thing that is not required, so remove the optional scrollable: parameter
2854428 to
4b866c5
Compare
|
|
||
| // Verify the first item is visible and the last is not (needs scrolling). | ||
| check(find.text('sa_first_item')).findsOne(); | ||
| check(find.text('sz_last_item')).findsNothing(); |
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.
The "last is not" part isn't implemented, it looks like.
Added check that the last item is not visible initially
| check(find.text('sz_last_item')).findsOne(); | ||
| // The first item should no longer be visible. | ||
| check(find.text('sa_first_item')).findsNothing(); | ||
|
|
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.
We should also check that the first item is not visible here.
Added check that the first item is not visible after scrolling to the bottom
4b866c5 to
a85ea60
Compare
When searching for an emoji (or other autocomplete items), scrolling through results, and then modifying the query, the autocomplete list would retain its scrolled position while showing new results. This created confusing UX where results appeared cut off at the top. Fix this by adding a ScrollController to the autocomplete ListView and resetting the scroll position to the top whenever the query content changes. Fixes: zulip#1175
a85ea60 to
2c33d19
Compare
The issue regarding retention of scroll offset in emoji is solve
Resolving issue #1175
issue.1175.mp4