Implement #305: UI/UX improvement:

Don't group "followup" messages, and always display avatar/nickname/datetime besides messages, even when it is the same user as previous one.
This commit is contained in:
John Livingston 2024-01-31 18:22:26 +01:00
parent 5d4bfceb73
commit bfef57b1a5
No known key found for this signature in database
GPG Key ID: B17B5640CE66CDBC
2 changed files with 7 additions and 1 deletions

View File

@ -10,9 +10,10 @@
* UX: add a label ('Choose a nickname to enter') for the anonymous nickname prompt. Fix #287. * UX: add a label ('Choose a nickname to enter') for the anonymous nickname prompt. Fix #287.
* Translation updates: Arabic, German, French, Swedish, Spanish. * Translation updates: Arabic, German, French, Swedish, Spanish.
* New Swedish translations. * New Swedish translations.
* UI/UX improvments: * UI/UX improvements:
* hide nickname changes when previous nickname was like "Anonymous 12345". Helps to improve performances when massive anonymous users are joining (#138), and prevent displaying unnecessary messages (#111). * hide nickname changes when previous nickname was like "Anonymous 12345". Helps to improve performances when massive anonymous users are joining (#138), and prevent displaying unnecessary messages (#111).
* display anonymous users at the end of the participants list (Fix #136) * display anonymous users at the end of the participants list (Fix #136)
* don't group "followup" messages, and always display avatar/nickname/datetime besides messages, even when it is the same user as previous one (#305)
* Using patched ConverseJS for performance improvment (related to #96): * Using patched ConverseJS for performance improvment (related to #96):
* debounce MUC sidebar rendering in ConverseJS (Fix #138) * debounce MUC sidebar rendering in ConverseJS (Fix #138)
* force history pruning, even if messages keep coming (Fix #140) * force history pruning, even if messages keep coming (Fix #140)

View File

@ -129,6 +129,11 @@ window.initConverse = async function initConverse (initConverseParams: InitConve
return this.__super__.getActionInfoMessage(code, nick, actor) return this.__super__.getActionInfoMessage(code, nick, actor)
} }
}, },
ChatRoomMessage: {
/* By default, ConverseJS groups messages from the same users for a 10 minutes period.
* This make no sense in a livechat room. So we override isFollowup to ignore. */
isFollowup: function isFollowup () { return false }
},
ChatRoomOccupants: { ChatRoomOccupants: {
comparator: function (this: any, occupant1: any, occupant2: any): Number { comparator: function (this: any, occupant1: any, occupant2: any): Number {
// Overriding Occupants comparators, to display anonymous users at the end of the list. // Overriding Occupants comparators, to display anonymous users at the end of the list.