* Add tests for unread notification facilities
Add some tests to guarantee some consistency in `useUnreadNotifications` and
`RoomNotificationState`.
Signed-off-by: Clark Fischer <clark.fischer@gmail.com>
* Add RoomNotifs#determineUnreadState
Intended as a singular replacement for the divergent implementations before.
Signed-off-by: Clark Fischer <clark.fischer@gmail.com>
* Unify room unread state determination
Have both the class-based facility and the hook use the new unified logic in
`RoomNotifs#determineUnreadState`.
Addresses https://github.com/vector-im/element-web/issues/24229
Signed-off-by: Clark Fischer <clark.fischer@gmail.com>
---------
Signed-off-by: Clark Fischer <clark.fischer@gmail.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* noImplicitAny fixes for MessageDiffUtils
Signed-off-by: Clark Fischer <clark.fischer@gmail.com>
* Add tests for MessageDiffUtils
Adds mostly snapshot tests for MessageDiffUtils to guarantee consistent
behavior.
Signed-off-by: Clark Fischer <clark.fischer@gmail.com>
* Strict mode fixes for MessageDiffUtils
Gets `MessageDiffUtils` to pass under `tsc --strict`.
Fixes https://github.com/vector-im/element-web/issues/23665 - no longer errors,
though it still isn't correct.
Signed-off-by: Clark Fischer <clark.fischer@gmail.com>
* Remove obsolete DiffDOM workaround
Workaround is no longer necessary as of DiffDOM 4.2.1
See https://github.com/fiduswriter/diffDOM/issues/90
Signed-off-by: Clark Fischer <clark.fischer@gmail.com>
---------
Signed-off-by: Clark Fischer <clark.fischer@gmail.com>
* should open new 1:1 chat room after leaving the old one
Signed-off-by: Ahmad Kadri <ahmad.kadri@nordeck.net>
* change the copyright
* update the test
Signed-off-by: AHMAD KADRI <52747422+ahmadkadri@users.noreply.github.com>
---------
Signed-off-by: Ahmad Kadri <ahmad.kadri@nordeck.net>
Signed-off-by: AHMAD KADRI <52747422+ahmadkadri@users.noreply.github.com>
Co-authored-by: Oliver Sand <oliver.sand@nordeck.net>
Co-authored-by: Dominik Henneke <dominik.henneke@nordeck.net>
* Strict typechecking fixes for Base/Member/Avatar
Update the core avatar files to pass `--strict --noImplicitAny` typechecks.
Signed-off-by: Clark Fischer <clark.fischer@gmail.com>
* Add tests for Base/Member/Avatar
More thoroughly test the core avatar files. Not necessarily the most thorough,
but an improvement.
Signed-off-by: Clark Fischer <clark.fischer@gmail.com>
* Extract TextAvatar from BaseAvatar
Extracted the fallback/textual avatar into its own component.
Signed-off-by: Clark Fischer <clark.fischer@gmail.com>
* Use standard HTML for non-image avatars
Firefox users with `resistFingerprinting` enabled were seeing random noise
for rooms and users without avatars. There's no real reason to use data
URLs to present flat colors.
This converts non-image avatars to inline blocks with background colors.
See https://github.com/vector-im/element-web/issues/23936
Signed-off-by: Clark Fischer <clark.fischer@gmail.com>
* Have pills use solid backgrounds rather than colored images
Similar to room and member avatars, pills now use colored pseudo-elements
rather than background images.
Signed-off-by: Clark Fischer <clark.fischer@gmail.com>
---------
Signed-off-by: Clark Fischer <clark.fischer@gmail.com>
Co-authored-by: Andy Balaam <andy.balaam@matrix.org>