* 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
* Use Intl for names of languages
* Tweak Intl language style from "American English" -> "US English"
* Update tests
* Fix tests
* Consolidate languageHandler-test files
* Improve coverage
* Consistent casing for languages in dropdown
* Update LanguageDropdown.tsx
* Delint & update snapshot
* Fix tests
* Improve coverage
`of` will fallback to the given code with fallback=code (default)
* 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
* dont show account deactivation for externally managed accounts
* Update snapshots - field ID changed
---------
Co-authored-by: Andy Balaam <andy.balaam@matrix.org>
* 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
* redirect to auth provider when signing out
* open auth provider in new tab, refresh sessions on return
* correct comment
* fix bad copy paste
* try to make sonar happy
* Update for latest revision of MSCs
* Update SessionManagerTab-test.tsx
* Make InteractiveAuthCallback async and await it
---------
Co-authored-by: Hugh Nimmo-Smith <hughns@matrix.org>
Co-authored-by: Hugh Nimmo-Smith <hughns@users.noreply.github.com>
Co-authored-by: Andy Balaam <andy.balaam@matrix.org>
* 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>
* Iterate search public spaces UX
* Tweak iconography in spotlight
* Delabs `Exploring public spaces`
* Tweak msc3827 v1.4 support discovery
* i18n
* Delete stale test
* Fix tests
* Iterate
* Iterate PR based on review
* Improve types
* Add shortcut to search for public spaces to create space menu
* Update import
* Add org.matrix.msc3827.stable filtering
* Fix tests
* silence some errors
* Remove last instance of componentWillMount
* Load SAS Emoji translations from @matrix-org/spec
* Fix import
* Test normalisation on both sides
* update comment for @richvdh
* Delint
* Supply '--network slirp4netns:allow_host_loopback=true' argument when launching via Podman
This means that the host.containers.internal address will work as a way
to access the host machine's network from within the container in
Podman. This is eqivalent to '--add-host
host.docker.internal:host-gateway' in Docker.
* Log the locations of generated files for Cypress tests
* Use 'host.containers.internal' to access the host network when using Podman
* Support Podman in email Cypress tests too
* Restrict code that decides between Docker and Podman to run in Cypress plugins
Because it can't run in the browser - it needs to run a command line
command to find out.
* Move logic for HOST_DOCKER_INTERNAL into cfgDirFromTemplate
* Treat lists with a single empty item as plain text, not Markdown.
This allows users to send simple messages such as `-`, `+`, `*` and
`2021.` without Element Web mangling them into a nonsensical empty list.
As soon as any non-whitespace content is added to the item, it switches
back to treating it as a list of one item.
Fixesvector-im/element-web#7631.
* Fix type errors.
* Lint.
---------
Co-authored-by: Michael Weimann <michaelw@matrix.org>
Co-authored-by: Johannes Marbach <johannesm@element.io>
* Let scrollable dialogs shrink to the size of the content
Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>
* Pin the action buttons to the bottom of the scrollable dialogs
Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>
---------
Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>
* Update Jest to more recent release
I want to use things like `jest.advanceTimersByTimeAsync`
* more jest updates
* add dep on types/prettier
* fix LegacyRoomHeader-test
* fix MatrixChat-test
* fix RoomView-test
* fix PollHistory-test
* update SidebarUserSettingsTab-test
* fix PipContainer-test
* fix UserOnboardingPage-test
* fix WidgetContextMenu-test.tsx
* Avoid `mockImplementation` for mock `matchMedia` impl
`mockImplementation` is (now) reset by `jest.resetAllMocks` and
`jest.restoreAllMocks`, which we don't really want here.
Fixes `theme-test`
* 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.
* fix FormattingButtons-test.tsx
* fix DeviceListenerTest
* fix RoomTile-test
* 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
* This addresses two issues:
1. Include non-matching DMs in Spotlight suggestions if the userId of the DM is included in the user directory search results
2. The user directory search results order is kept when there is no relevant activity between users, instead of sorting by MXID
* Applying feedback from PR:
1. Updated comments
2. Renamed users to userDirectorySearchResults
3. Makes sure linter is happy