Commit Graph

23 Commits

Author SHA1 Message Date
David Langley
491f0cd08a
Change license (#13)
* Copyright headers 1

* Licence headers 2

* Copyright Headers 3

* Copyright Headers 4

* Copyright Headers 5

* Copyright Headers 6

* Copyright headers 7

* Add copyright headers for html and config file

* Replace license files and update package.json

* Update with CLA

* lint
2024-09-09 13:57:16 +00:00
Michael Telatynski
4941327c78
Avoid using deprecated exports & methods from matrix-js-sdk (#12359) 2024-03-25 12:21:02 +00:00
Florian Duros
a4987060b7
Pop out of Threads Activity Centre (#12136)
* Add `Thread Activity centre` labs flag

* Rename translation string

* WIP Thread Activity Centre

* Update supportedLevels

* css lint

* i18n lint

* Fix labs subsection test

* Update Threads Activity Centre label

* Rename Thread Activity Centre to Threads Activity Centre

* Use compound `MenuItem` instead of custom button

* Color thread icon when hovered

* Make the pop-up scrollable and add a max height

* Remove Math.random in key

* Remove unused class

* Change add comments on `mx_ThreadsActivityRows` and `mx_ThreadsActivityRow`

* Make threads activity centre labs flag split out unread counts

Just shows notif & unread counts for main thread if the TAC is enabled.

* Fix tests

* Simpler fix

* Open thread panel when thread clicke in Threads Activity Centre

Hopefully this is a sensible enough way. The panel will stay open of
course (ie. if you go to a different room & come back), but that's the
nature of the right panel.

* Dynamic state of room

* Add doc

* Use the StatelessNotificationBadge component in ThreadsActivityCentre

and re-use the existing NotificationLevel

* Remove unused style

* Add room sorting

* Fix `ThreadsActivityRow` props doc

* Pass in & cache the status of the TAC labs flag

* Pass includeThreads as setting to doesRoomHaveUnreadMessages too

* Fix tests

* Add analytics to the TAC (#12179)

* Update TAC label (#12186)

* Add `IndicatorIcon` to the TAC button (#12182)

Add `IndicatorIcon` to the TAC button

* Threads don't have activity if the room is muted

This makes it match the computation in determineUnreadState.
Ideally this logic should all be in one place.

* Re-use doesRoomHaveUnreadThreads for useRoomThreadNotifications

This incorporates the logic of not showing unread dots if the room
is muted

* Add TAC description in labs (#12197)

* Fox position & size of dot on the tac button

IndicatorIcon doesn't like having the size of its icon adjusted and
we probably shouldn't do it anyway: better to specify to the component
what size we want it.

* TAC: Utils tests (#12200)

* Add tests for `doesRoomHaveUnreadThreads`
* Add tests for `getThreadNotificationLevel`

* Add test for the ThreadsActivityCentre component

* Add snapshot test

* Fix narrow hover background on TAC button

Make the button 32x32 (and the inner icon 24x24)

* Add caption for empty TAC

* s/tac/threads_activity_centre/

* Fix i18n & add tests

* Add playwright tests for the TAC (#12227)

* Fox comments

---------

Co-authored-by: David Baker <dbkr@users.noreply.github.com>
2024-02-07 13:49:40 +00:00
Florian Duros
8299abd344
Fix Mark all as read in settings (#12205)
* Fix `Mark all as read` in settings

* Update tests
2024-02-01 17:58:57 +00:00
Florian Duros
77e1649f0b
Add labs flag for Threads Activity Centre (#12137)
* Add `Thread Activity centre` labs flag

* Rename translation string

* Update supportedLevels

* Fix labs subsection test

* Update Threads Activity Centre label

* Make threads activity centre labs flag split out unread counts

Just shows notif & unread counts for main thread if the TAC is enabled.

* Fix tests

* Simpler fix

* Pass in & cache the status of the TAC labs flag

* Pass includeThreads as setting to doesRoomHaveUnreadMessages too

* Fix tests

---------

Co-authored-by: David Baker <dbkr@users.noreply.github.com>
2024-01-29 17:52:48 +00:00
Andy Balaam
8b7f49e74e
Rewrite doesRoomOrThreadHaveUnreadMessages to use the receipt rewrite from js-sdk (#11903)
* Rewrite doesRoomOrThreadHaveUnreadMessages to use the receipt rewrite from js-sdk

* Remove unit tests that rely on receipt timestamps

Previously, if we found a receipt for an unknown event, we would use the
receipt timestamp and declare all events before that time to be read.
Now, we ignore such "dangling" receipts until we find the event they
refer to.

This new behaviour is more correct, but does lead to more messages being
considered unread.

This commit deletes tests that checked for the old behaviour.

* Check for a missing thread in determineUnreadState

* Fix incorrect way to find room timeline

* More realistic test setup to support new receipt code

* Update snapshot to expect a room to be unread when there are no receipts

* Formatting fixes

* Update snapshot to show menu and notif button

* Disable some flaky tests

* Disable some flaky tests

* Fix test to make a threaded receipt for an event that is actually in the thread

---------

Co-authored-by: Florian Duros <florianduros@element.io>
Co-authored-by: Florian Duros <florian.duros@ormaz.fr>
2023-11-29 13:36:52 +00:00
Andy Balaam
e76a37e01f
Update tests in anticipation of matrix-js-sdk#3901 (#11956)
* Update tests in anticipation of matrix-js-sdk#3901

* Formatting
2023-11-28 13:59:03 +00:00
Michael Telatynski
99e80dd296
Consume more imports from matrix-js-sdk/src/matrix (#11449) 2023-08-23 09:04:25 +00:00
Michael Telatynski
767cd628f9
Consider the unthreaded read receipt for Unread dot state (#11117)
* Consider the unthreaded read receipt for Unread dot state also

* Add tests

* Fix strict types
2023-06-21 15:07:16 +00:00
Michael Telatynski
9b5b053148
Use MatrixClientPeg::safeGet for strict typing (#10989) 2023-06-21 17:29:44 +01:00
Michael Telatynski
6b46d6e4f8
Add MatrixClientPeg::safeGet and use it in tests (#10985) 2023-06-05 18:12:23 +01:00
Michael Telatynski
938aefc51c
Pass around MatrixClients instead of using MatrixClientPeg (#11000) 2023-05-30 10:36:34 +01:00
Andy Balaam
67313743fc
Fall back to receipt timestamp if we have no event (react-sdk part) (#10974) 2023-05-26 14:14:47 +00:00
Michael Weimann
29780704f1
Add unread fallback logging (#10509) 2023-04-11 07:41:59 +00:00
Germain
3e2bf5640e
Update to supportsThreads (#9907) 2023-01-30 12:20:11 +00:00
Patrick Cloke
da2640b7ba
Display rooms & threads as unread (bold) if threads have unread messages. (#9763)
Co-authored-by: Germain <germain@souquet.com>
Co-authored-by: Germain <germains@element.io>
Fixes https://github.com/vector-im/element-web/issues/23907
2023-01-11 11:49:03 +00:00
Germain
9668a24ca7
Revert "Check each thread for unread messages. (#9723)" (#9745)
* Revert "Check each thread for unread messages. (#9723)"

This reverts commit 9de5654353.

* ts strict
2022-12-13 14:59:52 +00:00
Michael Weimann
dae13ac852
Merge branch 'develop' into weeman1337/prettier 2022-12-12 15:58:30 +01:00
Patrick Cloke
9de5654353
Check each thread for unread messages. (#9723)
Co-authored-by: Germain <germain@souquet.com>
Co-authored-by: Janne Mareike Koschinski <jannemk@element.io>
2022-12-12 14:34:05 +00:00
Michael Weimann
526645c791
Apply prettier formatting 2022-12-12 12:24:14 +01:00
Michael Telatynski
6009d1c176
Remove deprecated m.room.aliases references (#9431)
* Remove deprecated `m.room.aliases` references

* Update SlashCommands.tsx
2022-10-17 10:58:46 +01:00
Kerry
43773e134a
dont trigger unread counts for beacon location events (#9071) 2022-07-18 14:23:24 +00:00
Kerry
77d8a242af
unit test eventTriggersUnreadCount (#9070)
* unit test eventTriggersUnreadCount

* Update test/Unread-test.ts

Co-authored-by: Michael Weimann <michaelw@matrix.org>

Co-authored-by: Michael Weimann <michaelw@matrix.org>
2022-07-18 12:00:56 +00:00