Commit Graph

126 Commits (bfe219bdaafce7b4d39f7bea6e0cf5e9bb8982a1)

Author SHA1 Message Date
Michael Weimann 488a08a25e
Allow reactions for broadcasts (#9856) 2023-01-05 08:40:09 +01:00
Germain adab82edae
Migrate TextualBody to RTL (#9845) 2022-12-29 16:21:00 +00:00
renovate[bot] af3715821b
Update dependency maplibre-gl to v2 (#9699)
* Update dependency maplibre-gl to v2

* update types and mocks for maplibre 2.0

* prettier + strict fix

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Kerry Archibald <kerrya@element.io>
2022-12-18 23:17:15 +00:00
Germain 2d2755d145
🧵 Enable threads by default (#9736)
* Delabs threads

* remove threads reload when labs is toggled

* Fix ts strict

* fix rebase mistake

* remove .only

* fix pr comments

* re-introduce backwards compat

* Fix export test

* Fix SearchREsultTile test

* strict ts
2022-12-13 15:09:15 +00:00
Michael Weimann 526645c791
Apply prettier formatting 2022-12-12 12:24:14 +01:00
Robin 2c612d5aa1
Use native js-sdk group call support (#9625)
* Use native js-sdk group call support

Now that the js-sdk supports group calls natively, our group call implementation can be simplified a bit. Switching to the js-sdk implementation also brings the react-sdk up to date with recent MSC3401 changes, and adds support for joining calls from multiple devices. (So, the previous logic which sent to-device messages to prevent multi-device sessions is no longer necessary.)

* Fix strings

* Fix strict type errors
2022-11-28 16:37:32 -05:00
Eric Eastwood 2393510a7f
Fix `getRelationsForEvent` under TypeScript `strict` mode (#9558)
* Fix getRelationsForEvent tsc strictness

* Use shared type for GetRelationsForEvent

* Fix lint

* Add alternative type

* getRelationsForEvent is not required

* Relations are optional

* Reactions are optional

* We expect relations in these tests

* Add more protection if the eventID is not defined

* Allow null too

* Better test typing

* User ID is not necessary unless something is selected

* It's okay to [].includes(null)

* Null is as good as undefined here

* Null or undefined is good here

* We have some expectations for the tests

* The room and user can be undefined too

* Protec

* Reactions are optional

* Try match signatures

* Null or undefined

* More null or undefined

* Protec

* Fix typo (wrong variable)

* Remove optional params

See https://github.com/matrix-org/matrix-react-sdk/pull/9558#discussion_r1017515913

* Fix up last maaaaybe relevant lint

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-11-21 20:54:24 -07:00
Michael Telatynski 590b845f3f
Remove all usages of UNSAFE_* React methods (#9583) 2022-11-18 09:22:43 +00:00
Germain 38dbe8ed33
Migrate some tests to React Testing Library (#9584) 2022-11-18 09:16:11 +00:00
Germain e8d4fbb8ff
Fix missing avatar for show current profiles (#9563) 2022-11-11 16:02:01 +00:00
Michael Weimann fca6ff271c
Extract requestMediaPermissions (#9568) 2022-11-11 10:38:51 +01:00
Michael Telatynski 962e8e0b23
Differentiate download and decryption errors when showing images (#9562) 2022-11-10 09:27:20 +00:00
Germain 3f3005a3ca
Always use current profile on thread events (#9524) 2022-11-08 10:58:26 +00:00
Michael Telatynski 04bc8fb71c
Optimise Jest run in CI (#9542) 2022-11-04 10:48:08 +00:00
Michael Weimann 84f2974b57
Always show voice broadcasts tile (#9444) 2022-10-19 12:04:15 +02:00
Michael Weimann cd806427c8
Add MessageEvent voice broadcast setting watch (#9399) 2022-10-12 11:34:41 -06:00
Michael Telatynski 6b30a5e1c9
Migrate some enzyme tests to RTL (#9383) 2022-10-10 16:29:10 +01:00
Robin 06dbea6255
New group call experience: Room header and PiP designs (#9351)
* Update our cancel icon

The cancel icon we're using in the app has drifted out of sync with the ones used in our designs. We also had two identical-looking icons, so this consolidates them into one.

I've simultaneously updated our chevron icons, since in the case of the 'jump to unread' timeline button, it became clear that the weight of the new close icon did not match the thinner chevron.

* Don't squish bottom/top-aligned tooltips near the edge of the screen

* Close the timeline panel when returning to the fullscreen timeline view

* Add layout switching capabilities to ElementCall

* Bring the room header in line with the group call designs

* Bring the PiP header in line with the group call designs

* Fix lints

* Clarify tooltip CSS calculations

* Test PipView

* Expand RoomHeader test coverage

* Test PipView more
2022-10-07 02:27:28 +00:00
Kerry 8399b63e7a
fix threadsupport type issues in tests (#9359) 2022-10-06 08:35:06 +00:00
Robin ff59f68a9f
New group call experience: Call tiles (#9332)
* Add call tiles

* Factor CallDuration out into a reusable component

* Correct the separator character in LiveContentSummary
2022-09-30 19:26:08 +00:00
Šimon Brandner 3eecd68175
Fix context menu being opened when clicking message action bar buttons (#9200) 2022-08-18 09:18:18 +02:00
Michael Weimann 27ba1e57e6
Update matrix-org/react (enzyme deprecation) (#9116) 2022-08-02 15:10:43 +02:00
Michael Telatynski d5db131eef
Spike AXE A11Y testing in Cypress (#9111)
* Spike AXE A11Y testing in Cypress

* Fix NewRoomIntro breaking html/aria list rules

* Fix HeaderButtons breaking aria role semantics rules

* missing type

* Switch left panel from aside to nav and include space panel

* Give the page a main heading of the room name when viewing a room

* Use header landmark on RoomHeader

* Improve aria attributes on composer when autocomplete is closed

* Fix aria-owns on RoomHeader

* Give Spinner an aria role

* Give server picker help button an aria label

* Improve auth aria attributes and semantics

* Improve heading semantics in use case selection screen

* Fix autocomplete attribute to be valid

* Fix heading semantics on login page

* Improve Cypress axe testing

* Add axe tests

* Stop synapse after the timeline tests

* Await spinners to fade before percy snapshotting timeline tests

* Improve naming of plugin

* Update snapshots

* Fix accidental heading change

* Fix double synapse stoppage

* Fix Cypress timeline avatar assertions to be DPI agnostic

* Fix aria attributes on date separators

* delint

* Update snapshots

* Revert style change

* Skip redundant call
2022-08-01 08:31:14 +01:00
Šimon Brandner 787ace9dc5
Add `Reply in thread` button to the right-click message context-menu (#9004) 2022-07-23 12:13:49 +00: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
yaya-usman 017f489be6 nits fixes 2022-07-15 22:55:11 +03:00
Kerry 60faf6d025
Live location share - tiles without tile server (PSG-591) (#8962)
* live location without map POC

* styles

* force map tiles to show no map for test build

* check latestlocationstate exists

* just use loading style map fallback when cant display map

* style map error for tile view

* set pointer cursor when map error is clickable

* test mbeaconbody with map display error, lint

* lint more good

* remove changes for first attempt tile

* make maperror test id more accurate

* fussy import ordering

* PR tweaks
2022-07-06 14:34:33 +00:00
Kerry 7afc8c5869
Task - replace img icons with svg components (#8963)
* add role=presentation to backdrop panle image

* replace img icons with svg components in InviteDialog

* replace img icon with svg component

* img icons to svg icons in MImageBody

* remove log

* img icon to svg in SecurityRoomSettingsTab

* use shared error message for media message tiles

* remove nbsp

* dont snapshot test entire rtl render response

* use aria-describedby for uploadconfirm preview

* use aria-labelledby instead
2022-07-06 13:29:26 +02:00
sha-265 a009f8001a
Add bidirectonal isolation for pills (#8985) 2022-07-05 11:37:35 +00:00
Kerry 4486509d88
Live location share - redact related locations on beacon redaction (PSF-1151) (#8926)
* redact beacon locations on redaction

* redact beacon locations on beacon info redaction

* fussy import ordering

* use real fake redaction in beaconbody test
2022-06-29 09:07:36 +00:00
Suguru Hirahara b1e07e8ef0
Make the pill text single line (#8744) 2022-06-19 11:56:37 +02:00
Andy Balaam 0a90674e89
Fix crash when drawing blurHash for portrait videos PSB-139 (#8855) 2022-06-17 11:03:29 +00:00
Michael Weimann aac97e01e3
Reload map on reconnect (#8848)
PSD-282
2022-06-15 16:38:35 +02: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
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 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
Kerry 158e42f764
Unit test MessageActionBar (#8732)
* test most basic paths in messageactionbar

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

* tidy

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

* add rtl

* add code style note about using rtl

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

* downgrade to rtl 12

* use rtl for MessageActionBar test

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

* try mocking settingsstore for ci only failure

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

* mock setValue too

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

* uupdate lockfile

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-06-02 10:25:56 +02:00
Michael Telatynski fe21ec8715
Consolidate random string generation to make Sonar happier (#8675)
* Consolidate random string generation to make Sonar happier

* Update snapshots
2022-05-24 09:05:11 +01:00
Michael Weimann 1535ff0d6c
Move map attribution to top right (#8621)
Signed-off-by: Michael Weimann <michaelw@matrix.org>

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-05-23 12:19:59 +02:00
Kerry 804ddbb332
Live location sharing - update live location tiles (PSF-1027) (#8649)
* update map svg

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

* add map fallback component, update styls

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

* update purple location icon style

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

* fussy import ordering

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

* tidy

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-05-20 09:49:01 +00:00
Šimon Brandner fb30b67b14
Fix issues with the new topic dialog (#8608) 2022-05-16 14:10:00 +02:00
Kerry fbbb9c27ba
Live location share - beacon tooltip in maximised view (#8572) PSF-926
* pass optional tooltip prop down through markers

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

* add beaconstatustooltip, handle overflow on beacon status label

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

* remove debug, fix mouseout

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

* tidy comments

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-05-13 08:30:53 +00:00
Robin 765a715fce
Remove duplicate tooltip from user pills (#8512)
* Remove duplicate tooltip from user pills

* Fix test
2022-05-06 21:26:32 +00:00
Kerry 12af3038a8
fix message indent in thread view (#8462)
Signed-off-by: Kerry Archibald <kerrya@element.io>

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-05-03 13:51:50 +02:00
Robin 1c70696b10
Don't linkify code blocks (#7859)
* Don't linkify code blocks

Signed-off-by: Robin Townsend <robin@robin.town>

* Put the linkify ignoreTags option in the right place

Signed-off-by: Robin Townsend <robin@robin.town>

* Add code to list of ignored linkification tags as well

Signed-off-by: Robin Townsend <robin@robin.town>

* Test that code blocks skip linkification

Signed-off-by: Robin Townsend <robin@robin.town>

* Move test to the right spot

Signed-off-by: Robin Townsend <robin@robin.town>

* Use a snapshot instead for test

Signed-off-by: Robin Townsend <robin@robin.town>
2022-05-03 00:26:37 +00:00
Kerry ecd7d8b5e8
Unit test typescriptification - MKeyVerificationConclusion (#8435)
* test/components/views/messages/MKeyVerificationConclusion-test.js -> tsx

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

* ts fixes

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

* add missing copyright

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-28 11:44:04 +00:00
Kerry 1127db0514
Unit test typescriptification - TextualBody (#8433)
* test/components/views/messages/TextualBody-test.js -> tsx

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

* fix ts issues in textualbody

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

* remove type-removing context wrapper, fix more

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-28 09:32:50 +00:00
Kerry 70cdd57a5c
Live location sharing: move test utils into utils (#8365)
* move makeRoomWithState events to test utils

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

* move beacon test helpers into utils

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

* remove file

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

* more types

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-19 16:47:19 +00:00
Kerry f70186ea9b
Live location sharing: set map bounds to include all locations (#8324)
* open a dialog with map centered around first beacon

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

* test dialog opening from beacon body

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

* test beaconmarker

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

* add bounds to Map comp

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

* add focusBeacon to beaconviewdialog, use bounds

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

* lint

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

* use membercolor on beacon view markers

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

* add lnglatbounds to maplibre mock

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

* update snapshots for expanded maplibre Map mock

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

* test map bounds

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

* tidy copy paste comment

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

* add fallback when no more live locations

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

* accurate signature for getBoundsCenter

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-19 11:35:39 +00:00