Commit Graph

68 Commits (55b579afefa86f704f64031e5b8d4814ca92a2d1)

Author SHA1 Message Date
Kerry dd6fc124d7
Apply strictNullChecks to src/components/views/location/* (#10249
* strict fixes

* accessiblebutton without onClick explicit

* strict fix for UserMenu BaseAvatar
2023-02-28 08:55:59 +00:00
Michael Telatynski 76b82b4b2b
Make more code conform to strict null checks (#10219
* Make more code conform to strict null checks

* Fix types

* Fix tests

* Fix remaining test assertions

* Iterate PR
2023-02-24 15:28:40 +00:00
Michael Telatynski c29e5f18ff
Update usages of test utilities preferring RTL (#10203) 2023-02-22 10:52:55 +00:00
Kerry 3fafa4b58d
Port location unit tests from enzyme to react-testing-library (#10181)
* SmartMarker test to rtl

* LocationPicker to rtl

* LocationViewDialog to rtl

* LocationShareMenu to rtl

* use toBeDisabled assertion
2023-02-20 18:35:39 +00:00
Michael Telatynski 145a5a8a8d
Conform more code to strict null checking (#10153)
* Conform more code to strict null checking

* Conform more code to strict null checking

* Iterate

* Iterate
2023-02-15 13:36:22 +00:00
Michael Weimann 742fc25a11
Migrate LiveDurationDropdown-test.tsx to react-testing-library (#10151) 2023-02-14 08:53:36 +01:00
Johannes Marbach d0e9331f07
Merge branch 'develop' into johannes/find-myself 2023-02-13 20:16:04 +01:00
Michael Telatynski 61a63e47f4
Comply with noImplicitAny (#9940)
* Stash noImplicitAny work

* Stash

* Fix imports

* Iterate

* Fix tests

* Delint

* Fix tests
2023-02-13 11:39:16 +00:00
Johannes Marbach 886ecbcc58 Update snapshots 2023-02-10 08:48:37 +01:00
Johannes Marbach f842e319de
Merge branch 'develop' into johannes/find-myself 2023-02-08 16:42:14 +01:00
Michael Weimann 2c30e6d909
Migrate `ZoomButtons-test` to react-testing-library (#10104) 2023-02-08 09:31:24 +01:00
Johannes Marbach 69268856cf Update snapshot 2023-02-08 08:38:12 +01:00
Johannes Marbach e5e2a825fb Make geolocate update with allowGeolocate 2023-02-07 20:46:10 +01:00
Kerry Archibald 06d8755f6b add tests for geolocate self on map views 2023-02-07 16:51:58 +13:00
Johannes Marbach fdac94a841 Update snapshot 2023-02-04 20:58:53 +01:00
Germain 1e8b59ea40
Migrate Enzyme to RTL (#9842) 2022-12-29 15:35:19 +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
Michael Weimann 526645c791
Apply prettier formatting 2022-12-12 12:24:14 +01:00
Michael Telatynski d258402186
Typescript updates (#9658)
* Typescript updates

* Update @types/node

* Fix more types
2022-11-30 11:32:56 +00:00
Michael Telatynski da779531f1
Close context menu when a modal is opened to prevent user getting stuck (#9560) 2022-11-09 15:33:09 +00:00
Michael Telatynski 04bc8fb71c
Optimise Jest run in CI (#9542) 2022-11-04 10:48:08 +00:00
Šimon Brandner 26a74a193f
Add Element Call room settings (#9347)
Co-authored-by: Robin <robin@robin.town>
2022-10-07 18:10:17 +00:00
Johannes Marbach 4a14882938
Move pin drop out of labs (PSG-664) (#9135)
* Move pin drop out of labs (PSG-664)

Signed-off-by: Johannes Marbach <johannesm@element.io>

* Regenerate strings

Signed-off-by: Johannes Marbach <johannesm@element.io>
2022-08-08 10:57:38 +02:00
Michael Weimann 27ba1e57e6
Update matrix-org/react (enzyme deprecation) (#9116) 2022-08-02 15:10:43 +02:00
Kerry bda272dce4
Live location share - handle insufficient permissions in location sharing (PSG-610) (#9047)
* handle insufficient permissions in location sharing

* reformat ternaries
2022-07-13 10:55:08 +00:00
Michael Weimann 3be20cf434
Use doMaybeLocalRoomAction (#9038)
* Use doMaybeLocalRoomAction

* Revert unnecessary changes
2022-07-13 07:56:36 +02:00
Šimon Brandner 19e514d83c
Remove dead code (#9035) 2022-07-11 07:52:44 +02: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 4eab0deeb3
Live location share - explicitly stop beacons replaced beacons (PSG-544) (#8933)
* explicitly stop beacons before creating new ones

* remove unnecessary optional chain
2022-06-30 07:33:51 +00: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 91cbd4dc8a
hide live location option when composer has relation (#8746)
Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-06-03 10:28:19 +02:00
Kerry 14cf6275d0
Fix: AccessibleButton does not set disabled attribute (PSF-1055) (#8682)
* remove old styles for pin drop buttons

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

* fully disable share location button until location is shared

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

* set disabled on button

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

* test AccessibleButton disabled

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

* remove disbaled check in LocationPicker

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-05-27 07:13:50 +00: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
Travis Ralston e87bda9f37
Add an option to ignore (block) a user when reporting their events (#8471)
* Add an option to ignore (block) a user when reporting their events

This is primarily useful if the content being reported really doesn't belong on your screen, and the room moderators are slow to react.

Ideally we'd use the word "block" instead of "ignore", but we call it "ignore user" everywhere else. See https://github.com/vector-im/element-web/issues/19590 for further context on the word choice.

This change includes a minor refactor to the styles of labelled toggles (for reusability).

* Appease the linter

* Use a checkbox instead of toggle in the dialog

* Update classnames handling for toggle switch

* Appease the linter
2022-05-18 16:20:55 +00: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
Kerry 3b1e715854
Live location sharing: remove geoUri logs (#8465)
* remove geoUri logs

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

* Update src/components/views/location/Map.tsx

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

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-05-03 08:29:43 +00:00
Kerry 699a9aeaaf
LLS: expose way to enable live sharing labs flag from location dialog (#8416)
* add state for waiting for labs flag

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

* add enable live share component

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

* test enabling live share labs flag

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-28 13:37:20 +02:00
Kerry 988d300258
Live location sharing: only share to beacons created on device (#8378)
* create live beacons in ownbeaconstore and test

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

* more mocks in RoomLiveShareWarning

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

* extend mocks in components

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

* comment

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

* remove another comment

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

* extra ? hedge in roommembers change

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

* listen to destroy and prune local store on stop

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

* tests

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

* update copy pasted copyright to 2022

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-22 12:05:36 +00:00
Kerry 399ac618c7
LLS: fix jumpy maximised map (#8387)
* add maxzoom to map fit bounds

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

* take snapshot of bounds at center on dialog open

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-21 18:56:11 +02: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
Kerry f95106d2c6
Live location sharing - basic maximised beacon map (#8310)
* open a dialog with map centered around first beacon

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

* add room member markers

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

* fix unmount issue in smart marker

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

* dont throw on no more live locations

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

* cursor on beacon maps

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

* fussy import ordering

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>

* test BeaconViewDialog

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

* comment

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

* use unstable prefix for wk tile_Server

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

* unstable prefix for new m.tile_server use in test

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-14 13:14:05 +00:00
Kerry 9ba55d1d14
Live location sharing - consolidate maps (#8236)
* extract location markers into generic Marker

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

* wrap marker in smartmarker

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

* test smartmarker

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

* working map in location body

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

* test Map

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

* remove skinned sdk

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

* update snaps with new mocks

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

* use new ZoomButtons in MLocationBody

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

* make LocationViewDialog map interactive

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

* test MLocationBody

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

* test LocationViewDialog

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

* add copyrights, shrink snapshot

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

* update comment

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

* lint

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

* lint

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-11 18:40:06 +02:00
Kerry aecd71ad15
Live location sharing - update beacon tile with latest location (#8265)
* add useBeacon hook

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

* update message tile types to work with function comp with ref

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

* use beacon hook in beacon body

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

* update beacon body with (textual) latest locations, test

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

* language in comment

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

* comments

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

* copyright

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-11 09:16:32 +00:00
Kerry 94385169f1
Live location sharing - smart location marker (#8232)
* extract location markers into generic Marker

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

* wrap marker in smartmarker

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

* test smartmarker

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

* remove skinned-sdk

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

* lint

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

* better types for LocationBodyContent

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-11 10:29:24 +02:00
Kerry df20821fd6
Live location sharing - extract zoom buttons into component (#8235)
* extract out zoombuttons component

* newline

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

* stylelint

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

* remove skinned sdk

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-11 10:29:07 +02:00
Kerry 03d0969ae3
Live location sharing - update beacon_info implementation to latest MSC (#8256)
* update calls to set and createLiveBeacon

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

* fix stop beacon

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

* remove variable event type from beacon utils

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

* use beacon identifier

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

* fix RoomLiveShareWarning tests

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

* add case for beacon update

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

* lint

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

* more lint

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-08 10:53:06 +02:00
Kerry b98739056e
Live location sharing - extract location markers into generic Marker (#8225)
* extract location markers into generic Marker

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

* comments

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

* remove skinned

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-06 12:40:39 +01:00
Travis Ralston a987ead7d2 Step 8.1: Remove skinning setup from all tests 2022-03-28 14:02:31 -06:00
Travis Ralston 26dc2ba45e Step 3.1: Stop using `getComponent` in tests 2022-03-28 14:02:31 -06:00
Kerry 1397652f52
Extract location utils from components (#8152)
* extract util functions from MLocationBody

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

* disassemble mlocationbody

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

* tidy and add copyrights

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

* move types and utils from components/location to utils

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

* i18n

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

* empty line

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-03-25 15:36:22 +01:00