* Move avatar to new compound implementation
* Make space avatars square
* Remove reference to the avatar initial CSS class
* remove references to mx_BaseAvatar_image
* Fixe test suites
* Fix accessbility violations
* Add ConfirmUserActionDialog test
* Fix tests
* Add FacePile test
* Fix items clipping in members list
* Fix user info avatar sizing
* Fix tests
* Add mechanism to check only one instance of the app is running
This isn't used yet, but will form part of the solution to
https://github.com/vector-im/element-web/issues/25157.
* disable instrumentation for SessionLock
* disable coverage reporting
* exclude SessionLock in sonar.properties
* Revert "disable coverage reporting"
This reverts commit 80c4336f76ec8e47e376b6744ef612a73299d14f.
* only disable session storage
* use pagehide instead of visibilitychange
* Add `checkSessionLockFree`
* Give up waiting for a lock immediately when someone else claims
* Update src/utils/SessionLock.ts
* util for account url
* test cases
* disable multi session selection on device list
* remove sign out all from context menus when oidc-aware
* comment
* remove unused param
* typo
* Use Intl to generate better internationalised date formats
* Get `Yesterday` and `Today` from Intl also
* Correct capitalisation blunder
* Fix formatTime include weekday
* Iterate
* Fix tests
* use jest setSystemTime
* Discard changes to cypress/e2e/settings/general-user-settings-tab.spec.ts
* Discard changes to res/css/_components.pcss
* Discard changes to res/css/views/elements/_LanguageDropdown.pcss
* Discard changes to src/components/views/elements/LanguageDropdown.tsx
* Add docs & tests for getDaysArray & getMonthsArray
* Discard changes to test/components/structures/__snapshots__/MatrixChat-test.tsx.snap
* Consolidate consts
* Improve testing & documentation
* Update snapshot
* Apply suggestions from code review
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Iterate
* Clarify comments
* Update src/DateUtils.ts
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Specify hourCycle
* Discard changes to test/components/views/settings/devices/DeviceDetails-test.tsx
* Update comments
---------
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Move `mediaDevices` mock out of `setupManualMocks`
This doesn't work well in test suites with multiple tests, because the
`mockReturnValue` is reset for subsequent tests.
In any case, having it mocked out automagically is *magical*. Let's make it
opt-in.
* clarify ts-ignore
* Switch to importing TypedEventEmitter from main js-sdk export
* Switch to importing js-sdk/matrix in cypress
* Remove duplicated imports
* Fix lint:js-fix to run prettier last otherwise ESLint --fix may cause a mess
* Add lint rule
* Switch to importing models/Room from main js-sdk export
* Fix cypress-axe import
* Fix more imports
* Fix cypress-axe import
* Fix duplicated lint rule
* utils to persist clientId and issuer after oidc authentication
* add dep oidc-client-ts
* persist issuer and clientId after successful oidc auth
* add OidcClientStore
* comments and tidy
* format
* Offer to unban user during invite if inviter has sufficient permissions
* Improve unban check in MultiInviter
* Improve coverage
* Update src/utils/MultiInviter.ts
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>
* add delegatedauthentication to validated server config
* dynamic client registration functions
* test OP registration functions
* add stubbed nativeOidc flow setup in Login
* cover more error cases in Login
* tidy
* test dynamic client registration in Login
* comment oidc_static_clients
* register oidc inside Login.getFlows
* strict fixes
* remove unused code
* and imports
* comments
* comments 2
* util functions to get static client id
* check static client ids in login flow
* remove dead code
* OidcRegistrationClientMetadata type
* navigate to oidc authorize url
* exchange code for token
* navigate to oidc authorize url
* navigate to oidc authorize url
* test
* adjust for js-sdk code
* login with oidc native flow: messy version
* tidy
* update test for response_mode query
* tidy up some TODOs
* use new types
* add identityServerUrl to stored params
* unit test completeOidcLogin
* test tokenlogin
* strict
* whitespace
* tidy
* unit test oidc login flow in MatrixChat
* strict
* tidy
* extract success/failure handlers from token login function
* typo
* use for no homeserver error dialog too
* reuse post-token login functions, test
* shuffle testing utils around
* shuffle testing utils around
* i18n
* tidy
* Update src/Lifecycle.ts
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* tidy
* comment
* update tests for id token validation
* move try again responsibility
* prettier
* use more future proof config for static clients
* test util for oidcclientconfigs
* rename type and lint
* correct oidc test util
* store issuer and clientId pre auth navigation
* adjust for js-sdk changes
* update for js-sdk userstate, tidy
* update MatrixChat tests
* update tests
---------
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* test util for oidcclientconfigs
* rename type and lint
* correct oidc test util
* store issuer and clientId pre auth navigation
* update for js-sdk userstate, tidy
* add delegatedauthentication to validated server config
* dynamic client registration functions
* test OP registration functions
* add stubbed nativeOidc flow setup in Login
* cover more error cases in Login
* tidy
* test dynamic client registration in Login
* comment oidc_static_clients
* register oidc inside Login.getFlows
* strict fixes
* remove unused code
* and imports
* comments
* comments 2
* util functions to get static client id
* check static client ids in login flow
* remove dead code
* OidcRegistrationClientMetadata type
* navigate to oidc authorize url
* navigate to oidc authorize url
* test
* adjust for js-sdk code
* update test for response_mode query
* use new types
* strict
* tidy
* Use new `CryptoEvent.VerificationRequestReceived` event
https://github.com/matrix-org/matrix-js-sdk/pull/3514 deprecates
`CryptoEvent.VerificationRequest` in favour of
`CryptoEvent.VerificationRequestReceived`. Use the new event.
* Factor out `getDeviceCryptoInfo` function
I seem to be writing this logic several times, so let's factor it out.
* Factor out `getUserDeviceIds` function
Another utility function
* VerificationRequestToast: `getStoredDevice` -> `getDeviceCryptoInfo`
* SlashCommands: `getStoredDevice` -> `getDeviceCryptoInfo`
* MemberTile: `getStoredDevicesForUser` -> `getUserDeviceIds`
* Remove redundant mock of `getStoredDevicesForUser`
* add delegatedauthentication to validated server config
* dynamic client registration functions
* test OP registration functions
* add stubbed nativeOidc flow setup in Login
* cover more error cases in Login
* tidy
* test dynamic client registration in Login
* comment oidc_static_clients
* register oidc inside Login.getFlows
* strict fixes
* remove unused code
* and imports
* comments
* comments 2
* util functions to get static client id
* check static client ids in login flow
* remove dead code
* OidcRegistrationClientMetadata type
* use registerClient from js-sdk
* use OidcError from js-sdk
* util functions to get static client id
* check static client ids in login flow
* remove dead code
* add trailing slash
* comment error enum
* spacing
* PR tidying
* more comments
* add ValidatedDelegatedAuthConfig type
* Update src/Login.ts
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Update src/Login.ts
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Update src/utils/ValidatedServerConfig.ts
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* rename oidc_static_clients to oidc_static_client_ids
* comment
---------
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* force disable encryption on room creation
* test allowChangingEncryption
* move into utils/room directory
* tests
* unit test CreateRoomDialog
* remove debug
* wait for constructor promises to settle
* test case for force_disable
* comment
* set forced value after resolving checkUserIsAllowedToChangeEncryption
* tidy and comments
* use label text in test
* Speed up `waitForMember` if user already in room
`waitForMember` waits for a user to join, or be invited, to a room. But if the
user is already in the room (ie, we miss the `NewMember` event), we end up
timing out after 1500ms.
We can save 1.5s here by returning immediately.
* fix strict type errors
* stfu SonarCloud
* fix matrix search link
* fix matrix search link
Signed-off-by: Boluwatife Omosowon <boluomosowon@gmail.com>
* fix: allow full link search
Signed-off-by: Boluwatife Omosowon <boluomosowon@gmail.com>
* fix: allow full link search on new search feature
Signed-off-by: Boluwatife Omosowon <boluomosowon@gmail.com>
* improve transformSearchTerm function
Signed-off-by: Boluwatife Omosowon <boluomosowon@gmail.com>
* improve transformSearchTerm function
Signed-off-by: Boluwatife Omosowon <boluomosowon@gmail.com>
* add review changes
* Signed-off-by: Boluwatife Omosowon <boluomosowon@gmail.com>
added review correction
changed the transformSearchTerm function to use parsePermaLink
removed extra spaces
* add angle brackets to copyright email title
* removed extra space
Signed-off-by: Boluwatife Omosowon <boluomosowon@gmail.com>
* Update src/utils/SearchInput.ts
Co-authored-by: Travis Ralston <travpc@gmail.com>
* fixed spolight dialog search for room and user links
* added tests for transformSearchTerm
* removed transformSearchTerm from room search bar
* replaces two test cases to one that should return the primaryEntityId if the search term was a permalink
* corrected ts issues
* changed type of transformSearchTerm to string
* changed return value from empty string to the original search term if the primaryEntityId of the parsedLink is null
* changed return value from empty string to the original search term if the primaryEntityId of the parsedLink is null
* refactored transformSearchTerm and added a new test case
* rewrote transformSearchTerm doc
* changed mocked return values of test case - should return the original search term if the search term is a permalink and the primaryEntityId is null
* lint corrections
---------
Signed-off-by: Boluwatife Omosowon <boluomosowon@gmail.com>
Co-authored-by: Boluwatife Omosowon <boluwatifeomosowon@Jesus-Loves-You.local>
Co-authored-by: Travis Ralston <travpc@gmail.com>
* Improve typing in constructor of RoomPermalinkCreator
* Provide via servers if present when navigating to predecessor room from Advanced Room Settings
* Show an error tile when the predecessor room is not found
* Test for MatrixToPermalinkConstructor.forRoom
* Test for MatrixToPermalinkConstructor.forEvent
* Display a tile for predecessor event if it contains via servers
* Fix missing case where event id is provided as well as via servers
* Refactor RoomPredecessor tests
* Return lost filterConsole to its home
* Comments for IState in AdvancedRoomSettingsTab
* Explain why we might render a tile even without prevRoom
* Guess the old room's via servers if they are not provided
* Fix TypeScript errors
* Adjust regular expression (hopefully) to avoid potential catastrophic backtracking
* Another attempt at avoiding super-liner regex performance
* Tests for guessServerNameFromRoomId and better implementation
* Further attempt to prevent backtracking
---------
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* Apply `strictNullChecks` to `src/utils/exportUtils`
* strict fix
* fix strictNullChecks issues in some utils
* fix error message
* test coverage
* lint
* more strictNullChecks
* small optimisation for getUniqueRoomsWithIndividuals
* tidy
* test coverage
* Fix start DM with pending third party invite
* Make the fix more clearly visible
---------
Co-authored-by: Janne Mareike Koschinski <jannemk@element.io>
Co-authored-by: Janne Mareike Koschinski <janne@kuschku.de>
* add settings while under development
* very basic tests for roomsummarycard
* empty poll history dialog and option in room summary
* pollS history in settings
* render an ugly list of polls in current timeline
* readonly poll history list items
* fix scroll window
* use short year code in date format, tidy
* no results message + tests
* strict fix
* mock intldatetimeformat for stable date formatting
* extract date format fn into date-utils
* jsdoc
* Revert "Apply more general fix for base avatar regressions (#10045)"
This reverts commit 371a3c0d36.
* Revert "Fix layout and visual regressions around default avatars (#10031)"
This reverts commit 0d1fce37b2.
* Revert "Member avatars without canvas (#9990)"
This reverts commit a8aa4de4b4.
* Update snapshots
* noImplicitAny fixes for MessageDiffUtils
Signed-off-by: Clark Fischer <clark.fischer@gmail.com>
* Add tests for MessageDiffUtils
Adds mostly snapshot tests for MessageDiffUtils to guarantee consistent
behavior.
Signed-off-by: Clark Fischer <clark.fischer@gmail.com>
* Strict mode fixes for MessageDiffUtils
Gets `MessageDiffUtils` to pass under `tsc --strict`.
Fixes https://github.com/vector-im/element-web/issues/23665 - no longer errors,
though it still isn't correct.
Signed-off-by: Clark Fischer <clark.fischer@gmail.com>
* Remove obsolete DiffDOM workaround
Workaround is no longer necessary as of DiffDOM 4.2.1
See https://github.com/fiduswriter/diffDOM/issues/90
Signed-off-by: Clark Fischer <clark.fischer@gmail.com>
---------
Signed-off-by: Clark Fischer <clark.fischer@gmail.com>