* Reset power selector on API failure to prevent state mismatch
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Allow onChange to be sync or async
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add unmounted check
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Improve coverage
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add externall call link button if in public call room
Signed-off-by: Timo K <toger5@hotmail.de>
* Allow configuring a spa homeserver url.
Signed-off-by: Timo K <toger5@hotmail.de>
* temp
Signed-off-by: Timo K <toger5@hotmail.de>
* remove homeserver url
Signed-off-by: Timo K <toger5@hotmail.de>
* Add custom title to share dialog.
So that we can use it as a "share call" dialog.
Signed-off-by: Timo K <toger5@hotmail.de>
* - rename config options
- only show link button if a guest url is provided
- share dialog custom Title
- rename call share labels
Signed-off-by: Timo K <toger5@hotmail.de>
* rename to title_link
Signed-off-by: Timo K <toger5@hotmail.de>
* add tests for ShareDialog
Signed-off-by: Timo K <toger5@hotmail.de>
* add tests for share call button
Signed-off-by: Timo K <toger5@hotmail.de>
* review
Signed-off-by: Timo K <toger5@hotmail.de>
* remove comment
Signed-off-by: Timo K <toger5@hotmail.de>
* Update src/components/views/dialogs/ShareDialog.tsx
Co-authored-by: David Baker <dbkr@users.noreply.github.com>
---------
Signed-off-by: Timo K <toger5@hotmail.de>
Co-authored-by: David Baker <dbkr@users.noreply.github.com>
* Use `strong` element to semantically denote visually emphasised content
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update snapshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add comment
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This changes the styles of buttons, other form controls, and tabs in settings to:
1. Improve their usage of semantic colors, so that they adapt correctly to custom themes
2. Make them more visually coherent with the new Compound design system, as we integrate more of it into the app
This is a re-introduction of https://github.com/matrix-org/matrix-react-sdk/pull/12241 with the difference that we're now using our branding colors again on form colors, and buttons have become rounded to match the appearance of new Compound buttons.
If auto-rageshake-on-UISI is enabled, then when we get a UISI we send the sender a to-device message asking them to also rageshake. Unfortunately, the logic to do so has been broken since c30b263.
Also a few other minor cleanups while we're here.
* fix automatic DM avatar with functional members
* add tests for functional members
* add snapshot for functional members avatar test
* update snapshot for functional members avatar test
* restore mocks after each functional members avatar test
* refactor DecoratedRoomAvatar-test
---------
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
Co-authored-by: R Midhun Suresh <hi@midhun.dev>
* Add theme data to EC widget url
Signed-off-by: Timo K <toger5@hotmail.de>
* test theme
Signed-off-by: Timo K <toger5@hotmail.de>
---------
Signed-off-by: Timo K <toger5@hotmail.de>
* Fix spurious session corruption error
Move the server versions check to each time we reconnect to the server
rather than the first time,although, as per comment it will still only
trigger the first time, but it will avoid us awaiting and mean we know
we're connected to the server when we try, and get automatic retries.
Fixes https://github.com/element-hq/element-web/issues/26967
* Move test & add regression test
* Write some more tests
* More comments & catch exceptions in server versions check
* Note caching behaviour
* Typo
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Remove the bit of the comment that might be wrong
---------
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Fix overwrite login action not stopping client
* remove unneeded fixture for overwrite login test
* Fix playwrite bad import of app sources
* revert uneeded change on fore OnLoggedIn causing side effects
* Add unit test for overwrite login action
* remove un needed ts-ignore
* WIP Use browser font size instead of hardcoded 16px
* Add font migration to v3
* Remove custom font size input
* Use a dropdown instead of a slider
* Add margin to the font size dropdown
* Fix `UpdateFontSizeDelta` action typo
* Fix `fontScale`in `Call.ts`
* Rename `baseFontSizeV3` to `fontSizeDelta`
* Update playwright test
* Add `default` next to the browser font size
* Remove remaining `TODO`
* Remove falsy `private`
* Improve doc
* Update snapshots after develop merge
* Remove commented import
* Mock subtle crypto in OIDC test
To unblock upgrade to oidc-client-ts
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update dependency oidc-client-ts to v3
* delint
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Ensure oidc-client-ts 3.0.1 to drop crypto-js
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Reuse exported common type
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Improve client metadata used for OIDC dynamic registration
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix Native OIDC for Element Desktop by including ssoid in the url_state of the /auth call
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Reuse exported common type
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Improve client metadata used for OIDC dynamic registration
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix typo
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix test
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Mock PlatformPeg
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Mock platform
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add comment
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Improve comment
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update src/BasePlatform.ts
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Use h1 as first heading in dialogs
The dialog should be modal and therefore the only content active
on the screen, so the title of the dialog should be the top level.
Update snapshots & tests appropriately.
* Just customise the letter spacing on dialog titles
* Add A-Element-R labels to rageshakes if rust
* fix import
* Add tests for rageshake collect
* add ts-ignore in test
* refactor rageshake to match sonar Cognitive Complexity
* Use Compound primary colors for most actions
The "accent" color variable is something we should generally not use anymore: it maps to a Compound text token, which makes its semantics inappropriate for icons and backgrounds, and it clashes with the primary colors present on the Compound components we're now bringing into the app. As discussed with design, we would like to phase out its usage on interactive components in favor of the correct icon and background colors from Compound. This is a best-effort attempt at applying new colors to all the major places that we were previously using "accent": mainly, buttons and form controls are affected.
* Update some more colors
* Update test snapshots
* Fix broken screenshot
* Enable custom themes to theme Compound
* Remove the now redundant username color variables
They are replaced by the Compound theming options (specifically, username colors can be themed by changing the color of Compound's decorative color tokens).
* Add missing tooltip
Signed-off-by: Timo K <toger5@hotmail.de>
* fix incoming call toast (icon + disabled button if there is an ongoing call)
Signed-off-by: Timo K <toger5@hotmail.de>
* room header
- fix join button not getting disabled if there is an ongoing call
- fix close lobby button not shown (instead we see the join button)
Signed-off-by: Timo K <toger5@hotmail.de>
* additional tests
Signed-off-by: Timo K <toger5@hotmail.de>
* fix tests
Signed-off-by: Timo K <toger5@hotmail.de>
* update snapshot
Signed-off-by: Timo K <toger5@hotmail.de>
* fix not open menu if disabled
Signed-off-by: Timo K <toger5@hotmail.de>
* add tooltip provider
Signed-off-by: Timo K <toger5@hotmail.de>
* update snap class
Signed-off-by: Timo K <toger5@hotmail.de>
* room header snap update
Signed-off-by: Timo K <toger5@hotmail.de>
* fix snapshot
Signed-off-by: Timo K <toger5@hotmail.de>
---------
Signed-off-by: Timo K <toger5@hotmail.de>
* Upgrade compound-web
I forgot to include this in https://github.com/matrix-org/matrix-react-sdk/pull/12209, which has caused avatar and username colors to be out of sync and sometimes revert to plain black/white.
* Update tests
* Update tests
* Add `Thread Activity centre` labs flag
* Rename translation string
* WIP Thread Activity Centre
* Update supportedLevels
* css lint
* i18n lint
* Fix labs subsection test
* Update Threads Activity Centre label
* Rename Thread Activity Centre to Threads Activity Centre
* Use compound `MenuItem` instead of custom button
* Color thread icon when hovered
* Make the pop-up scrollable and add a max height
* Remove Math.random in key
* Remove unused class
* Change add comments on `mx_ThreadsActivityRows` and `mx_ThreadsActivityRow`
* Make threads activity centre labs flag split out unread counts
Just shows notif & unread counts for main thread if the TAC is enabled.
* Fix tests
* Simpler fix
* Open thread panel when thread clicke in Threads Activity Centre
Hopefully this is a sensible enough way. The panel will stay open of
course (ie. if you go to a different room & come back), but that's the
nature of the right panel.
* Dynamic state of room
* Add doc
* Use the StatelessNotificationBadge component in ThreadsActivityCentre
and re-use the existing NotificationLevel
* Remove unused style
* Add room sorting
* Fix `ThreadsActivityRow` props doc
* Pass in & cache the status of the TAC labs flag
* Pass includeThreads as setting to doesRoomHaveUnreadMessages too
* Fix tests
* Add analytics to the TAC (#12179)
* Update TAC label (#12186)
* Add `IndicatorIcon` to the TAC button (#12182)
Add `IndicatorIcon` to the TAC button
* Threads don't have activity if the room is muted
This makes it match the computation in determineUnreadState.
Ideally this logic should all be in one place.
* Re-use doesRoomHaveUnreadThreads for useRoomThreadNotifications
This incorporates the logic of not showing unread dots if the room
is muted
* Add TAC description in labs (#12197)
* Fox position & size of dot on the tac button
IndicatorIcon doesn't like having the size of its icon adjusted and
we probably shouldn't do it anyway: better to specify to the component
what size we want it.
* TAC: Utils tests (#12200)
* Add tests for `doesRoomHaveUnreadThreads`
* Add tests for `getThreadNotificationLevel`
* Add test for the ThreadsActivityCentre component
* Add snapshot test
* Fix narrow hover background on TAC button
Make the button 32x32 (and the inner icon 24x24)
* Add caption for empty TAC
* s/tac/threads_activity_centre/
* Fix i18n & add tests
* Add playwright tests for the TAC (#12227)
* Fox comments
---------
Co-authored-by: David Baker <dbkr@users.noreply.github.com>
* Fix StorageManager checks for rust migration manual opt-in
* fix restricted imports
* Moved utility to check db internals into js-sdk
* fix typos and test names
* more timeout for migration test
* Update to compound-web 3.0.1
Pulls in a fix to make the indicator icon dot black/white rather than
grey for activity.
* Update snapshots
* More snapshots
* New room header
- add chat button during call
- close lobby button in lobby
- join button if session exists
- allow to toggle call <-> timeline during call with call button
Compound style for join button in call notify toast.
Signed-off-by: Timo K <toger5@hotmail.de>
* dont show start call, join button in video rooms.
Signed-off-by: Timo K <toger5@hotmail.de>
* Make active call check based on participant count
Not based on available call object
Signed-off-by: Timo K <toger5@hotmail.de>
* fix room header tests
Signed-off-by: Timo K <toger5@hotmail.de>
* fix room header tests
Signed-off-by: Timo K <toger5@hotmail.de>
* remove chat button test for displaying.
Chat button display logic is now part of the RoomHeader.
Signed-off-by: Timo K <toger5@hotmail.de>
* remove duplicate notification Tread icon
Signed-off-by: Timo K <toger5@hotmail.de>
* remove obsolete jest snapshot
Signed-off-by: Timo K <toger5@hotmail.de>
* Update src/components/views/rooms/RoomHeader.tsx
Co-authored-by: Robin <robin@robin.town>
* update isECWidget logic
Signed-off-by: Timo K <toger5@hotmail.de>
* remove dead code
Signed-off-by: Timo K <toger5@hotmail.de>
* refactor call options
Add menu to choose if there are multiple options
Signed-off-by: Timo K <toger5@hotmail.de>
* join ec when clicking join button (dont start jitsi)
Use icon buttons
don't show call icon when join button is visible
Signed-off-by: Timo K <toger5@hotmail.de>
* refactor isViewingCall
Signed-off-by: Timo K <toger5@hotmail.de>
* fix room header tests
Signed-off-by: Timo K <toger5@hotmail.de>
* fix header snapshot
Signed-off-by: Timo K <toger5@hotmail.de>
* sonar proposals
Signed-off-by: Timo K <toger5@hotmail.de>
* fix event shiftKey may be undefined
Signed-off-by: Timo K <toger5@hotmail.de>
* more lobby time before timeout
only await sticky promise on becoming sticky.
Signed-off-by: Timo K <toger5@hotmail.de>
* don't allow starting new calls if there is an ongoing other call.
Signed-off-by: Timo K <toger5@hotmail.de>
* review
Signed-off-by: Timo K <toger5@hotmail.de>
* fix translation typo
Signed-off-by: Timo K <toger5@hotmail.de>
---------
Signed-off-by: Timo K <toger5@hotmail.de>
Co-authored-by: Robin <robin@robin.town>
* Add `Thread Activity centre` labs flag
* Rename translation string
* Update supportedLevels
* Fix labs subsection test
* Update Threads Activity Centre label
* Make threads activity centre labs flag split out unread counts
Just shows notif & unread counts for main thread if the TAC is enabled.
* Fix tests
* Simpler fix
* Pass in & cache the status of the TAC labs flag
* Pass includeThreads as setting to doesRoomHaveUnreadMessages too
* Fix tests
---------
Co-authored-by: David Baker <dbkr@users.noreply.github.com>
* Refactor ElementCall to use the widget lobby.
- expose skip lobby
- use the widget.data to build the widget url
Signed-off-by: Timo K <toger5@hotmail.de>
* Use shiftKey click to skip the lobby
Signed-off-by: Timo K <toger5@hotmail.de>
* remove Lobby component
Signed-off-by: Timo K <toger5@hotmail.de>
* update tests + remove EW lobby related tests
Signed-off-by: Timo K <toger5@hotmail.de>
* remove lobby device button tests
Signed-off-by: Timo K <toger5@hotmail.de>
* i18n
Signed-off-by: Timo K <toger5@hotmail.de>
* use voip participant label
Signed-off-by: Timo K <toger5@hotmail.de>
* update tests
Signed-off-by: Timo K <toger5@hotmail.de>
* fix rounded corners in pip
Signed-off-by: Timo K <toger5@hotmail.de>
* allow joining call in legacy room header (without banner)
Signed-off-by: Timo K <toger5@hotmail.de>
* Introduce new connection states for calls.
And use them for integrated lobby.
Signed-off-by: Timo K <toger5@hotmail.de>
* New room header call join
Fix broken top container element call.
Signed-off-by: Timo K <toger5@hotmail.de>
* i18n
Signed-off-by: Timo K <toger5@hotmail.de>
* Fix closing element call in lobby view.
(should destroy call if there the user never managed to connect (not clicked join in lobby)
Signed-off-by: Timo K <toger5@hotmail.de>
* all cases for connection state
Signed-off-by: Timo K <toger5@hotmail.de>
* add correct LiveContentSummary labels
Signed-off-by: Timo K <toger5@hotmail.de>
* Theme widget loading (no rounded corner)
destroy call when switching room while a call is loading.
Signed-off-by: Timo K <toger5@hotmail.de>
* temp
Signed-off-by: Timo K <toger5@hotmail.de>
* usei view room dispatcher instead of emitter
Signed-off-by: Timo K <toger5@hotmail.de>
* tidy up
Signed-off-by: Timo K <toger5@hotmail.de>
* returnToLobby + remove StartCallView
Signed-off-by: Timo K <toger5@hotmail.de>
* comment cleanup
Signed-off-by: Timo K <toger5@hotmail.de>
* disconnect ongoing calls before making widget sticky.
Signed-off-by: Timo K <toger5@hotmail.de>
* linter + jitsi as videoChannel
Signed-off-by: Timo K <toger5@hotmail.de>
* stickyPromise type
Signed-off-by: Timo K <toger5@hotmail.de>
* fix legacy call (jistsi, cisco, bbb) reopen
when clicking call button
Signed-off-by: Timo K <toger5@hotmail.de>
* fix tests and connect resolves
Signed-off-by: Timo K <toger5@hotmail.de>
* fix "waits for messaging when connecting" test
Signed-off-by: Timo K <toger5@hotmail.de>
* Allow to skip awaiting Call session events.
This option is used in tests to spare mocking the
events emitted when EC updates the room state
Signed-off-by: Timo K <toger5@hotmail.de>
* add sticky test
Signed-off-by: Timo K <toger5@hotmail.de>
* add test for looby tile rendering
Signed-off-by: Timo K <toger5@hotmail.de>
* fix flaky test
Signed-off-by: Timo K <toger5@hotmail.de>
* add reconnect after disconnect test (video room)
Signed-off-by: Timo K <toger5@hotmail.de>
* add shift click test to call toast
Signed-off-by: Timo K <toger5@hotmail.de>
* test for allowVoipWithNoMedia in widget url
Signed-off-by: Timo K <toger5@hotmail.de>
* fix e2e tests to search for the right element
Signed-off-by: Timo K <toger5@hotmail.de>
* destroy call after test so next test does not fail
Signed-off-by: Timo K <toger5@hotmail.de>
* new call test (connection failed)
Signed-off-by: Timo K <toger5@hotmail.de>
* reset to real timers
Signed-off-by: Timo K <toger5@hotmail.de>
* dont use skipSessionAwait for tests
Signed-off-by: Timo K <toger5@hotmail.de>
* code quality (sonar)
Signed-off-by: Timo K <toger5@hotmail.de>
* refactor call.disconnect tests (dont use skipSessionAwait)
Signed-off-by: Timo K <toger5@hotmail.de>
* miscellaneous cleanup
Signed-off-by: Timo K <toger5@hotmail.de>
* only send call notify after the call has been joined (not when just opening the lobby)
Signed-off-by: Timo K <toger5@hotmail.de>
* update call notify tests to expect notify on connect.
Not on widget creation.
Signed-off-by: Timo K <toger5@hotmail.de>
* Update playwright/e2e/room/room-header.spec.ts
Co-authored-by: Robin <robin@robin.town>
* Update src/components/views/voip/CallView.tsx
Co-authored-by: Robin <robin@robin.town>
* review
rename connect -> start
isVideoRoom not dependant on feature flags
rename allOtherCallsDisconnected -> disconnectAllOtherCalls
Signed-off-by: Timo K <toger5@hotmail.de>
* check for EC widget
Signed-off-by: Timo K <toger5@hotmail.de>
* dep array
Signed-off-by: Timo K <toger5@hotmail.de>
* rename in spyOn
Signed-off-by: Timo K <toger5@hotmail.de>
---------
Signed-off-by: Timo K <toger5@hotmail.de>
Co-authored-by: Robin <robin@robin.town>
* Fix display of room notification debug info
* Add 'one' string because apprently it just displays nothing at all
if that's missing, rather than erroring or falling back to use the 'other'.
* Simplify and always display the count: it's debug info so it's best to
be very explicit anyway, plus simpler code & one less string.
* Update snapshot