Add hour pagination to archives
Add hour pagination to archives. Fix https://gitlab.com/gitlab-org/gitter/webapp/-/issues/2536
- If a day in the archive has more than 1,500 messages, we redirect to the hour 00:00 - 01:00 range(
http://localhost:5000/community/room/archives/2020/01/15/0-1
) - When hour ranges are used, there is a hour picker in the sidebar
- If there are more than 1,500 messages for a given hour, they are not displayed. Previously it was 1,500 per day so this is a huge step up. Rooms with this much activity are probably pretty rare. Seems like it would be bot kinda of activity.
- This is just dumb hour by hour pagination and can include empty hoursw with no messages. There isn't a nice heatmap of the day.
- It's still possible to access these hour chunks for archive days below the 1,500 limit but we don't force people to view things that way.
Fix https://gitlab.com/gitlab-org/gitter/webapp/-/issues/2536
Testing strategy
- Have a room with many messages (more than 10)
- Adjust the
ARCHIVE_MESSAGE_LIMIT
inmodules/chats/lib/chat-service.js
to10
- Visit the room archive for that day,
http://localhost:5000/community/room/archives/2020/01/15
- Notice how you are redirected to
http://localhost:5000/community/room/archives/2020/01/15/0-1
- If the room has less than the
ARCHIVE_MESSAGE_LIMIT
for the day, you won't be redirected and can see all the messages on one page like you did before. - It's still possible to access these hour chunks for archive days below the limit but we don't force people to view things that way.
Fix https://gitlab.com/gitlab-org/gitter/webapp/-/issues/2536
Edited by Eric Eastwood