Commit Graph

25 Commits (cda31136b9cdba85fcc771ed8e9fc5100eb427a4)

Author SHA1 Message Date
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 f2ec465f87
Live location sharing: own live beacon status on maximised view (#8374)
* add floating own live sharing eacon status to maximised view

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

* add tests for own beacon status

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

* stylelint

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

* remove huge snapshot

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

* remove unused emits from test

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-21 09:06:57 +02:00
Kerry 4a38cbd550
Live location sharing: beacon list view tiles (#8363)
* add basic sidebar container

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

* optionally show icon in beaconstatus

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

* add avatar and style list item

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

* formatted last update time

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

* test beacon list item

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

* 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>

* newline

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

* add copyable text to beacon list item

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

* add copyable geo uri to list item

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

* improve spacing

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

* overflow scroll on list

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-20 11:57:50 +00:00
Kerry e45cd39906
Live location sharing: maximised view sidebar container (#8360)
* add h4

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

* add mixin to clear list style

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

* add basic sidebar container

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

* open list view button on beaconviewdialog

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

* update tests for new utils

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-20 08:14:24 +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
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 1c215e2b71
Live location sharing - render users own beacons in timeline (#8296)
* 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>

* remove skinned sdk

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

* use new ZoomButtons in MLocationBody

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

* test LocationViewDialog

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

* update commentt

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>

* extract livetimeremaining into own component

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

* extract more beacon state utils

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

* update tests for roomlivesharewarning

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

* add beacon map and status chin

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

* add handling for bubbles

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

* tests for BeaconBody

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

* move displaystatus check up to mbeaconbody

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

* test BeaconStatus

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

* rename BeaconStatusChin -> BeaconStatus

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

* make BeaconStatus generic

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

* lint

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

* adjust spinner size

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

* lint

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

* add static time remaining option to beacon status

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

* render time differently for own beacon

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

* use children to add actions to BeaconStatus

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

* add OwnBeaconStatus wrapper with stop button

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

* add error states for own beacon

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

* test OwnBeaconStatus

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

* move ownbeaconstatus to write dir

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

* improve button styling

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

* i18n

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

* lint

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-14 14:41:28 +02:00
Kerry e59edb7101
Live location sharing - beacon in timeline happy path (#8285)
* 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>

* remove skinned sdk

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

* use new ZoomButtons in MLocationBody

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

* test LocationViewDialog

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

* update commentt

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>

* extract livetimeremaining into own component

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

* extract more beacon state utils

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

* update tests for roomlivesharewarning

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

* add idle status to live beacon icon

* add beacon map and status chin

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

* add handling for bubbles

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

* tests for BeaconBody

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

* i18n

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

* move displaystatus check up to mbeaconbody

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

* test BeaconStatus

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

* rename BeaconStatusChin -> BeaconStatus

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

* make BeaconStatus generic

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

* lint

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

* adjust spinner size

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

* polish and copyrights

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

* lint

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

* better comment

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-13 10:44:15 +02:00
Kerry 661e2c2aa5
Live location sharing - beacon map in timeline (#8286)
* add displaystatus util

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

* map fallback svg

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

* add Map to mbeaconbody

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

* add bubble layout handling

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

* test beaconbody

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

* typo

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

* use randomString from js-sdk

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-12 09:13:55 +01:00
Kerry 4b7840bf78
Live location sharing - extract live time UI for reuse (#8283)
* extract livetimeremaining into own component

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

* extract LiveTimeRemaining for reuse in beacon timeline

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-12 09:24:17 +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 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
Kerry 4922e19b5a
Live Location Sharing - left panel warning with error (#8201)
* add error style to left panel beacon warning

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

* test

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

* add beacon sort util

* link to latest beacon room from left panel warning

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-03-31 13:51:44 +02:00
Kerry 1175226bcb
Live location sharing - display wire error in room (#8198)
* expose wire errors in more useful way

* add wire error state to room live share warning bar

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

* stylelint

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

* add types to getLabel helper

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-03-31 10:57:12 +02:00
Kerry e721c6b0c2
Live location sharing: allow retry when stop sharing fails (#8193)
* allow retry when stop sharing fails

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

* tidy

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-03-30 12:31:19 +00:00
Kerry b04d31b5be
Live location sharing: live share warning in room (#8100)
* add duration dropdown to live location picker

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

* tidy comments

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

* setup component

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

* replace references to beaconInfoId with beacon.identifier

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

* icon

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

* component for styled live beacon icon

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

* emit liveness change whenever livebeaconIds changes

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

* Handle multiple live beacons in room share warning, test

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

* un xdescribe beaconstore tests

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

* missed copyrights

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

* i18n

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

* tidy

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-03-22 13:57:12 +00:00
Kerry 0b80755fb8
extract reusable styled live beacon icon (#8103)
* extract reusable styles live beacon icon

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

* add secondary live lcation color

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-03-21 16:43:43 +00:00
Kerry 14653d1378
Live location share - set time limit (#8082)
* add mocking helpers for platform peg

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

* basic working live duration dropdown

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

* add duration format utility

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

* add duration dropdown to live location picker

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

* adjust style to allow overflow and variable height chin

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

* tidy comments

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

* arrow fn change

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

* lint

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-03-21 12:42:58 +01:00
Kerry 176e49e312
enable geolocation behaviour in location picker for live share type (#8068)
* enable geolocation behaviour in location picker for live share type

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

* add empty lines

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-03-17 09:26:47 +01:00
Kerry 9f6c238827
Add simple live share warning (#8066)
* add simple live share warning

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

* rough first cut of OwnBeaconStore

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

* working (?) has live beacons status

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

* lint

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

* add left panel share warning

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

* setup for tests

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

* test ownbeaconstore

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

* add copyright

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

* add copyright

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

* remove warning banner

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

* fix test

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

* fix tests for weird asyncstore closure issues

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

* fix OwnBeaconStore more...

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

* revert loose change to LeftPanel

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

* Revert "remove warning banner"

This reverts commit 4529813b12e3206731f18e0514aa6e0f6896d03a.

* test live share warning

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-03-17 09:25:57 +01:00
Kerry d38a1fa201
fallback to event text in location body when map unavailable (#7982)
* center icon better

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

* remove debug

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

* retrigger all builds

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

* set assetType on share event

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

* use pin marker on map for pin drop share

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

* lint

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

* test events

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

* pin drop helper text

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

* use generic location type

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

* add navigationcontrol when in pin mode

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

* allow pin drop without location permissions

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

* remove geolocate control when pin dropping without geo perms

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

* test locationpicker

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

* test marker type, tidy

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

* move findMapStyleUrl

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

* fallback to event content when cant render map

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

* update mocks in location picker, show same messages as timeline

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

* style error message in location share menu

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

* i18n

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

* forgotten copyright

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

* add copyright

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

* update style

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

* icon bigger

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-03-11 09:52:57 +01:00
Kerry ebc2267e52
Location sharing > back button (#7958)
* add back/cancel buttons to share dialog

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

* test buttons

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

* improve weird indentation

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

* relint

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

* PR tweaks

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

* quotes

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-03-03 11:30:46 +01:00
Kerry b480bffab0
Location share type UI (#7924)
* copyright

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

* empty line

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

* functional picker

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

* most style

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

* nice style for options

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

* get ShareType test passing

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

* add maplibre mock

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

* lint and test

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

* add section to themes for location sharing cols

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

* add svg mock

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

* use same mock string as imageMock

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

* newline

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

* lint

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

* add live location icon

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

* rename useEnabledShareTypes

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

* use solid color for live border

* use ternary

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

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-03-02 13:00:40 +00:00
Kerry 3f1951b5b8
Prep for pin drop location sharing (#7919)
* add labs flag feature_location_share_pin_drop

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

* split LocationButton into two components

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

* rethemendex

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

* copyright

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

* one more (c)

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>

* use same matrix client import

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-03-01 18:00:07 +01:00
Kerry f4cd71fd47
Check 'useSystemTheme' in quick settings theme switcher (#7809)
* mock Element.scrollIntoView in jest setup

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

* extract theme switcher from quick settings, add match system option, test

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

* i18n

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

* forgotten copyright

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

* stylelint

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

* remove old class

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-02-24 10:01:06 +01:00