-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[BUG] Top & Bottom unread bars in left sidebar is not working #16853
Description
Description:
When the left sidebar has many channels, we have a top/bottom unread bar to notice users scroll up or down to check the message.
There is a feature for this in client/lib/menu.js EventEmitter but currently it's not working.
Steps to reproduce:
- Creat some channels, or reduce the height of chat window until see the scrollbar for rooms list.
- Send a message to the channel at bottom.
- Use another account and keep the scroll at top of rooms list.
Expected behavior:
Show the bottom-unread-rooms bar at the bottom.
Actual behavior:
Currently, it's not working
Server Setup Information:
- Version of Rocket.Chat Server: 3.0.3
- Operating System: CentOS 7
- Deployment Method: Manual Installation
- Number of Running Instances: 1
- DB Replicaset Oplog: Enabled
- NodeJS Version: v12.14.0
- MongoDB Version: 4.0.13
Client Setup Information
- Desktop App or Browser Version: Chrome 80 / Rocket Client v2.17.7
- Operating System: MacOS
Additional context
I see this feature was defined in client/lib/menu.js EventEmitter but currently it's not working.
I think because of $('li.has-alert') selector is not correct, there is not has-alert class that was used in the whole client at all, it should be .sidebar-item--unread.
And one more thing, currently when user focus on another room and get message, the event will not be triggered.
Because the menu.updateUnreadBars(); only be triggered on scroll .rooms-list.
Relevant logs:
Browser logs, the uid of undefined is another bug that I cannot find out 😅
Exception from Tracker recompute function:
560a7315be0500abf54ae7cfbadb6b22b5066ae9.js?meteor_js_resource=true:1 TypeError: Cannot read property 'uid' of undefined
at 560a7315be0500abf54ae7cfbadb6b22b5066ae9.js?meteor_js_resource=true:971
at t._compute (560a7315be0500abf54ae7cfbadb6b22b5066ae9.js?meteor_js_resource=true:679)
at t._recompute (560a7315be0500abf54ae7cfbadb6b22b5066ae9.js?meteor_js_resource=true:679)
at Object.o._runFlush (560a7315be0500abf54ae7cfbadb6b22b5066ae9.js?meteor_js_resource=true:679)
at a (560a7315be0500abf54ae7cfbadb6b22b5066ae9.js?meteor_js_resource=true:1)
