* Tweak copy for user verification toast
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update tests
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>
* New user profile UI in User Settings
Using new Edit In Place component.
* Show avatar upload error
* Fix avatar upload error
* Wire up errors & feedback for display name setting
* Implement avatar upload / remove progress toast
* Add 768px breakpoint
* Fix display of no avatar in avatar setting controls
There was supposed to be a person icon but it was invisible, and also
would have been inappropriate for room avatars anyway.
This makes it match the designs by being the same as whatever the
default avatar is.
* Fix room profile display
* Update edit icon on avatarsetting comnponent
* Change avatarsetting componment to use a menu
As per the designs, remove the 'remove' link and instead have a menu
pop up to either upload a new file or remove the avatar.
This also changes the room profile viw, since that uses the same view.
* Update to released compund-web with required components / fixes
* Require compound-web 4.4.0
because we do need it
* Update snapshots
Because of course all the auto-generated IDs of unrelated things
have changed.
* Fix duplicate import
* Fix CSS comment
* Update snapshot
* Run all the tests so the ids stay the same
* Start of a test for ProfileSettings
* More tests
* Test that a toast appears
* Test ToastRack
* Update snapshots
* Add the usernamee control
* Fix playwright tests
* New compound version for editinplace fixes
* Fix useId to not just generate a constant ID
* Use the label in the username component
* Fix widths of test boxes
* Update screenshots
* Put ^ back on compound-web version
* Split CSS for room & user profile settings
and name the components correspondingly
* Fix playwright test
* Update room settings screenshot
* Use original screenshot instead
* Add required props in test
* Fix test
* Also here
* Update screenshots
* Remove user icon
...which is unused now, as far as I can see.
* Fix styling of unrelated buttons
Needed to be added in other places otherwise the specificity changes.
Also put the old screenshots back.
* Add copyright year
* Fix copyright year
* Switch to useMatrixClientContext
* Fix other test
* Make clickable with no avatar again and fix tests
and renmove a test for the remove button which is no longer there
* Put back missing CSS to make the menu entry red
* Fix type error
* Fix tests
* Supply open / onOpenChange props
* Fix tests
* There is no hover anymore
* Use the computed name, not the name which may be null
* Fix room avatar remove behaviour
* Remove redundant else
* New user profile UI in User Settings
Using new Edit In Place component.
* Show avatar upload error
* Fix avatar upload error
* Wire up errors & feedback for display name setting
* Implement avatar upload / remove progress toast
* Add 768px breakpoint
* Fix room profile display
* Update to released compund-web with required components / fixes
* Require compound-web 4.4.0
because we do need it
* Update snapshots
Because of course all the auto-generated IDs of unrelated things
have changed.
* Fix duplicate import
* Fix CSS comment
* Update snapshot
* Run all the tests so the ids stay the same
* Start of a test for ProfileSettings
* More tests
* Test that a toast appears
* Test ToastRack
* Update snapshots
* Add the usernamee control
* Fix playwright tests
* New compound version for editinplace fixes
* Fix useId to not just generate a constant ID
* Use the label in the username component
* Fix widths of test boxes
* Update screenshots
* Put ^ back on compound-web version
* Split CSS for room & user profile settings
and name the components correspondingly
* Fix playwright test
* Update room settings screenshot
* Use original screenshot instead
* Fix styling of unrelated buttons
Needed to be added in other places otherwise the specificity changes.
Also put the old screenshots back.
* Add copyright year
* Fix copyright year
* Refactor some logic into common AvatarSetting component
We duplicated some of the logic of setting avatars between profiles &
rooms. This pulls some of that logic into the AvatarSetting component
and hopefully make things a little simpler.
* Unsed import
* Convert JS based hover to CSS
* Remove unnecessary container
* Test avatar-as-file path
* Test file upload
* Unused imports
* Add test for RoomProfileSettings
* Test removing room avatar
* Move upload control CSS too
* Remove commented code
Co-authored-by: Florian Duros <florianduros@element.io>
* Prettier
* Coments & move style to inline as per PR suggestion
* Better test names
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Fix test
Upload input doesn't have that class anymore
---------
Co-authored-by: Florian Duros <florianduros@element.io>
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Ensure we do not fire the verification mismatch modal multiple times
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add rust crypto test for mismatch emoji cancellation
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Remove redundant option
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Stabilise app download dialog screenshot test
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Try to stabilise user menu opening in playwright tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Stabilise one-to-one-chat.spec.ts
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Stabilise kick.spec.ts
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Discard changes to playwright/element-web-test.ts
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* remove old pre-join UTD logic
and add a playwright test for new pre-join UTD
* remove variable that isn't used any more
* add missing synapse template
* remove unused variable (again) and run prettier
* add test that we can jump to an event before our latest join membership event
* modify default template instead of creating a new template
* Collapse UserSettings tabs to just icons on narrow screens
* Add screenshot test
* Better comment formatting.
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Comment the media query
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
---------
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Convert tabbedview to functional component
The 'Tab' is still a class, so now it's a functional component that
has a supporting class, which is maybe a bit... jarring, but I think
is actually perfectly logical.
* put comment back
* Fix bad tab ID behaviour
* Make TabbedView a controlled component
This does mean the logic of keeping what tab is active is now in each
container component, but for a functional component, this is a single
line. It makes TabbedView simpler and the container components always
know exactly what tab is being displayed rather than having to effectively
keep the state separately themselves if they wanted it.
Based on https://github.com/matrix-org/matrix-react-sdk/pull/12478
* Move the active tab in user settings to the dialog title
Separated by a colon, as per the new design.
* Update snapshots
* Update a playwright test
* Fix more tests / snapshots
* Attempt to test all the cases of titleForTabID
* More tests
* Send user credentials to service worker for MSC3916 authentication
* appease linter
* Add initial test
The test fails, seemingly because the service worker isn't being installed or because the network mock can't reach that far.
* Remove unsafe access token code
* Split out base IDB operations to avoid importing `document` in serviceworkers
* Use safe crypto access for service workers
* Fix tests/unsafe access
* Remove backwards compatibility layer & appease linter
* Add docs
* Fix tests
* Appease the linter
* Iterate tests
* Factor out pickle key handling for service workers
* Enable everything we can about service workers
* Appease the linter
* Add docs
* Rename win32 image to linux in hopes of it just working
* Use actual image
* Apply suggestions from code review
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Improve documentation
* Document `??` not working
* Try to appease the tests
* Add some notes
---------
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Take the TAC out of labs!
Requires https://github.com/matrix-org/matrix-react-sdk/pull/12438
and ideally https://github.com/matrix-org/matrix-react-sdk/pull/12418
* i18n
* Add test method
That's needed now we we don't include threads in the notif count in the tests
* One less labs setting
* Update snapshot
* Disable release announcement
* Unused import
* Fix some screenshots
* Fix all the unread test cases now room unreads don't include threads
* Fix more tests
* Even more test fixes
* Still more test fixes
* Oh goodness, it's more test fixes
* Fix selectors now there are 2 buttons called Threads
* Disable some tests that aren't passing
for reasons that don't appear releated to any of the TAC work, as
per the comment.
* Remove debugging
* Oops, removed too much
* Use different messages for UTDs sent before login
* Playwright test for historical events
* Add some tests
* Don't show "verify" message if backup is working
* Apply suggestions from code review
* Deprecate AccessibleTooltipButton
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Deprecate AccessibleTooltipButton
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix `UserInfo-test.tsx`
* Update `LoginWithQRFlow-test.tsx` snapshot
* Remove tooltip provider from test
* Fix `AccessibleButton`
* Update snapshots
* Revert to original import
* Use title to populate aria-label
* Rollback AccessibleButton or Tooltip changes. Will come in another PR
* Rollback en.json change
* Update snapshots
* Fix `UserInfo`
* Update snapshots
* Use label instead of title in test
* Use label instead of title in TAC test
* Use label instead of title in read-receipt test
* Remove tooltip for ContextMenu
* Add extra information for caption field
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* rehydrate/dehydrate device if configured in well-known
* add handling for dehydrated devices
* some fixes
* schedule dehydration
* improve display of own dehydrated device
* created dehydrated device when creating or resetting SSSS
* some UI tweaks
* reorder strings
* lint
* remove statement for testing
* add playwright test
* lint and fix broken test
* update to new dehydration API
* some fixes from review
* try to fix test error
* remove unneeded debug line
* apply changes from review
* add Jest tests
* fix typo
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* don't need Object.assign
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
---------
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Focus the thread panel when clicking on an item in the TAC
actually the 'close' button in the threads panel as it's the only
interactive element: we can improve this later when we use landmarks
& generally have better a11y.
* Undo minor refactoring
as none of it is test3ed, it's not worth it.
* add unit test
* Add matrixchat tests
* Needs awaits
* ts-ignore
* Fix test (I think...)
* Remove unnecessary value set
* Not how assignments work
* WIP
* Store the release announcements in the account settings
* Update TAC release announcement description
* Fix settings content comparison
* Add logging in case of failure
* Watch settings changes
* I add release announcement settings to disable it
* Disable release announcement in e2e test
* Add release announcement in e2e test
* Add tests for ReleaseAnnouncementStore.ts
* Update compound-web to `3.3.0`
* Update TAC tests
* Update Labs tests
* Nits
* Add test for ReleaseAnnouncement.tsx
* Update `@vector-im/compound-web`
* Add playwright snapshot
* Delete false playwright screenshot
* Wait for EW to be displayed after reload
* Add screenshot
* Clean util file
* Renaming and comments fixing
* Use second store instead of looking in the store.
---------
Co-authored-by: R Midhun Suresh <hi@midhun.dev>
* Set display name earlier to fix playwright test
Unsure why this is failing on CI, it's fine locally. Let's try
setting the display name earlier to see if that fixes it.
* Disable failing presence test
also comments
* Link issue too
* Mark all threads as read button
* Wrap in TooltipProvider and update snapshots
* Remove TooltipProvider wrapper: just add it to the test
* Add some more tests
* Add test for no-room-context handler because sonarcloud
* Add playwright test
* Make assertNoTacIndicator wait
* Use dedicated useMatrixClientContext function
Co-authored-by: Florian Duros <florianduros@element.io>
* Use dedicated useRoomContext function
Co-authored-by: Florian Duros <florianduros@element.io>
* Compound spacing variables
Co-authored-by: Florian Duros <florianduros@element.io>
* Compound spacing variables
Co-authored-by: Florian Duros <florianduros@element.io>
* Imports
* Use createTestClient()
* Add function to utils
* Use mkRoom
---------
Co-authored-by: Florian Duros <florianduros@element.io>
* 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
* Fix flaky test `should memorize the timeline position when switch Room A -> Room B -> Room A`
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix flaky test `should be correctly rendered - high contrast theme`
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix flaky test `Cryptography › setting up secure key backup should work isDeviceVerified=false`
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>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* 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
* 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
* Resolve race condition between opening settings & well-known check in OIDC mode
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add OIDC-aware and OIDC-native tests using MAS
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Extract Postgres Docker to its own class
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Don't specify docker `--rm` in CI as it makes debugging harder
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Improve docker commands and introspection
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Remove `HOST_DOCKER_INTERNAL` magic in favour of `host.containers.internal`
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Always pipe
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Re-add pipe flag to silence pg_isready and podman checks
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
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>
* Move mailhog fixture to element-web-test.ts
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Remove spurious debug log
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Lazily set up ElementAppPage subfixtures to avoid conflicting on network routing
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update playwright/e2e/crypto/utils.ts
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.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
* Enable redirected media by default
See https://github.com/matrix-org/matrix-js-sdk/pull/4007
* Update the tests
* Update tests
* Update end-to-end tests too
* Update linkifier to use Media customisation endpoint
* Fix tests for new js-sdk behaviour
* Fix unchanged file
* Fix linkifier
* Fix lint
* 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>