* Rearrange user settings tab order to move Sessions up to 2nd
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate copy & iconography on Settings > Sessions > Link new device
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate design of Scan QR code screen
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Tweak styles
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update tests and snapshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update tests and snapshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update screenshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Use test helpers from js-sdk for encrypted events
Rather than gut-wrenching into the matrix-js-sdk, let's use the newly-exported
test helpers to generate encrypted events.
* Fix up
* Fix references to `crypto-api/verification`
This is supposed to be an internal module; use the front door instead.
* `IRecoveryKey` -> `GeneratedSecretStorageKey`
`IRecoveryKey` is just a backwards-compatibility alias for
`GeneratedSecretStorageKey`
* `ISecretStorageKeyInfo` -> `SecretStorage.SecretStorageKeyDescription`
Again, same thing
* `IPassphraseInfo` -> `SecretStorage.PassphraseInfo`
* Remove unused import restriction exceptions
* Improve readability of badges and pills
Badges will now always use light theme colors so that they become white-on-gray in both themes, and the contrast of pills has been increased so that they use primary action colors as the background.
* Fix tests
* Use data-mx-color for rainbows
The font tag may be deprecated soon (https://github.com/matrix-org/matrix-spec/pull/1739)
Signed-off-by: Tulir Asokan <tulir@maunium.net>
* Update tests
Signed-off-by: Tulir Asokan <tulir@maunium.net>
---------
Signed-off-by: Tulir Asokan <tulir@maunium.net>
* Add PowerLevelSelector.tsx.
It's extracting the current behavior of the privileged users and muted of `RolesRoomSettingsTab.tsx` into a dedicated component.
It's also adding a new apply button.
* Use `PowerLevelSelector` to render privileged and muted users in `RolesRoomSettingsTab`
* Update existing tests
* Add playwright test
* Fix typo
* Fix typo
* Support the mark as unread flag
* Add mark as unread menu option
and make clering notifications also clear the unread flag
* Mark as read on viewing room
* Tests
* Remove random import
* Don't show mark as unread for historical rooms
* Fix tests & add test for menu option
* Test RoomNotificationState updates on unread flag change
* Test it doesn't update on other room account data
* New icon for mark as unread
* Add analytics events for mark as (un)read
* Bump to new analytics-events package
* Read from both stable & unstable prefixes
* Cast to boolean before checking
to avoid setting state unnecessarily
* Typo
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Doc external interface (and the rest at the same time)
* Doc & rename unread market set function
* Doc const exports
* Remove listener on destroy
* Add playwright test
* Clearer language, hopefully
* Move comment
* Add reference to the MSC
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Expand on function doc
* Remove empty beforeEach
* Rejig badge logic a little and add tests
* Fix basdges to not display dots in room sublists again
and hopefully rename the forceDot option to something that better
indicates what it does, and add tests.
* Remove duplicate license header (?)
* Missing word (several times...)
* Incorporate PR suggestion on badge type switch
* Better description in doc comment
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Update other doc comments in the same way
* Remove duplicate quote
* Use quotes consistently
* Better test name
* c+p fail
---------
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Order room by thread timestamp
* Fix key errors in test
* Update jest snapshots
* Update snapshots
* Rename alpha/beta to numbers
* Add playwright test
* Change 'type' prop on badges tio 'forceDot'
Which, hopefully, better represents what it actually does. Tidies
up some of the logic.
Split out from https://github.com/matrix-org/matrix-react-sdk/pull/12254
* Missed a file
* More comments
* Oops, there is no count here.
* Back out the logic refactor of StatelessNotificationBadge
because it was also updating the logic for mark as unread badges and
rewriting the ternary to the previous logic would be quite complex.
* Fix doc comment
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Clarify doc on displaying the count
* Update doc for the forceDot param here too.
---------
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* update widget url when the theme changes
Signed-off-by: Timo K <toger5@hotmail.de>
* quick "make it EC specific" workaround proposal.
Signed-off-by: Timo K <toger5@hotmail.de>
* use `matches`
Signed-off-by: Timo K <toger5@hotmail.de>
* test coverage
Signed-off-by: Timo K <toger5@hotmail.de>
* more test coverage
Signed-off-by: Timo K <toger5@hotmail.de>
* fix jest
Signed-off-by: Timo K <toger5@hotmail.de>
* add tests for theme changes
Signed-off-by: Timo K <toger5@hotmail.de>
* update snapshots
Signed-off-by: Timo K <toger5@hotmail.de>
* test for theme update with non ec widget
Signed-off-by: Timo K <toger5@hotmail.de>
* add dark custom theme widget url
Signed-off-by: Timo K <toger5@hotmail.de>
* trigger conditions for theme cleanup
Signed-off-by: Timo K <toger5@hotmail.de>
* update tests using testId
Signed-off-by: Timo K <toger5@hotmail.de>
* use typed event emitter for theme watcher
Signed-off-by: Timo K <toger5@hotmail.de>
* simplify condition
Signed-off-by: Timo K <toger5@hotmail.de>
---------
Signed-off-by: Timo K <toger5@hotmail.de>
* Refine styles of menus, toasts, popovers, and modals
This is a reintroduction of https://github.com/matrix-org/matrix-react-sdk/pull/12247, with the difference that modal styles have now been refreshed as well.
* Restore the fixed heights of some dialogs
* Fix formatting and flaky screenshot
* show loading spinner also if waitForIframeLoad = false
Configure EC so it waits for the content loaded action
!WARNING This breaks compatibility with the full mesh branch.
I would like to discuss here if/when we can do that.
Signed-off-by: Timo K <toger5@hotmail.de>
* stop show loading screen on widget ready (instead of preparing)
Signed-off-by: Timo K <toger5@hotmail.de>
* wait until widget loading is over before comparing screenshots
Signed-off-by: Timo K <toger5@hotmail.de>
* fix waitForIFrame=true widgets
Signed-off-by: Timo K <toger5@hotmail.de>
* test
Signed-off-by: Timo K <toger5@hotmail.de>
* always start with loading true. + cleanup
Signed-off-by: Timo K <toger5@hotmail.de>
* simplify loading
Signed-off-by: Timo K <toger5@hotmail.de>
* update snapshots (start not in loading state for waitForIframe = true widgets)
Signed-off-by: Timo K <toger5@hotmail.de>
---------
Signed-off-by: Timo K <toger5@hotmail.de>
* 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