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