* Switch to linkify-react instead of our faulty implementation
Fixes a series of soft crashes where errors include "The node to be removed is not a child of this node."
* Improve types
* Fix types
* Update snapshots
* Add test
* Fix test
* Revert "Apply more general fix for base avatar regressions (#10045)"
This reverts commit 371a3c0d36.
* Revert "Fix layout and visual regressions around default avatars (#10031)"
This reverts commit 0d1fce37b2.
* Revert "Member avatars without canvas (#9990)"
This reverts commit a8aa4de4b4.
* Update snapshots
* 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>
* Fix viewing source of redacted events
Clicking 'View Source' in the context menu of a redacted event causes an error,
and the user gets no visible result.
This fixes <ViewSource /> to indicate that the source is unavailable when a
message has been redacted. The original source remains available.
<SyntaxHighlight /> requires a non-null string for its `content` prop, and, in
the case of redacted events, <ViewSource /> was passing `undefined`. This is
ultimately because redacting an event causes `MatrixEvent.clearEvent` to be
`undefined`, which <ViewSource /> wasn't checking.
Fixes https://github.com/vector-im/element-web/issues/24165
Signed-off-by: Clark Fischer <clark.fischer@gmail.com>
* Use correct highlight.js call
Previous call signature was deprecated.
See https://github.com/highlightjs/highlight.js/issues/2277
Signed-off-by: Clark Fischer <clark.fischer@gmail.com>
Signed-off-by: Clark Fischer <clark.fischer@gmail.com>
* Fix issue where thread dropdown would not correctly
* Write additional test for both issues
- Thread dropdown should be shown if there is any thread, even if not participated
- Thread list correctly updates after every change of the dropdown immediately
* Factor out `MessageEvent.from()` usage
The class/function is disappearing from the events-sdk, at least in this form.
* Manually create contents for events used by cypress
The utility function is out of range of the calling code at runtime, for some reason.
* Run prettier
* Maybe this will fix the build
* Remove unnecessary PipContainer component
* Redesign the picture-in-picture window
* Add a hover effect to the controls
* Clarify that WidgetPip has call-specific behavior
* Fix blank timeline when thread root is UTD
* add test for pre join uisi checks and thread roots
* ts strict fix
* Update to timeline panel test
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Fixes to TimelinePanel-test
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* super WIP POC for merging virtual room events into main timeline
* remove some debugs
* c
* add some todos
* remove hardcoded fake virtual user
* insert overlay events into main timeline without resorting main tl events
* remove more debugs
* add extra tick to roomview tests
* RoomView test case for virtual room
* test case for merged timeline
* make overlay event filter generic
* remove TODOs from LegacyCallEventGrouper
* tidy comments
* remove some newlines
* test timelinepanel room timeline event handling
* use newState.roomId
* fix strict errors in RoomView
* fix strict errors in TimelinePanel
* add type
* pr tweaks
* strict errors
* more strict fix
* strict error whackamole
* update ROomView tests to use rtl