-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Description
Description:
There is a mismatch between the sorting of files while rendering the Files list and the sorting of files for loading them in infinity-scroll batches. This mismatch leads to a frustrating UX.
In older versions of RC, the Files pane listed the most recent files in reverse chronological order (i.e. newest first). When you scroll all the way down to the bottom, it infinity-scrolls to the next batch. That is, it would load the next most recent batch of files and append them to the bottom of the pane. The effect is that you initially see the most recent files, but can scroll down indefinitely going further back in time.
In RC 5.x, it still loads the most recent files, but the sort order of the files is in forward chronological order (oldest first). When you scroll to the bottom of the list, it downloads the next most recent batch of files (exactly as before) but immediately sorts the whole list in forward chronological order, while leaving you scrolled down to the bottom of the pane. The effect is that as you keep infinity-scrolling you just see the same most-recent files at the bottom of the pane, while (off screen) older and older files are prepended to the top of the list.
The simple matter of sorting in the wrong order makes for a horribly confusing UI. Users are horribly confused/frustrated by the illogical behavior. The sort order needs to be reverted to the proper reverse chronological order.
Steps to reproduce:
- Enter a room that has a large number of File attachment. (Let's say 200+ files)
- Click the paperclip "Files" icon.
- Note the general order of the timestamps on the files -- Ascending / forward-chronological.
- Note the timestamp of the topmost file.
- Scroll down to the bottom of the Files list.
- Continue scrolling for a while, allowing several batches of infinity-scroll fetches to load.
- Scroll back up to the top.
- Note the timestamp of the topmost file.
Expected behavior:
The initial list should be of the most recent files. As I scroll down, I continue to see an infinitely scrolling list of files in proper reverse-chronological order. The newest file remains at the top of the list and the oldest (as-yet-loaded) file is at the bottom.
Actual behavior:
The list appears to jump in a loop, showing the same (most recent) files repeatedly. The oldest, as-yet-loaded file is at the top of the list, but since you are at the bottom of the pane, you don't see it until you scroll back up.
Server Setup Information:
- Version of Rocket.Chat Server: 5.1.2
- Operating System: Linux
- Deployment Method: tar
- Number of Running Instances: 5
- DB Replicaset Oplog: enabled
- NodeJS Version: v14.19.3
- MongoDB Version: 4.2.15 / wiredTiger (oplog Enabled)
Client Setup Information
- Desktop App or Browser Version: Chrome 106.0.5249.119
- Operating System: MacOS