Commit Graph

1145 Commits

Author SHA1 Message Date
Michael Telatynski
4a23630e06
Fix soft crash around inviting invalid MXIDs in start DM on first message flow (#9281)
* Fix soft crash around inviting invalid MXIDs

* Make ts --strict happier

* Prevent suggesting invalid MXIDs

* Add tests

* Fix coverage

* Fix coverage

* Make tsc --strict happier

* Fix test

* Add tests
2022-09-16 09:03:17 +01:00
Michael Telatynski
eace4d6894
Update image-media.ts (#9276) 2022-09-14 12:00:54 +01:00
Michael Telatynski
b1cecccb57
Fix thumbnail generation when offscreen canvas fails (#9272) 2022-09-13 13:34:35 +01:00
Michael Telatynski
e52ef4522d
Fix tile crash around tooltipify links (#9270) 2022-09-12 15:28:22 +01:00
Michael Telatynski
52fc8ff255
Fix html export not including images (#9260)
* Fix html export not including images

* Respect showPlaceholder

* Add tests
2022-09-08 10:00:58 +00:00
J. Ryan Stinnett
380653f5df
Fix plain text export saving (#9230)
This tweaks the MIME type of plain text exports so that the browser actually
saves the file.
2022-09-01 11:12:01 +01:00
Robin
0d6a550c33
Prepare for Element Call integration (#9224)
* Improve accessibility and testability of Tooltip

Adding a role to Tooltip was motivated by React Testing Library's
reliance on accessibility-related attributes to locate elements.

* Make the ReadyWatchingStore constructor safer

The ReadyWatchingStore constructor previously had a chance to
immediately call onReady, which was dangerous because it was potentially
calling the derived class's onReady at a point when the derived class
hadn't even finished construction yet. In normal usage, I guess this
never was a problem, but it was causing some of the tests I was writing
to crash. This is solved by separating out the onReady call into a start
method.

* Rename 1:1 call components to 'LegacyCall'

to reflect the fact that they're slated for removal, and to not clash
with the new Call code.

* Refactor VideoChannelStore into Call and CallStore

Call is an abstract class that currently only has a Jitsi
implementation, but this will make it easy to later add an Element Call
implementation.

* Remove WidgetReady, ClientReady, and ForceHangupCall hacks

These are no longer used by the new Jitsi call implementation, and can
be removed.

* yarn i18n

* Delete call map entries instead of inserting nulls

* Allow multiple active calls and consolidate call listeners

* Fix a race condition when creating a video room

* Un-hardcode the media device fallback labels

* Apply misc code review fixes

* yarn i18n

* Disconnect from calls more politely on logout

* Fix some strict mode errors

* Fix another updateRoom race condition
2022-08-30 15:13:39 -04:00
Michael Weimann
9ed5550501
Implement GroupCallUtils (#9131)
* Implement GroupCallUtils

* Trigger CI

* Use UnstableValue for new call event types

* Implement PR feedback
2022-08-10 08:51:54 +02:00
Michael Telatynski
e63072e21f
Fixes around URL tooltips and in-app matrix.to link handling (#9139)
* Add regression test for tooltipify exposing raw HTML

* Handle m.to links involving children better

* Comments

* Fix mistaken assertion
2022-08-09 15:37:55 +01:00
Michael Telatynski
48ae16b5a5
Fix pillification sometimes doubling up (#9152)
* Fix pillification sometimes doubling up

* Remove redundant assignment

* Add unit tests around pillification

* Kill ts-ignore
2022-08-09 15:37:13 +01:00
Šimon Brandner
7eaed1a3f8
Add option to stop sending read receipts (delabs MSC2285: private read receipts) (#8629)
Co-authored-by: Travis Ralston <travisr@matrix.org>
2022-08-05 17:33:57 +02:00
Michael Weimann
f10e3abb6e
Exclude functional members from DM detection (#9124)
* Exclude functional members from DM detection

* Fix getRoomFunctionalMembers test

* Simplify getFunctionalMembers

* Remove unnecessary filter
2022-08-01 19:28:33 +02:00
Michael Telatynski
45f6c32eb6
Make sonar happier (#9114)
* Make sonar happier

* Rename method
2022-07-29 11:01:15 +00:00
Johannes Marbach
e28fd8651e
Unbreak in-app permalink tooltips (#9087)
* Unbreak in-app permalink tooltips

Fixes: vector-im/element-web#22874
Signed-off-by: Johannes Marbach <johannesm@element.io>

* Appease the linter

* Fix the tests
2022-07-26 12:04:00 +01:00
Michael Weimann
c5eaeafe8e
Prepare utils for local rooms (#9084)
* Prepare utils for local rooms

* Split up direct-messages module
2022-07-25 10:17:40 +02:00
Michael Weimann
fa1bff67cf
Wire local room logic (#9078)
* Wire local room logic

* Migrate to testling-lib; update test descriptions
2022-07-20 09:26:25 +02:00
Kerry
dc6ceb1d1c
Live location share - focus on user location on list item click (PSG-609) (#9051)
* extract preventDefaultWrapper into utils

* add click handling to beacon list item

* add click handling to dialog sidebar

* focus in on beacons when clicked in list

* stylelint

* fussy import ordering

* test beacon focusing in beaocnviewdialog
2022-07-18 08:34:39 +00:00
Michael Weimann
742b21ca46
Extract ValidatedServerConfig (#9054) 2022-07-14 15:03:34 +02:00
Robin
4dd74261b5
Hide screenshare button in video rooms on Desktop (#9045)
* Hide screenshare button in video rooms on Desktop

* Fix tests
2022-07-12 08:23:35 -04:00
Michael Telatynski
0bc2f1c101
Fix event list summaries including invalid events (#9041) 2022-07-11 16:25:11 +01:00
Janne Mareike Koschinski
a9d6896502
Correct accessibility labels for unread rooms in spotlight (#9003)
* Correct accessibility labels for unread rooms in spotlight
* Improve public room result accessibility
* Improve room result accessibility
2022-07-11 11:34:23 +00:00
Šimon Brandner
19e514d83c
Remove dead code (#9035) 2022-07-11 07:52:44 +02:00
Michael Weimann
8641a5210b
Add LocalRoom (#9023) 2022-07-11 07:33:37 +02:00
Kerry
cc8d78d971
Location sharing - add localised strings to map (#9025)
* add localised strings to map

* fussy import ordering

* remove unused scale control strings from override
2022-07-08 15:08:05 +00:00
Travis Ralston
644b841591
Replace MSC3244 support with in-client room version checking (#9018)
* Replace MSC3244 support with in-client room version checking

* Fix irrelevant ternary

* It helps to use Jest correctly
2022-07-08 00:32:38 -06:00
Johannes Marbach
6f21a155a4
Add option to display tooltip on link hover (#8394)
* Add option to display tooltip on link hover

This makes it possible for platforms like Electron apps, which lack
a built-in URL preview in the status bar, to enable tooltip previews
of links.

Relates to: vector-im/element-web#6532
Signed-off-by: Johannes Marbach <johannesm@element.io>

* Gracefully handle missing platform

* Use public access modifier

Co-authored-by: Travis Ralston <travpc@gmail.com>

* Use exact inequality

Co-authored-by: Travis Ralston <travpc@gmail.com>

* Document getAbsoluteUrl

* Appease the linter

* Clarify performance impact in comment

Co-authored-by: Travis Ralston <travpc@gmail.com>

* Use URL instead of anchor element hack

* Wrap anchor in tooltip target and only allow focus on anchor

* Use optional chaining

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>

* Use double quotes for consistency

* Accumulate and unmount tooltips and extract tooltipify.tsx

* Fix indentation

* Blur tooltip target on click

* Remove space

* Mention platform flag in comment

* Add (simplistic) tests

* Fix lint errors

* Fix lint errors ... for real

* Replace snapshot tests with structural assertions

* Add missing semicolon

* Add tooltips in link previews

* Fix copyright

Co-authored-by: Travis Ralston <travpc@gmail.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-07-06 09:43:30 +00:00
Travis Ralston
7f5bb61a79
Support a module API surface for custom functionality (#8246)
* Early implementation of module API surface + functions for ILAG module

* Wire up dialog functions and ILAG-needed surface

* Ensure component renders for modules get overridden

* Respond to changes from module API interface

* Use a real module-api dependency

* Update for new Dialogs interface

* Add support for getConfigValue from module API

* Update the remainder of the module API interface

* Docs & cleanup

* Add some unit tests around module stuff

Needs end-to-end tests still.

* Appease early linters

* Break import cycles by not directly depending on Lifecycle

* Appease the linter

* Fix bad merge
2022-07-05 12:26:44 -06:00
Kerry
ed92071046
Live location share - open latest location in map site (#8981)
* move getForwardableBeacon to beacon utils

* move event transform type up

* add helper to get shareable-as-locaion events

* use getShareableLocationEvent in MessageContextMenu

* test opening in maplink

* fix bad copy pasted tests
2022-07-04 16:05:55 +02:00
Michael Weimann
a2f31fdfb4
Location (live) share replies now provide a fallback content (#8949)
* Implement location share reply fallback content

* Replace single condition switch with if
2022-07-01 08:01:22 +02:00
Michael Telatynski
89ae540faa
Respect filename field on m.file events (#8951) 2022-06-30 16:22:52 +01:00
Michael Telatynski
bb859d5886
Fix wrong assertions that all media events have a mimetype (#8946) 2022-06-30 14:35:40 +01:00
Janne Mareike Koschinski
d4a4eeaf63
Allow finding group DMs by members in spotlight (#8922) 2022-06-30 11:44:56 +02:00
Kerry
eaf13d490e
Live location share - disallow message pinning (PSF-1084) (#8928)
* unmock isContentActionable

* test message pinning

* disallow pinning for beacon events

* try to make tests more readable
2022-06-29 07:11:33 +00:00
Kerry
5538161acd
render message deleted tile for beacons (#8905) 2022-06-27 14:21:22 +02:00
Suguru Hirahara
4b2a922e2e
Remove mx_GroupLayout (#8876) 2022-06-25 13:51:07 +02:00
Kerry
b51ef246ab
Live location share - forward latest location (PSF-1044) (#8860)
* handle beacon location events in ForwardDialog

* add transformer for forwarded events in MessageContextMenu

* remove canForward

* update snapshots for beacon model change

* add comments

* fix bad copy pasted test

* add test for beacon locations
2022-06-17 15:27:08 +02:00
Michael Weimann
aac97e01e3
Reload map on reconnect (#8848)
PSD-282
2022-06-15 16:38:35 +02:00
Janne Mareike Koschinski
5096e7b992
Integrate searching public rooms and people into the new search experience (#8707)
* Implement searching for public rooms and users in new search experience
* Implement loading indicator for spotlight results
* Moved spotlight dialog into own subfolder
* Extract search result avatar into separate component
* Build generic new dropdown menu component
* Build new network menu based on new network dropdown component
* Switch roomdirectory to use new network dropdown
* Replace old networkdropdown with new networkdropdown
* Added component for public room result details
* Extract hooks and subcomponents from SpotlightDialog
* Create new hook to get profile info based for an mxid
* Add hook to automatically re-request search results
* Add hook to prevent out-of-order search results
* Extract member sort algorithm from InviteDialog
* Keep sorting for non-room results stable
* Sort people suggestions using sort algorithm from InviteDialog
* Add copy/copied tooltip for invite link option in spotlight
* Clamp length of topic for public room results
* Add unit test for useDebouncedSearch
* Add unit test for useProfileInfo
* Create cypress test cases for spotlight dialog
* Add test for useLatestResult to prevent out-of-order results
2022-06-15 16:14:05 +02:00
Michael Telatynski
d81e2cea14
Remove unused sessionStorage layer (#8834)
* Remove unused sessionStorage layer

* Update global.d.ts

* Fix tests
2022-06-14 21:29:24 +01:00
Michael Telatynski
3c5c2bef6d
Remove Piwik support (#8835)
* Remove all mentions of Piwik

* Kill off all consumer of the old Piwik Analytics module

* Simplify ModalManager interface

* i18n

* Attempt to fix old e2e tests

* Remove unused component

* Iterate PR
2022-06-14 17:51:51 +01:00
Travis Ralston
b5e18064ab
Import React to appease IDE linter (#8817)
Apparently we shouldn't be using global references to React, so import it.
2022-06-11 21:17:55 +00:00
Robin
d9396b0b54
Expire video member events after 1 hour (#8776)
* Expire video member events after 1 hour

* Iterate based on feedback

* Validate the types of video member events better

* Even more parentheses
2022-06-09 13:19:52 +00:00
Kerry
2bdb4d396a
Live location share - show loading UI for beacons with start timestamp in the future (PSF-1081) (#8775)
* check for beacons that are yet to start and show loading ui

Signed-off-by: Kerry Archibald <kerrya@element.io>

* update snapshots for js-sdk rename

Signed-off-by: Kerry Archibald <kerrya@element.io>

* remove debug

Signed-off-by: Kerry Archibald <kerrya@element.io>

* Update test/components/views/messages/MBeaconBody-test.tsx

Co-authored-by: Travis Ralston <travisr@matrix.org>

* Update src/components/views/beacon/displayStatus.ts

Co-authored-by: Travis Ralston <travisr@matrix.org>

Co-authored-by: Travis Ralston <travisr@matrix.org>
2022-06-09 13:25:30 +01:00
Michael Telatynski
8036985204
Update matrix-analytics-events to @matrix-org/analytics-events (#8778)
* Update matrix-analytics-events to @matrix-org/analytics-events

* Update install-deps.sh

* Update layered.sh

* Update BeaconMarker-test.tsx.snap

* Update BeaconStatus-test.tsx.snap
2022-06-07 20:08:36 +01:00
Michael Telatynski
21d0aaf524
Use updates stable relations from js-sdk (#8715)
* Use updates stable relations from js-sdk

* Relations is now accessible on the Room instead

* Reuse more existing code and ditch confusing `isThreadRelation`

* Fix last usage of removed `isThreadRelation`

* Update tests to match removal of isThreadRelation

* Tweak method naming to closer match spec

* Fix missing method name change
2022-06-07 11:16:54 +01:00
Kerry
79a2dfe171
Live location share - enable reply and react to tiles (#8721)
* test most basic paths in messageactionbar

Signed-off-by: Kerry Archibald <kerrya@element.io>

* tidy

Signed-off-by: Kerry Archibald <kerrya@element.io>

* use rtl for MessageActionBar test

Signed-off-by: Kerry Archibald <kerrya@element.io>

* make beacon_info events semi actionable

Signed-off-by: Kerry Archibald <kerrya@element.io>

* remove log

Signed-off-by: Kerry Archibald <kerrya@element.io>

* test thread exception for beacon

Signed-off-by: Kerry Archibald <kerrya@element.io>

* eat click events in beacon status to stop jumping from reply tile

Signed-off-by: Kerry Archibald <kerrya@element.io>

* set max width on beaconbody for render in thread panel
2022-06-02 15:43:19 +00:00
Janne Mareike Koschinski
a74b9a7083
Prevent Invite and DevTools dialogs from being cut off (#8646)
* fix: replace fixed height based styling with flex for invite and dev dialogs
* feat: create flex wrapper class for dialogs
* feat: make invite dialogs use flex layout
* feat: make devtools dialogs use flex layout
2022-06-02 15:59:40 +02:00
Robin
f152310c08
Use random widget IDs for video rooms (#8739) 2022-06-02 09:10:22 -04:00
Johannes Krude
b776cc8c1f
Fetch homeUrl from .well-known (#7790)
* Fetch homeUrl from .well-known

* homeUrl: prefer config.json over .well-known

* homeUrl: prefer deprecated config.json variant over .well-known

* Apply suggestions from code review

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: Travis Ralston <travisr@matrix.org>
2022-05-30 19:01:55 +00:00
Kerry
15c2fb6b71
Live location sharing - open location in OpenStreetMap (PSF-1040) (#8695)
* share plain lat,lon string from beacon tooltip and list item

Signed-off-by: Kerry Archibald <kerrya@element.io>

* export makeMapSiteLink helper fn

Signed-off-by: Kerry Archibald <kerrya@element.io>

* use currentColor in external-link.svg

Signed-off-by: Kerry Archibald <kerrya@element.io>

* add open in openstreetmap link

Signed-off-by: Kerry Archibald <kerrya@element.io>

* fussy import ordering

Signed-off-by: Kerry Archibald <kerrya@element.io>

* fix icon color var

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-05-27 11:58:39 +02:00