Commit Graph

1401 Commits (5b2bafacc9213addcfb24cea2b8201adb8be50b6)

Author SHA1 Message Date
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
Suguru Hirahara 12dd5a7ef0
Name lists on invite dialog (#8046)
* Place room tiles with grid

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Set padding inside of name stack

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Remove overflow:hidden (to be cancelled)

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Replace text-align with margin

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Style invite failure dialog with display:grid

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Merge style rules of room tiles and tiles on invitation failure dialog

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Normalize avatar size for multiInviterError

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Set text overflow with ellipsis

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Use spacing variables

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Set narrow gap to nameStack

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Rename mx_InviteDialog_inviterErrorTile_error

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Create mx_InviteDialog_tile

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Set padding to room tiles only

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Remove space between name / userID and time (there is gap by default)

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Remove the margin from the last child

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2022-06-09 13:45:33 +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 d3fb6ff906
Move the user view tests from Puppeteer to Cypress (#8787)
* Move the user view tests from Puppeteer to Cypress

* Iterate snapshot test

* Actually import the new module

* Specify widths

* Update cypress & percy

* Try fix percy

* Finish cypress upgrade

* Tidy cypress.config.ts

* Revert "Tidy cypress.config.ts"

This reverts commit d913052cc4e12f836b99645bda81bbcf21d5f3c8.

* Revert "Finish cypress upgrade"

This reverts commit b5aba3b8a32edbc36549fbd8a27eb0de0390da2a.

* Revert "Update cypress & percy"

This reverts commit f846a364f81b23b173d9af67230aa074bd248cf6.

* delint

* Update percy
2022-06-08 22:12:56 +01:00
Johannes Marbach abd39c61b1
Add support for MD / HTML in room topics (#8215)
* Add support for MD / HTML in room topics

Setting MD / HTML supported:
- /topic command
- Room settings overlay
- Space settings overlay

Display of MD / HTML supported:
- /topic command
- Room header
- Space home

Based on extensible events as defined in [MSC1767]

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

[MSC1767]: matrix-org/matrix-spec-proposals#1767

* Fix build error

* Add comment to explain origin of styles

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

* Empty commit to retrigger build

* Fix import grouping

* Fix useTopic test

* Add tests for HtmlUtils

* Add slash command test

* Add further serialize test

* Fix ternary formatting

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

* Add blank line

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

* Properly mock SettingsStore access

* Remove trailing space

* Assert on HTML content and add test for plain text in HTML parameter

* Appease the linter

* Fix JSDoc comment

* Fix toEqual call formatting

* Repurpose test for literal HTML case

* Empty commit to fix CI

Co-authored-by: Travis Ralston <travpc@gmail.com>
Co-authored-by: Travis Ralston <travisr@matrix.org>
2022-06-07 14:20:32 -06: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 56b0b79fb7
Live location share - link to timeline tile from share warning (PSF-1078) (#8752)
* navigate to live location tile from left panel live warning

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

* navigate to beacon tile from room live share warning

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

* add cursor

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-06-07 10:15:09 +00:00
Germain f14374a51c
Improve composer visiblity (#8578)
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-06-07 07:28:29 +00:00
Michael Weimann 38b72c4995
Fix disappearing widget poput button (#8754)
See PSC-79
2022-06-06 12:00:18 +02:00
Suguru Hirahara 323e911fe7
Add ellipsis effect to hidden beacon status (#8755) 2022-06-05 05:40:17 +00:00
Michael Weimann 3174cf2606
Improve widget buttons behaviour and layout (#8734)
* Improve widet buttons behaviour and layout

Relates to vector-im/element-web#20506
See PSC-79

Signed-off-by: Michael Weimann <michaelw@matrix.org>

* Add AppTile tests
2022-06-03 12:00:16 +02: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 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
Robin f152310c08
Use random widget IDs for video rooms (#8739) 2022-06-02 09:10:22 -04: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 af6ded3b0b
Move update tests to Cypress (#8716)
* Move update tests to Cypress

* Fix /version intercept to account for cachebuster
2022-05-30 13:40:55 +00:00
Andy Balaam 2649c6fd75
Tests for roundtrips md<->HTML (#8696)
* Tests for roundtrips md<->HTML

* Convert roundtrip tests to it.each table style

* Fix lint errors

* Remove extraneous "f "

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

* Test __ -> **

* Test for code blocks containing markdown

* Test for more ordered lists

* Test for code blocks with language specifiers

* Additional cases for HTML->markdown->HTML

Co-authored-by: Travis Ralston <travisr@matrix.org>
2022-05-27 13:10:22 -06: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
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 Telatynski 655bca63e6
Move Enterprise Erin tests from Puppeteer to Cypress (#8569)
* Move Enterprise Erin tests from Puppeteer to Cypress

* delint

* types

* Fix double space

* Better handle logout in Lifecycle

* Fix test by awaiting the network request

* Improve some logout handlings

* Try try try again

* Delint

* Fix tests

* Delint
2022-05-26 10:12:49 +00:00
Michael Telatynski f3f14afbbf
Move spaces tests from Puppeteer to Cypress (#8645)
* Move spaces tests from Puppeteer to Cypress

* Add missing fixture

* Tweak synapsedocker to not double error on a docker failure

* Fix space hierarchy loading race condition

Fixes https://github.com/matrix-org/element-web-rageshakes/issues/10345

* Fix race condition when creating public space with url update code

* Try Electron once more due to perms issues around clipboard

* Try set browser permissions properly

* Try to enable clipboard another way

* Try electron again

* Try electron again again

* Switch to built-in cypress feature for file uploads

* Mock clipboard instead

* TMPDIR ftw?

* uid:gid pls

* Clipboard tests can now run on any browser due to mocking

* Test Enter as well as button for space creation

* Make the test actually work

* Update cypress/support/util.ts

Co-authored-by: Eric Eastwood <erice@element.io>

Co-authored-by: Eric Eastwood <erice@element.io>
2022-05-26 10:19:00 +01:00
Michael Telatynski d75e2f19c5
Fix font not resetting when logging out (#8670)
* Fix font not resetting when logging out

* Adopt on_logged_in and on_logged_out into DispatcherAction

* Add tests

* Add copyright
2022-05-26 09:56:53 +01:00
Michael Telatynski e69ba24f96
Fix edge case around composer handling gendered facepalm emoji (#8686)
* Write tests around composer badly handling gendered facepalm emoji

* Commit export for tests to be happy

* Fix edge case around composer handling gendered facepalm emoji

* Fix offset calculations and make code more readable
2022-05-25 12:41:36 +01:00
Robin 7edc4b1965
Stop connecting to a video room if the widget messaging disappears (#8660)
* Stop connecting to a video room if the widget messaging disappears

* Clean up more listeners

* Clean up even more listeners
2022-05-24 07:43:27 -04: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
r00ster 5b51efd861
Make system fonts work more reliably (#8602)
* Make system fonts work more reliably

* Make it more sophisticated

* Missing semicolon

* Apply suggestions

* Fix formatting

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

* Create FontWatcher-test.tsx

* Add actual tests

* Fix some errors

* Apply suggestions

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

* Fix FontWatcher tests

* Correct test fixture

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-05-23 17:29:16 +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
Hugh Nimmo-Smith 60cd740b66
Fix crash on null idp for SSO buttons (#8650)
* Add test case for null identity_providers for SSO

* Fix typing for identity_providers

* Make null idp explicit and handle in analytics

* chore: whitespace fix

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-05-20 10:08:57 +01:00
Germain 408f4dfe09
Add public room directory hook (#8626) 2022-05-19 09:03:29 +01: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
Janne Mareike Koschinski 2d386556a6
ensure metaspace changes correctly notify listeners (#8611) 2022-05-18 15:15:25 +02:00
Robin 796e12e789
Go to space landing page when clicking on a selected space (#6442)
* Go to space landing page when clicking on a selected space

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

* Go to home landing page when clicking on selected home space

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

* Remove metaspace behavior

* Add tests

* Use the dispatcher action enum

* Break up the onClick assignment
2022-05-17 13:22:35 +00:00
Robin ceda77d7dc
Proactively fix stuck devices in video rooms (#8587)
* Proactively fix stuck devices in video rooms

* Fix tests

* Explain why we're disabling the lint rule

* Apply code review suggestions

* Back VideoChannelStore's flags by SettingsStore instead of localStorage
2022-05-16 16:54:08 -04:00
James Salter fcc4d62ede
Fall back to untranslated string rather than showing missing translation error (#8609) 2022-05-16 13:28:24 +01:00
Šimon Brandner fb30b67b14
Fix issues with the new topic dialog (#8608) 2022-05-16 14:10:00 +02:00
Kerry 42f12485bc
fix ts issues in Registration-test (#8579)
Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-05-16 08:23:51 +00:00
Michael Telatynski 6453530993
Fix js-sdk types (#8588) 2022-05-13 19:13:21 +00:00
Robin 26bc3ab0aa
Tweak video rooms copy (#8582)
* "Video room" → "New video room"

* "Connect now" → "Join"

* "N people connected" → "N people joined"

* "Connected" → "Joined"

* Fix tests
2022-05-13 12:45:38 +00:00
Michael Telatynski 59b9d1e818
Don't consider threads for breaking continuation until actually created (#8581)
* Don't consider threads for breaking continuation until they've actually been created

* Update tests

* Make hasThreadSummary null thread safe

* Apply feedback from pr review
2022-05-13 11:59:50 +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
Germain fdd5494402
Add dialog to navigate long room topics (#8517) 2022-05-13 08:55:10 +01:00
Michael Weimann 7ed3089434 Improve tooltip positioning
Signed-off-by: Michael Weimann <michaelw@matrix.org>
2022-05-12 14:05:55 +02:00
Šimon Brandner 5348572439
Write tests for message right-click context menu (#8532) 2022-05-11 18:39:40 +02:00
Michael Telatynski 00984e4434
Fix effect of URL preview toggle not updating live (#8561)
* Remove unused state and fix canPeek

* Fix effect of URL preview toggle not updating live

* Remove stale context fields
2022-05-11 15:11:42 +01:00
Suguru Hirahara 464eb93a44
Fix visual bugs on AccessSecretStorageDialog (#8160)
* Remove duplicate mx_Dialog_buttons

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Group buttons on mx_Dialog with span

- Cancel default styling for elements inside .mx_AccessSecretStorageDialog_primaryContainer

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Move common rules of mx_Dialog_buttons_row to _common.scss

- Set 16px gap between buttons per https://github.com/vector-im/element-web/issues/19426#issuecomment-949778515

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Spacing variables

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Nesting - .mx_AccessSecretStorageDialog_reset

- Fix the reset link color
- Set $spacingStart variable

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Remove unnecessary rule

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2022-05-11 12:33:21 +00:00
Michael Telatynski ad4d3f9a88
Move threads e2e tests over to cypress (#8501)
* Add non-consent (default) Synapse template

* Add consent test

* Add create room test

* Stash work

* Initial threads tests

* fix

* Delete old threads e2e tests, plan new ones

* Fix typed s'more

* Try something else

* specify d.ts

* Fix types once and for all?

* Fix the consent tests

* Iterate threads test harness

* Fix dispatcher types

* Iterate threads test

* fix typing

* Alternative import attempt

* let it break let it break let it break

* Tweak types

* Stash

* delint and update docs

* null-guard scrollIntoView

* Iterate threads test

* Apply suggestions from code review
2022-05-10 17:09:31 +00:00
Kerry c67b41fbde
Enable forwarding static locations (#8553)
* enable forwarding for location events

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

* allow forwarding of static locations

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

* add comment

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-05-10 16:21:20 +00:00
Robin 0b0e414fd4
Fix unresponsive notification toggles (#8549)
* Return consistently typed setting values from localStorage

* Watch notification toggles

* Test that it all works
2022-05-10 09:13:02 -04:00
Travis Ralston 401e124df6 Merge branch 'develop' into 19245-improve-styling-of-search-initialization-errors 2022-05-09 19:32:43 -06:00
Travis Ralston 548290b006
Run a minor code quality checker over the repo (#8524)
* Run a minor code quality checker over the repo

Largely targeted at spelling of common words and misc code issues.

* Update snapshots
2022-05-09 22:52:05 +00:00
Kerry 333dd59f06
test typescriptification - RoomList (#8540)
* test/components/views/rooms/RoomList-test.js -> test/components/views/rooms/RoomList-test.tsx

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

* fix ts issues

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-05-09 13:24:12 +00:00
Kerry dc346d5e83
test typescriptification - RoomViewStore (#8539)
* test/stores/RoomViewStore-test.js -> test/stores/RoomViewStore-test.tsx

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

* fix tsc issues

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-05-09 15:14:45 +02:00
Michael Telatynski 674aec4050
Fix regression around pasting links (#8537)
* Fix regression around pasting links

* Add tests
2022-05-09 12:39:32 +00:00
Kalle Struik 7c07ad155c Improve the styling of search initialization errors.
Signed-off-by: Kalle Struik <kalle@kallestruik.nl>
2022-05-09 11:20:36 +02: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 e97536ef96
Live location sharing - refresh beacon timers on tab becoming active (#8515)
* add visibilitychange listener

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

* test

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

* restore event listener mock

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-05-06 11:33:09 +02:00
Kerry 2c19d286ed
Eslint - require copyright header rule (#8514)
* bump eslint plugin to 0.5.2

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

* add rule

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

* add missing copyright headers

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

* fix comment order

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-05-06 09:09:28 +00:00
Germain 8080c2cc04
Remove experimental threads disclaimer (#8445) 2022-05-06 08:32:33 +00:00
Kerry 2e3185a4bc
test typescriptification - dialogs (#8497)
* /Users/kerry/code/matrix-react-sdk/test/components/views/dialogs/InteractiveAuthDialog-test.js -> tsx

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

* fix ts issues

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

* test/components/views/dialogs/AccessSecretStorageDialog-test.js -> tsx

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

* fix ts issues in AccessSecretSstorageDialog-test

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

* update copyrights

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

* lint

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-05-06 10:25:18 +02:00
Michael Weimann 07542b0c40 Fix inviting users with undisclosed profiles (#17269)
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
Signed-off-by: Michael Weimann <michaelw@matrix.org>
2022-05-05 18:17:17 +02:00
Šimon Brandner b12c002602
Order receipts with the most recent on the right (#8506) 2022-05-05 12:10:48 +00:00
Germain 3a63c88a11
Order new search dialog results by recency (#8444)
* Order new search dialog results by recency

* Add getLastTs tests

* Add sort rooms tests
2022-05-05 12:19:11 +01:00
Valere 07d8070037
Add raw error to analytics E2E error event context (#8447)
* Add raw error to analytics E2E error context

* Fix code style

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-05-04 21:46:03 -06:00
Robin 658ff4dfe6
Iterate video room designs in labs (#8499)
* Remove blank header from video room view frame

* Add video room option to space context menu

* Remove duplicate tooltips from face piles

* Factor RoomInfoLine out of SpaceRoomView

* Factor RoomPreviewCard out of SpaceRoomView

* Adapt RoomPreviewCard for video rooms

* "New video room" → "Video room"

* Add comment about unused cases in RoomPreviewCard

* Make widgets in video rooms mutable again to de-risk future upgrades

* Ensure that the video channel exists when mounting VideoRoomView
2022-05-04 17:02:06 -04:00
Michael Telatynski 5cdc8fb3fd
Fix reading of cached room device setting values (#8491)
* Fix reading of cached room device setting values

* Add tests
2022-05-04 15:54:59 +01:00
Kerry ce3bc9dc07
test typescriptification - EventListSummary (#8493)
* test/components/views/elements/EventListSummary-test.js -> tsx

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

* add user mocks util

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

* lint

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-05-04 16:37:41 +02:00
Kerry 5cece10552
test typescriptification - Permalinks (#8481)
* test/utils/permalinks/Permalinks-test.js -> test/utils/permalinks/Permalinks-test.ts

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

* fix ts issues in Permalinks

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-05-04 11:29:13 +02:00
Kerry 3d0045dab5
Test typescriptification - Terms/ScalarAuthClient (#8480)
* test/Terms-test.js -> test/Terms-test.tsx

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

* fix ts issues in Terms-test

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

* test/ScalarAuthClient-test.js -> test/ScalarAuthClient-test.ts

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

* ts fixes in ScalarAuthClient-test

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

* comment

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-05-03 15:09:07 +00:00
Michael Telatynski f29ef04751
Fix race conditions around threads (#8448) 2022-05-03 14:25:08 +01: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
Kerry c5633a24fe
Live location sharing: don't group beacon info with room creation summary (#8468)
* dont group beacon info with room creation summary

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

* remove debugs

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

* add comment

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

* update comment

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-05-03 09:04:47 +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 f280fab47d
test typescriptification - ForwardDialog (#8469)
* test/components/views/dialogs/ForwardDialog-test.js -> tsx

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

* fix ts issues in ForwardDialog

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

* remove unused stub-component

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-05-03 08:22:38 +00: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
Janne Mareike Koschinski 3e31fdb6a7
read receipts: improve tooltips to show names of users (#8438) 2022-05-02 11:46:11 +02:00
Kerry 4a04be6d1c
Test typescriptification continued (#8327)
* test/utils/MegolmExportEncryption-test.js -> test/utils/MegolmExportEncryption-test.ts

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

* test/utils/ShieldUtils-test.js - test/utils/ShieldUtils-test.ts

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

* type fixes for ShieldUtils-test

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

* test/DecryptionFailureTracker-test.js -> test/DecryptionFailureTracker-test.ts

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

* remove unsupported assertion failure messages

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

* fix ts issues in DecryptionFailureTracker

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

* add mock restores

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

* newline

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

* remove commented decriptionfailuretracker code and test

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

* make should aggregate error codes correctly pass

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

* cheaters types in MegolmExportEncryption

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

* lint

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

* Revert "fix ts issues in DecryptionFailureTracker"

This reverts commit 1ae748cc51088d60722320dbefae04a62310e2e1.

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

* Revert "remove unsupported assertion failure messages"

This reverts commit 7bd93d075c4d8d45befcbfd59c889782c9a44b48.

* Revert "test/DecryptionFailureTracker-test.js -> test/DecryptionFailureTracker-test.ts"

This reverts commit 1670025bd2af9a355c2761998202f602d61f242e.

* revert change to DecryptionFailureTracker

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-05-02 07:57:35 +00:00
Šimon Brandner 3a245a0cbe
Fix jump to bottom button being always displayed in non-overflowing timelines (#8460) 2022-05-01 19:38:36 -06:00
Emmanuel d294dad04d
fix timeline search with empty text box should do nothing (#8262)
* fix timeline search with empty text box should do nothing

* test SearchBar component

* fix lint error

* Update SearchBar-test.tsx

Co-authored-by: Travis Ralston <travisr@matrix.org>
2022-05-02 01:09:59 +00:00
Kerry e233cf5061
Live location sharing: fix safari timestamps pt 2 (#8443)
* handle safari cocoa core data timestamps

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

* actually fix safari timestamp issue properly

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

* actually fix safari timestamp issue properly

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-29 09:12:28 +00:00
Kerry c4e988f406
increase geolocation timeout options to more realistic values (#8439)
Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-28 15:51:47 +01:00
Kerry 472222c195
LLS: error handling on stopping beacon (#8406)
* shared stopping error state for timeline, maxi and room warnign

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

* check for stopping errors in roomlist share warning

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

* lint

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

* test stopping errors in OwnBeaconStore

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

* update LeftPanelLiveShareWarning tests for stopping errors

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

* reinstate try/catch for stopping beacons in create

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

* remove unnecessary and buggy beacon stopping on creation

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-28 12:03:51 +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 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 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
Michael Telatynski 8baa46b0dd
Fix baseline misalignment of thread panel summary by deduplication (#8413) 2022-04-27 18:10:27 +01:00
Michael Telatynski 83ab266533
Fix editing of non-html replies (#8418) 2022-04-27 10:43:10 +02:00
Michael Telatynski a70f11704f
Don't form continuations on either side of a thread root (#8408) 2022-04-26 08:30:36 +00:00
James Salter e3735311ab
Check updated is === the new version in accordance with new behaviour (#8407) 2022-04-25 16:52:50 +00:00
Kerry 8c6786bad6
LLS: rename wireError (#8401)
* rename wireError in ownbeaconstore to locationPublishError

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

* rename getLiveBeaconIdsWithWireError -> getLiveBeaconIdsWithLocationPublishError

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

* rename wire error variables in components

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

* new snapshots for new test names

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

* fix bad capitalisation on onResetLocationPublishError

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

* missed variable

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-25 12:44:18 +00:00
Robin 6bfe0436e5
Fix infinite loop when pinning/unpinning persistent widgets (#8396)
Pinning or unpinning a persistent widget, such as Jitsi, could cause the
PiP view and the app drawer to fight for control over the widget, since
the PiP view never realized that it was supposed to relinquish control.
This was due to a race between the WidgetLayoutStore update and the
AppTile lifecycle tracking update.
2022-04-25 08:29:54 -04:00
Robin 2a396a406d
Stick connected video rooms to the top of the room list (#8353) 2022-04-22 08:17:31 -04: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 a3a7c60dd7
LLS: Remove beacon info illegal replace relation (#8390)
* dont apply illegal replace relation to beacon_info event

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

* only display tiles for beacon infos with live prop

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

* copyrights

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-22 11:38:27 +00:00
Michael Telatynski bbe0c945d3
Fix regression around haveRendererForEvent for hidden events (#8379) 2022-04-21 16:57:08 +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 73e8387799
test functional EventUtils (#8386)
* extract poll event test util

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

* test isContentActionable

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

* test canEditContent

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

* test functional eventutils

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

* copyrights

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-21 18:14:10 +02:00
Robin c83ad1faa7
Add local echo of connected devices in video rooms (#8368) 2022-04-21 07:41:38 -04: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
Robin 6e86a14cc9
Show a lobby screen in video rooms (#8287)
* Show a lobby screen in video rooms

* Add connecting state

* Test VideoRoomView

* Test VideoLobby

* Get the local video stream with useAsyncMemo

* Clean up code review nits

* Explicitly state what !important is overriding

* Use spacing variables

* Wait for video channel messaging

* Update join button copy

* Show frame on both the lobby and widget

* Force dark theme for video lobby

* Wait for the widget to be ready

* Make VideoChannelStore constructor private

* Allow video lobby to shrink

* Add invite button to video room header

* Show connected members on lobby screen

* Make avatars in video lobby clickable

* Increase video channel store timeout

* Fix Jitsi Meet getting wedged on startup in Chrome and Safari

* Revert "Fix Jitsi Meet getting wedged on startup in Chrome and Safari"

This reverts commit 9f77b8c227c1a5bffa5d91b0c48bf3bbc44d4cec.

* Disable device buttons while connecting

* Factor RoomFacePile into a separate file

* Fix i18n lint

* Fix switching video channels while connected

* Properly limit number of connected members in face pile

* Fix CSS lint
2022-04-20 11:03:33 -04:00
Emmanuel 9a065581e5
fix rainbow breaks compound emojis (#8245)
* fix rainbow breaks compound emojis

* use lodash split method for text splitting and add a unit test to test the behaviour

* Update _RichText.scss

* Update colour-test.ts
2022-04-20 14:49:12 +00: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 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
Michael Telatynski f099fdb906
Increase delay to stabilise async tests (#8357) 2022-04-19 17:21:31 +01:00
Janne Mareike Koschinski bca9caa98e
Settings toggle to disable Composer Markdown (#8358) 2022-04-19 14:53:59 +01:00
Kerry 68c5a55eed
use fake timers and restore mocks in MatrixClientPeg test (#8356)
Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-19 14:44:15 +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
Yaya Usman 6b13988eaa
Fix: "Code formatting button does not escape backticks" (#8181)
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-04-19 09:20:56 +00:00
Kerry 4fb9cd6550
calculate geo bounds (#8321)
Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-19 08:46:57 +02:00
Robin 7335b35fbb
Avoid looking up settings during timeline rendering (#8313)
* Avoid showHiddenEventsInTimeline lookups

* Avoid MSC3531 feature lookups

* Test that showHiddenEventsInTimeline doesn't get looked up while
rendering

* Fix code review nits

Co-authored-by: Travis Ralston <travisr@matrix.org>
2022-04-14 23:23:22 +00:00
commonlawfeature 08a2d81d6b
Resolve emoji autocomplete not being temporally consistent (#8086)
* Adds a test to demonstrate the issue with emoji autocomplete reported in https://github.com/vector-im/element-web/issues/19302.

Signed-off-by: Ryan Browne <code@commonlawfeature.com>

* Trim trailing `:` when checking for autocompletes for emoji.

Closes https://github.com/vector-im/element-web/issues/19302

Signed-off-by: Ryan Browne <code@commonlawfeature.com>

* Move all references to the emoji delimiter character to reference a constant.

Signed-off-by: Ryan Browne <code@commonlawfeature.com>

* Revert "Move all references to the emoji delimiter character to reference a constant."

This reverts commit ac09e71e4c6151e35d21f612c9b329ead2a381f1.

Signed-off-by: Ryan Browne <code@commonlawfeature.com>

* Rename variable.

Signed-off-by: Ryan Browne <code@commonlawfeature.com>

* Make the test file a .js file.

Signed-off-by: Ryan Browne <code@commonlawfeature.com>

* Update quotes to match style and make a valid stubbed room.

Signed-off-by: Ryan Browne <code@commonlawfeature.com>

* Fix variable name and test reporting.

Signed-off-by: Ryan Browne <code@commonlawfeature.com>

* Use str.replace with a regex.

Signed-off-by: Ryan Browne <code@commonlawfeature.com>

* Use an improved regex that does not have have to iterate through the entire string, and can just backtrack at most the last 2 characters.

Signed-off-by: Ryan Browne <code@commonlawfeature.com>

* Revert "Use an improved regex that does not have have to iterate through the
entire string, and can just backtrack at most the last 2 characters."

This regex is very efficient, but requires a specific form of the emoji
shortcode that it is not clear is within our control. This is a restriction
that is not required by the technicalities of solving the bug this PR is
attempting to fix. (It requires that an emoji shortcode end with a colon.)

This reverts commit 220cb0efb8de247158c11daf9170464a57cc3af2.

Signed-off-by: Ryan Browne <code@commonlawfeature.com>

Co-authored-by: Ryan Browne <code@commonlawfeature.com>
2022-04-14 20:31:50 +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
David Baker b8013fc52a
Add a Cypress Test 🌲 (#8295)
* A first, maybe working cypress test

Plus cypress plugins to manage synapses in docker containers

* Fix yaml

* This file is important

* try & find where it's put the artifact

* Download artifact to a directory

* pics or it didn't happen

* Add conditional, otherwise no artifacts on failure...

* Try increasing timeout

also actually give the test a name

* Try in chrome

* Get docker logs to see why it's failing

also document the chrome setting

* Try changing mode on homeserver.yaml

* debug

* More debugging

* more file permissions debugging

* ARGH

* more debug

* sigh

* Eugh, that's not how arguments work

* Add the option to really allow open registration

and remove debug logging / comment fixes

* failure to yaml

* Upload docker logs as artifacts

and temporarily remove contional to test

* Put the conditional back

* Upgrade types in end to end tests

to be compatible with fs-extra types

* Try reducing timeout a bit

also make password more... sensible

* Hex is not octal

* Remove file mode

Seems to be unnecessary since the signing key is perfectly fine

* Give the log files extensions

* Rename workflow file now it also does tests

* Add cypress scripts

* copyright headers

* Use ? operator

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

* Use develop synapse image

* Tidy up any remaining synapses after each spec run

Also:
 * Move the synapseStart / synapseStop functions out to the top level
   so they can be reused
 * Add a tsconfig file
 * Give the containers names

* Don't upload video on test pass

We don't upload it anyway so tell cypress not to so it can not
bother encoding them

* Enable linting on cypress files

and fix existing lint errors

* Type check cypress files

and make it pass the type checks, specifically:
 * Upgrade sinon fake timers to a version that has the right types
 * Set module resolution
 * Type check cypress files separately

* Rename workflow file again

Probably better to just call it an element web build

* Don't plus + characters in container name

* Fix yaml

* Stream logs to file

* Add note to end to end tester to sya what's been ported

* Put docker rm in finally block

Co-authored-by: Travis Ralston <travisr@matrix.org>
2022-04-14 10:41:58 +01:00
CommanderRoot c35fc169f5
Replace deprecated String#substr with String#slice (#8314) 2022-04-14 07:52:42 +00:00
Michael Telatynski 0e68c16a90
Introduce small delay to let redaction propagate for tests (#8311) 2022-04-13 19:39:30 +01:00
Hugh Nimmo-Smith 26b771bbf9
Don't show the prompt to enable desktop notifications immediately after registration (#8274)
* Fix MatrixClientPeg.userRegisteredWithinLastHours so that it works

* Try fixing end-to-end test + add case for New search beta

* Remove end-to-end test case for Search beta toast as it only shows up after 5 minutes

* Revert to localStorage based solution + non-inverted logic + test including time advancement
2022-04-13 19:05:08 +01: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
Michael Telatynski 82981e4161
End to end tests for threads (#8267) 2022-04-12 17:46:08 -06:00
Michael Telatynski 8cd715c6a3
Prevent soft crash around room list header context menu when space changes (#8289) 2022-04-12 14:23:04 +00: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 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 b760ec9392
Location sharing - extract isSelfLocation util (#8279)
* extract isSelfLocation into utils

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

* replace use of isSelfLocation

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-11 13:58:35 +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
Robin Kouwenhoven 7ba991cd8c
Fix export of redacted polls (#8118)
* Move RequiresClient from MatrixCapabilities to ElementWidgetCapabilities

Signed-off-by: Robin Kouwenhoven <r.kouwenhoven@outlook.com>

* Fix export of redacted polls

* Fix ESLint error

* Add test cases for poll events

* Add test cases for message events

* Fix lint errors

* Fix i18n error

* Revert "Move RequiresClient from MatrixCapabilities to ElementWidgetCapabilities"

This reverts commit 920f80a2d4385656925987ccc9d37420255405c1.

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: Kerry <kerrya@element.io>
2022-04-11 11:10:16 +02: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 44d446be89
Live location sharing - set replaces relation when stopping beacon (#8266)
* set replaces relation on stopping beacon

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

* update tests for stopBeacon

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-11 10:28:43 +02:00
David Baker 285dc25b3e
Add a test for URL previews being disabled in e2e rooms (#8270)
* Add a test for URL previews being disabled in e2e rooms

Regression test for https://github.com/matrix-org/matrix-react-sdk/pull/8227

* Fix the types
2022-04-08 18:32:35 +01: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
Robin 5fbb25c707
Make Jitsi widgets in video rooms immutable (#8244)
* Make Jitsi widgets in video rooms immutable

* Test video room creation
2022-04-07 07:34:07 -04: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 b9da2255c4
Unit test typescriptification - editor utils (#8226)
* editor/mock ts

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

* test/editor/serialize-test.js -> test/editor/serialize-test.ts

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

* fix ts in serialize-test

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

* test/editor/range-test.js -> test/editor/range-test.ts

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

* test/editor/position-test.js -> test/editor/position-test.ts

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

* fix position-test

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

* test/editor/operations-test.js -> test/editor/operations-test.ts

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

* test/editor/model-test.js -> test/editor/model-test.ts

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

* fix ts in model-test

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

* test/editor/history-test.js -> test/editor/history-test.ts

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

* fix ts in history-test

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

* test/editor/diff-test.js -> test/editor/diff-test.ts

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

* test/editor/deserialize-test.js -> test/editor/deserialize-test.ts

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

* ts in deserialize-test

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

* test/editor/caret-test.js -> test/editor/caret-test.ts

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

* ts caret-test

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-06 12:40:13 +01:00
Travis Ralston 0280c27bfd post-merge fixes 2022-04-05 10:57:16 -06:00
Travis Ralston 4057833036 Merge branch 'develop' into travis/remove-skinning 2022-04-05 10:50:37 -06:00
Robin 371ccd7858
Don't use m.call for Jitsi video rooms (#8223) 2022-04-04 10:29:40 -04:00
Robin 1f64835fab
Update video rooms to new design specs (#8207)
* Remove radio component

* "Voice room" → "video room"

* Remove interactivity from video room tiles

* Update connection state when joining via widget

* Simplify room header buttons for video rooms

* Split out video room creation into a separate menu option

* Simplify room options for video rooms

* Update video room tile layout

* Tell the Jitsi widget whether it's a video channel

* Update tests

* "Voice" → "video" in more places

* Fix tests

* Re-add frame to immersive Jitsi widgets

* Comment ack

* Make updateDevices more readable

* Type FacePile
2022-04-01 14:36:10 +00:00
Kerry b8040a5739
Typescriptification - notification utils (#8209)
* rename ContentRules to ts

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

* prvstest to ts

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

* QueryMatcher-test to ts

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

* UserActivity-test to ts

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

* fix ts issues

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-01 08:45:50 +02:00
Travis Ralston 5137fcf3e8 Remove unit test function which isn't needed
The import ordering no longer requires us to create an injector function.
2022-03-31 19:43:17 -06:00
Travis Ralston 97efdf7094 Merge branch 'develop' into travis/remove-skinning 2022-03-31 19:25:43 -06: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 d09205122d
Live location sharing - Stop publishing location to beacons with consecutive errors (#8194)
* add error state after consecutive errors

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

* polish

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

* comment

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

* remove debug

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-03-30 14:01:44 +00: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
Michael Telatynski 4d14128d94
Fix ts in tests for build (#8189) 2022-03-30 09:12:43 +01:00
Travis Ralston 5fa2ca83ac
Allow voice messages to be scrubbed in the timeline (#8079)
* Use SeekBar for voice messages + move seeking logic to base class

* Appease the linter

* Update tests
2022-03-29 14:07:35 -06:00
Kerry 2adc972eec
Live location sharing - stop sharing to beacons in rooms you left (#8187)
* remove beacons on membership changes

* add addMembershipToMockedRoom test util

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

* test remove beacons on membership changes

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

* removelistener

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-03-29 18:18:34 +02:00