Virtual scrolling for conversations list#10262
Conversation
95ea979 to
472e534
Compare
|
|
/backport to stable27 |
472e534 to
4bff57f
Compare
| <li ref="container" class="left-sidebar__list"> | ||
| <ul class="scroller h-100"> | ||
| <!-- Conversations List --> | ||
| <template v-if="!isSearching"> |
There was a problem hiding this comment.
UPD: using v-show and keeping scroller in DOM helps with keeping the scrol position
There was a problem hiding this comment.
Still thinking, that it's an issue: try scroll to the bottom and use search from there
4bff57f to
b93a1b4
Compare
|
Rebased onto master with new See commits from
@Antreesy please, have a look. |
Antreesy
left a comment
There was a problem hiding this comment.
Tested, better now
Let's rebase onto master and squash, and think again, if v-show is applicable
| <li ref="container" class="left-sidebar__list"> | ||
| <ul class="scroller h-100"> | ||
| <!-- Conversations List --> | ||
| <template v-if="!isSearching"> |
There was a problem hiding this comment.
Still thinking, that it's an issue: try scroll to the bottom and use search from there
|
Though, having an ability to switch between list and search with If we use Using |
Then let's consider it for the follow-up |
|
So time for the fixup rebase? |
Signed-off-by: Grigorii K. Shartsev <[email protected]>
33734f5 to
bcbc30e
Compare
01d6a3a to
02d5fd6
Compare
Signed-off-by: Grigorii K. Shartsev <[email protected]>
`vue-virtual-scroller` requires `key` on `<img>` to avoid glitch on scroll Signed-off-by: Grigorii K. Shartsev <[email protected]>
Signed-off-by: Grigorii K. Shartsev <[email protected]>
Signed-off-by: Grigorii K. Shartsev <[email protected]>
Signed-off-by: Grigorii K. Shartsev <[email protected]>
02d5fd6 to
8552005
Compare
|
Forced pushed with squashed commits and very minor changes like typos in comments |
|
The backport to stable27 failed. Please do this backport manually. # Switch to the target branch and update it
git checkout stable27
git pull origin stable27
# Create the new backport branch
git checkout -b fix/foo-stable27
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123
# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable27More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport |


PR is made on top of #10051
☑️ Resolves
Performance issues:
Opening a page with 500 conversations immediately makes 500 requests for conversation avatars
🖼️ Screenshots
Almost no visual changes, except scrolling behavior.
By default scroll to position in virtual scrolling just "teleport" to a new position instantly:
It doesn't look good and it is different from the current Talk behavior. And it makes it less understandable from what direction (up/down) the user have moved.
But we cannot just use smooth scrolling... Smooth scrolling from the beginning to the end means - loading ALL avatars in between and not very performant in general.
The idea is "imitating" the smooth scrolling:
Throw 500 chats scrolling is not super smooth but smooth a bit :D
🚧 Tasks
<img>with implicitkeyinstead of<NcAvatar>for conversationskeyon<img>there is a glitch effect on scrolling because Vue updatessrcof the images. Even though images are cached after the first load, the glitch effect is still visible.📝 Notes and drawbacks
No virtual scrolling in the search results
A virtual scroller is used ONLY for the main conversations list (incl. filtered conversations) and NOT for the search results. The search results are more complicated because it is not a homogeneous list but several lists with different elements in between.
Glitching effect with 1-1 conversations avatars
To avoid it we need to stop using
<NcAvatar>for 1-1 (what is problematic with the user status) or addkeyto<NcAvatar>and make it more performant on props updating.👀 Alternative solutions
If we only want to fix the first problem with avatar fetching, we can just implement lazy loading for conversation avatars.
🏁 Checklist
docs/has been updated or is not required