* Replace element-icons/chat-bubbles.svg with compound
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Replace element-icons/chat-bubbles.svg with compound
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Replace external-link.svg with compound
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Replace element-icons/hide.svg with compound
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Replace element-icons/explore.svg with compound
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Replace element-icons/hash-*.svg with compound
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Replace element-icons/share.svg with compound
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Replace element-icons/group-members.svg with compound
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Replace element-icons/mask-as-*.svg with compound
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Replace element-icons/low-priority.svg with compound
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Replace element-icons/plus-circle.svg with compound
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Replace element-icons/roles.svg with compound
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update jest snapshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update screenshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update screenshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update screenshot
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Introduce i18nContext
* Adds a context that holds the module i1n API
* Switches shared components to use that instead of importing it directly
* Adds the context to MatrixChat and BaseDalog so it should be available most places in EW
This is a relatively small PR but does change the way the shared components do i18n so
just doing this one by itself (it stands by itself anyway).
This will allow shared components to use i18n when used in modules.
* Add the file
* Fix import lint
* Name the translate function _t
Then it should continue to get picked up by the script
This seems a bit flaky and ew but I'm not sure I want to get into
changing this in this PR.
* Put humanize back to calling something called _t too
* Missed one
* Add i18n context wrapper to stories
* Unused import
* Fix imports
* wrap richitem
* Wrap other richitem & richlist
* One day I will get my head around this syntax
* Fix import spacing
* Add wrapper to test
* unused import
* Hack around dependency cycle
* Make a moduleapi instance for tests
* Add i18n wrapper to jest-matrix-react
* Simple test for i18napi
* Import type
* Move i18n context wrapper to storybook template
* Unused imports & fix pill story
* Move i18n to its own provider
* Add i18ncontext wrapper to jest tests
* imports
* Bump module api to 1.7.0
* tsdoc
* MatrixChat: add a load of logging for view transitions
This stuff was essentially impossible to follow and debug. I think a load of
logging will help.
* Add more comments on `state.view`
* Add a new state between LOADING/SOFT_LOGOUT and LOGGED_IN
... so that we can transition into COMPLETE_SECURITY without going via
LOGGED_IN.
* Remove redundant check for `force_verification`
This check was previously necessary to keep the tests working, because:
* onLoggedIn would call `onShowPostLoginScreen`,
* which (without the check) would call `showScreenAfterLogin`
* which would queue up an action `Action.ViewHomePage`
* Then we would receive an already-queued `ClientStarted` action, which would
transition us (correctly) to the `COMPLETE_SECURITY` view
* Then we would receive the `ViewHomePage` action, taking us back to `LOGGED_IN`.
I don't think the check was necessary in practice, because in practice there
would be enough delay between the OnLoggedIn and ClientStarted actions that the
race didn't happen.
The *problem* with the check was that it meant that, whenever
`force_verification` was enabled, we would get stuck in the LOADING state.
The check is now unnecessary, because `onLoggedIn` no longer calls
`onShowPostLoginScreen`.
* `onShowPostLoginScreen` need no longer be `async`
* Regression test for https://github.com/element-hq/element-web/issues/31203
Add a workaround for the fact that MatrixChat attempts to use React state for
the state of a state machine: a small `sleep` to let the state settle.
As a result, it turns out we may not see the "Syncing..." state, and in general
`waitForSyncAndLoad` doesn't seem to be doing anything useful.
* fix: display the menu option on the room list item when clicked/opened
Fix#31366
`onBlur` was called when the room is opened, the focus is moved to the
composr. The hover state was removed.
The hover state is diplayed when `ìsFocused=true` so the keyboard
navigation is not impacted
* test: update room list e2e tests
* test: update marked as unread state
* Update vector-im
* Update Jest snapshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update snapshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix playwright styling overrides
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Hold back Compound Design Tokens as threads icons unexpectedly grew a dot in the top corner where we conditionally draw a dot
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update snapshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update snapshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update Compound Design Tokens to 6.4.1
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update snapshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Revert snapshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Tweak bubble
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update snapshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update storybook snapshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update jest snapshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update jest snapshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix handling of SVGs
1. Ensure we always include thumbnails for them
2. Show `m.file` handler if we cannot render the SVG
3. When opening ImageView use svg thumbnail if the SVG cannot be rendered
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix UploadConfirmDialog choking under React devmode
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix test
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
In the upcoming work for encrypted state, we need to keep the spinner
until the m.room.encryption event is received. This change keeps the
spinner just a little longer than before: until the room is received
from the server.
I'm submitting this change partly because I think it makes sense to
delay until we can confirm the room exists and partly to separate this
change from other changes that will be involved in encrypted state. That
way if this causes problems we can discuss or revert it separately.
* Replace element-icons/room/composer/attach.svg with compound
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Replace element-icons/room/*/emoji.svg with compound
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Replace element-icons/room/message-bar/edit.svg with compound
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Replace element-icons/room/composer/poll.svg with compound
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Replace element-icons/room/composer/plain_text.svg with compound
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Remove unused star.svg
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Replace element-icons/upload.svg with compound
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Replace element-icons/settings/preference.svg with compound
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Replace element-icons/settings/flask.svg with compound
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Replace element-icons/settings/appearance.svg with compound
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update snapshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
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>
* Replace element-icons/call/dialpad.svg with compound
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Replace element-icons/call/hangup.svg with compound
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Replace element-icons/call/video-call.svg with compound
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Replace element-icons/call/voice-call.svg with compound
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Replace element-icons/cloud-off.svg with compound
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Replace element-icons/eye.svg with compound
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Remove debug
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update snapshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add a fake ecall page
* Start to setup a test to check PiP works
* Complete test file
* cleanup
* lint
* use test fail
* lint again
* remove fake
* Fix flake
* better comment
* Initial implementation of MSC4380
* fix lint
* Update InviteRulesAccountSetting-test
* add some docs
* `block_all` -> `default_action`
* Add a unit test for BlockInvitesConfigController
* Tweak rendering of icons in dropdowns
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Tweak rendering of icons in composer format bar
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Tweak rendering of icons in jump to bottom button
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Tweak rendering of icons in quick settings button
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Tweak rendering of icons in left panel search
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Delint
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update snapshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix margin
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update test
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update snapshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Tweak rendering of icons in security user settings tab
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Tweak rendering of icons in space hierarchy
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update screenshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Delint
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Simplify
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Tidy
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add test
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update snapshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Remove some unused CSS & icons
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix type
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Remove another unused class
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Move call to `tryPersistStorage` to `OnLoggedIn` handler
I think this needs to happen whether or not we are in the middle of a login
flow.
Fixes: https://github.com/element-hq/element-web/issues/31298
* Inline `MatrixChat.onLoggedIn`
It's now a one-liner, and its semantics are very confusing.
* Factor out `MatrixChat.onLoggedIn`
Now that we've got rid of the confusing `onLoggedIn` method, we can factor out
a method which *actually* handles `OnLoggedIn` actions.
* Allow the Login screen to use the dark theme
There is a whole bunch of code dedicated to attempting to force a "light" theme
onto the login view, even if the deployment is configured to prioritise the
dark theme.
Apparently this was done because, in the old days, the
login view looked rubbish with the dark theme, but now it looks fine.
Fixes https://github.com/element-hq/element-web/issues/31292
* Fix up background colour of auth screen in dark theme
In dark theme, the background of the login/register/welcome box needs to be
translucent black rather than translucent white.
To make this work, I've moved the style from inline to CSS, and used a PostCSS
variable to define the colour.
* Fix up Welcome page colours in dark theme
Make the text and image white, not black, in short.
* Fix incorrect merge
that will teach me to use the Github UI to address merge conflicts.
* Update all non-major dependencies
* Make knip happy
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>