Commit graph

1335 commits

Author SHA1 Message Date
Travis Ralston
7f5bb61a79
Support a module API surface for custom functionality (#8246)
* Early implementation of module API surface + functions for ILAG module

* Wire up dialog functions and ILAG-needed surface

* Ensure component renders for modules get overridden

* Respond to changes from module API interface

* Use a real module-api dependency

* Update for new Dialogs interface

* Add support for getConfigValue from module API

* Update the remainder of the module API interface

* Docs & cleanup

* Add some unit tests around module stuff

Needs end-to-end tests still.

* Appease early linters

* Break import cycles by not directly depending on Lifecycle

* Appease the linter

* Fix bad merge
2022-07-05 12:26:44 -06:00
sha-265
a009f8001a
Add bidirectonal isolation for pills (#8985) 2022-07-05 11:37:35 +00:00
Kerry
ed92071046
Live location share - open latest location in map site (#8981)
* move getForwardableBeacon to beacon utils

* move event transform type up

* add helper to get shareable-as-locaion events

* use getShareableLocationEvent in MessageContextMenu

* test opening in maplink

* fix bad copy pasted tests
2022-07-04 16:05:55 +02:00
DeepBlueV7.X
d8d4ade1b7
Fix calls on homeservers without the unstable thirdparty endpoints (#8931)
* Fix calls on homeservers without the unstable thirdparty endpoints

Calling that endpoint throws an error and aborts the entire call. We do
check if an empty list or null is returned by that endpoint everywhere,
so returning an empty list simulates the thirdparty stuff just not being
found.

Checking for "this.supportsSipNativeVirtual" doesn't necessarily work,
since that might not be set yet and as such breaks calls that rely on
this functionality working.

fixes https://github.com/vector-im/element-web/issues/21680

Signed-off-by: Nicolas Werner <nicolas.werner@hotmail.de>

* Address review comments

* Make log message a warning

Signed-off-by: Nicolas Werner <nicolas.werner@hotmail.de>
2022-07-01 12:43:42 +00:00
Michael Weimann
a2f31fdfb4
Location (live) share replies now provide a fallback content (#8949)
* Implement location share reply fallback content

* Replace single condition switch with if
2022-07-01 08:01:22 +02:00
Kerry
7a80ea4bbe
Test typescriptification - MessagePanel (#8943)
* mv test/components/structures/MessagePanel-test.js test/components/structures/MessagePanel-test.tsx

* convert simpler messagepanel tests to rtl

* add data-testid to eventlistsummary

* convert read marker tests to rtl

* formatting

* remove commented
2022-06-30 14:41:53 +02:00
Valere
f137bf3fd3
Fix all megolm error reported as unknown (#8916)
* Fix all megolm error reported as unknown

* code review

* bad paste in comment
2022-06-30 08:55:05 +01: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
Robin
3c14d93237
Reduce video rooms log spam (#8913)
* Reduce video rooms log spam

If you forget to call preventDefault in widget action handlers,
matrix-widget-api logs a bunch of errors complaining that the action is
unsupported/unhandled, even if it isn't.

* Fix tests
2022-06-29 16:09:41 +02:00
Kerry
4486509d88
Live location share - redact related locations on beacon redaction (PSF-1151) (#8926)
* redact beacon locations on redaction

* redact beacon locations on beacon info redaction

* fussy import ordering

* use real fake redaction in beaconbody test
2022-06-29 09:07:36 +00:00
Kerry
eaf13d490e
Live location share - disallow message pinning (PSF-1084) (#8928)
* unmock isContentActionable

* test message pinning

* disallow pinning for beacon events

* try to make tests more readable
2022-06-29 07:11:33 +00:00
Travis Ralston
60d3d41184
Improve timing safety of useLatestResult test (#8915)
and fix contains to be equals instead, as it's *possible* we can accidentally punch in 20 or something and still have the test pass.
2022-06-28 15:29:01 +02:00
Robin
84cf40e0f3
Switch video rooms to spotlight layout when in PiP mode (#8912)
* Switch video rooms to spotlight layout when in PiP mode

* Add some comments
2022-06-27 20:45:13 +00:00
Kerry
5538161acd
render message deleted tile for beacons (#8905) 2022-06-27 14:21:22 +02:00
Michael Telatynski
e7a8dbd04c
Revert recent composer changes (#8840)
* Revert "Prevent new composer from overflowing from non-breakable text (#8829)"

This reverts commit 57dff8131c.

* Revert "Fix scroll jump issue with the composer (#8791)"

This reverts commit 5167521ea4.

* Revert "Fix scroll jump issue with the composer (#8788)"

This reverts commit f568a76dc6.

* Revert "Revert link color change in composer (#8784)"

This reverts commit aedbeb2995.

* Revert "Improve composer visiblity (#8578)"

This reverts commit f14374a51c.
2022-06-27 09:43:58 +01:00
Suguru Hirahara
814ca6811c
Improve font scaling panel style (#8887) 2022-06-25 14:20:01 +02:00
Suguru Hirahara
18c21d77cd
Remove references to mx_GroupLayout from scss files (#8875) 2022-06-20 18:55:47 +02:00
Suguru Hirahara
b1e07e8ef0
Make the pill text single line (#8744) 2022-06-19 11:56:37 +02:00
Robin
ef48443dc9
Show chat panel when opening a video room with unread messages (#8812)
* Show chat panel when opening a video room with unread messages

* Remove unnecessary calls to private methods in tests

* Make room ID mandatory when toggling the right panel

* Restore the isViewingRoom check

* Test RightPanelStore

* Make the constructor private again

* Add even more tests

* Fix onReady
2022-06-17 16:57:40 -04:00
Kerry
b51ef246ab
Live location share - forward latest location (PSF-1044) (#8860)
* handle beacon location events in ForwardDialog

* add transformer for forwarded events in MessageContextMenu

* remove canForward

* update snapshots for beacon model change

* add comments

* fix bad copy pasted test

* add test for beacon locations
2022-06-17 15:27:08 +02:00
Andy Balaam
0a90674e89
Fix crash when drawing blurHash for portrait videos PSB-139 (#8855) 2022-06-17 11:03:29 +00:00
Suguru Hirahara
fe8c267a14
Create a common header on right panel cards on BaseCard (#8808)
* Remove duplicate declarations and add height and overflow properties

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

* Move mx_TimelineCard__header under mx_BaseCard_header for normalization

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

* Normalize mx_BaseCard_close position

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

* Normalize className of header

- mx_BaseCard_header__ThreadPanel
- mx_BaseCard_header__TimelineCard

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

* Normalize header's button size

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

* Normalize inline start header margin

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

* normalize header bottom margin for PinnedMessagesCard and TimelineCard

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

* Normalize header declarations

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

* Add mixin RightPanelCard

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

* Move common declarations - top level

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

* Move common declarations - mx_BaseCard_header

Remove specific declarations on PinnedMessagesCard

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

* Move common declarations - mx_BaseCard_back and mx_BaseCard_close

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

* Create a common class name - mx_BaseCard_header_title

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

* Create a common class name - mx_BaseCard_header_title - ThreadPanel

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

* Move common declarations - mx_BaseCard_header_title

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

* Move common declarations - span:first-of-type

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

* Remove redundant declarations

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

* Rename a variable to remove --ThreadPanel_header-button-size

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

* Remove class name - mx_BaseCard_header_title

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

* Remove mx_BaseCard_header_title--ThreadPanel and h2 declarations from PinnedMessagesCard

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

* Headers need Heading

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

* Use spacing variables

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

* Move common style rules of mx_ContextualMenu inside mx_BaseCard_header_title to BaseCard

leaving style rules specific to ThreadPanel.

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

* Hide long header title with ellipsis

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

* Merge style rules - BaseCard_header-button-size

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

* Merge style rules - BaseCard_header margin-bottom

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

* Merge style rules - BaseCard back and close margin

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

* Merge style rules - BaseCard back ~ mx_BaseCard_header_title

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

* Merge style rules - mx_BaseCard_header_title

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

* Return special declarations to _ThreadPanel.scss

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

* Remove the mixin

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

* Add mx_BaseCard_header_title_button--option

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

* Remove redundant margin from AppTileFullWidth

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

* Header on mx_RoomSummaryCard - remove default declarations

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

* Remove default declarations from mx_UserInfo

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

* Use variables - _BaseCard.scss

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2022-06-16 09:22:45 +02:00
Michael Weimann
aac97e01e3
Reload map on reconnect (#8848)
PSD-282
2022-06-15 16:38:35 +02:00
Janne Mareike Koschinski
5096e7b992
Integrate searching public rooms and people into the new search experience (#8707)
* Implement searching for public rooms and users in new search experience
* Implement loading indicator for spotlight results
* Moved spotlight dialog into own subfolder
* Extract search result avatar into separate component
* Build generic new dropdown menu component
* Build new network menu based on new network dropdown component
* Switch roomdirectory to use new network dropdown
* Replace old networkdropdown with new networkdropdown
* Added component for public room result details
* Extract hooks and subcomponents from SpotlightDialog
* Create new hook to get profile info based for an mxid
* Add hook to automatically re-request search results
* Add hook to prevent out-of-order search results
* Extract member sort algorithm from InviteDialog
* Keep sorting for non-room results stable
* Sort people suggestions using sort algorithm from InviteDialog
* Add copy/copied tooltip for invite link option in spotlight
* Clamp length of topic for public room results
* Add unit test for useDebouncedSearch
* Add unit test for useProfileInfo
* Create cypress test cases for spotlight dialog
* Add test for useLatestResult to prevent out-of-order results
2022-06-15 16:14:05 +02:00
Travis Ralston
39f2bbaaf4
Bring back waveform for voice messages and retain seeking (#8843)
* Crude way of layering the waveform and seek bar

Not intended for production.

* Use a layout prop instead of something less descriptive

* Fix alignment properly, and play with styles

* Convert back to a ball

* Use `transparent` which makes NVDA happy enough

* Allow keyboards in the seek bar

* Try to make the clock behave more correctly with screen readers

MIDNIGHT

* Remove legacy export

* Remove redundant attr

* Appease the linter
2022-06-14 18:13:13 -06:00
Michael Telatynski
d81e2cea14
Remove unused sessionStorage layer (#8834)
* Remove unused sessionStorage layer

* Update global.d.ts

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

* Kill off all consumer of the old Piwik Analytics module

* Simplify ModalManager interface

* i18n

* Attempt to fix old e2e tests

* Remove unused component

* Iterate PR
2022-06-14 17:51:51 +01:00
Michael Telatynski
b03aa2ebf5
Move room directory Puppeteer tests over to Cypress (#8832)
* Fix user view percy test by sticking the user avatar colour

* Move room directory Puppeteer tests over to Cypress

* Consolidate import

* Fix tests

* Grab default widths

* Tweak Percy CSS mechanism
2022-06-13 19:25:39 +01:00
Michael Weimann
b87c537885
Prevent level order to be modified (#8821) 2022-06-13 08:03:16 +02:00
Šimon Brandner
9b8b1d193e
Disable redacting reactions if we don't have sufficient permissions (#8767) 2022-06-10 18:41:05 +00:00
Travis Ralston
4171c008a4
Convert sticker end-to-end tests to Cypress (#8807)
* Convert sticker end-to-end tests to Cypress

Reference materials:
* https://www.cypress.io/blog/2020/02/12/working-with-iframes-in-cypress/
* https://github.com/cypress-io/cypress/issues/136
* https://docs.cypress.io/api/commands/origin#Other-limitations

Ideally we'd be able to use `cy.origin()` to jump into the iframe, but it's explicitly not supported. Instead we disable web security as instructed by cypress because it's our only reasonable option here. Thankfully, disabling web security doesn't appear to remove the crypto libraries from the browser so we can still function in that respect.

Rationale for why we can't just serve the sticker picker off the app domain is included in the code.

* Appease the linter

* More linter appeasement
2022-06-10 09:24:15 -06:00
Robin
53340db5e9
Update the live timeline when the JS SDK resets it (#8806) 2022-06-10 08:59:07 -04:00
Robin
c180708a17
Revert "Make widgets in video rooms mutable again to de-risk future upgrades" (#8803)
This reverts commit 32f667c633933a1bb095e6dd14e5afba6a5a6294.
2022-06-09 09:56:02 -04:00
Andy Balaam
4e1958d9fe
Fix #20026: send read marker as soon as we change it (#8802) 2022-06-09 13:41:09 +00:00
Robin
d9396b0b54
Expire video member events after 1 hour (#8776)
* Expire video member events after 1 hour

* Iterate based on feedback

* Validate the types of video member events better

* Even more parentheses
2022-06-09 13:19:52 +00:00
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