* MessageEventIndexDialog: comments for state
* ManageEventIndexDialog: deduplicate some code
`updateCurrentRoom` has the same logic as `componentDidMount`, so let's factor
it out.
* ManageEventIndexDialog: distinguish indexed rooms
Just because a room is not currently awaiting indexing does not mean it has
been indexed. Update the dialog to show the actual number of indexed rooms, and
the number of rooms that are awaiting indexing.
* Apply suggestion from @richvdh
---------
Co-authored-by: Will Hunt <2072976+Half-Shot@users.noreply.github.com>
* Remove poll ended event UI.
* Add better aria labels for screen reader and change ui to match mobile UX.
- Checkmark and progress bar are only green if the poll is ended.
- Updated the Poll icon for open and ended state and added labels
- Right align total votes count and update text
* Update jest tests
* Fix total votes alignment
* Fix screenshots
* Update snapshot
* Update e2e tests
* fix more e2e tests
* Clean up CSS
* Add back text for undisclosed poll (total should be hidden)
* Update checkmark and progress colours to more closely match mobile
* Don't compute optionNumber on each render
* "Total votes" working doesn't really work with the current web behaviour
Web doesn't show the votes for undisclosed polls(mobile does). reverting and that behaviour change should be addressed in a different PR(or on mobile.).
* Fix e2e test
* Update screenshots
* Move positioning of total votes label back to the left side
as we are no longer changing the copy to match mobile
* Don't concatenate label
* Fix translation order
* Remove unneeded translations
* remove O(n^2) code
* fix snapshots
* Fix check style in poll option
* prettier
* Move `EditInPlace` out of `Form`
If it is part of the form saving will submit the inner form of
EditInPlace and reload EW.
* add tests and comments
* update snapshot
* fix playwright
* feat(room view): add `enableReadReceiptsAndMarkersOnActivity` props
For the multiroom module, we display several room views at the same
time. In order to avoid all the rooms to send read receipts and markers
automatically when we are interacting with the UI, we add
`enableReadReceiptsAndMarkersOnActivity`props.
When at false, the timeline doesn't listen to user activity to send
these receipts. Only when the room is focused, marker and read receipts
are updated.
* test(room view): add test for `enableReadReceiptsAndMarkersOnActivity`
* build(ew-api): update `@element-hq/element-web-module-api` to `v1.9.0`
* Fix cursor position bug during IME composition
Add IME composition check to BasicMessageComposer.onKeyDown to prevent
cursor position issues when pressing Tab key immediately after Japanese
input conversion. This matches the behavior in SendMessageComposer and
EditMessageComposer.
Fixes issue where cursor would jump to the beginning of the input field
after converting Japanese text and pressing Tab.
* Add tests for IME composition keydown handling
- Add test to verify keydown events are ignored during IME composition
- Add test to verify keydown events are handled normally when not composing
- Tests ensure the fix for Japanese IME cursor position bug works correctly
* Refer to ClientWidgetApi as "widget API" rather than "messaging"
* Rename StopGapWidgetDriver to ElementWidgetDriver
* Rename StopGapWidget to WidgetMessaging
* Fix WidgetMessaging's lifetime by storing it in WidgetMessagingStore
(Rather than storing just the raw ClientWidgetApi objects.)
* Unfail test
* use an error
* cleanup start
* Add docs
* Prettier
* link to store
* remove a let
* More logging, split up loop
* Add a test demonstrating a regression in Call.start
* Restore Call.start to a single, robust event loop
* Fix test failure by resetting the messaging store
* Expand on the WidgetMessaging doc comment
* Add additional tests to buff up coverage
* Add a test for the sticker picker opening the IM.
* reduce copy paste
---------
Co-authored-by: Half-Shot <will@half-shot.uk>
Co-authored-by: Timo K <toger5@hotmail.de>
* Use EditInPlace for identity server picker.
* Update test
* Add a test for setting an ID server.
* fix tests
* Reformat other :not sections
* forgot a comma
* Update Apperance settings to use toggle switches.
* Remove unused checkbox setting.
* Remove unused import.
* Update tests
* lint
* update apperance screenshot
* Begin replacing settings
* Refactor RoomPublishSetting
* Remove LabelledToggleSwitch
* Refactor SettingsFlag to use SettingsToggleInput
* Refactor CreateRoomDialog to use SettingsToggleInput
* Refactor DeclineAndBlockInviteDialog to use SettingsToggleInput
* Update DevtoolsDialog
* Refactor ReportRoomDialog to use SettingsToggle
* Update RoomUpgradeWarningDialog to use SettingsToggleInput
* Update WidgetCapabilitiesPromptDialog to use SettingsToggleInput
* Update trivial switchovers
* Update Notifications settings to use SettingsFlag where possible
* Update RoomPublishSetting and SpaceSettingVisibilityTab to use SettingsToggleInput with a warning
* revert changes to field
* Updated screenshots
* Prevent accidental submits
* Replace test ID tests
* Create new snapshot tests
* Add screenshot test for DeclineAndBlockDialog
* Add screenshot for create room dialog.
* Add devtools test
* Add upgrade rooms test
* Add widget capabilites prompt test
* Fix spec
* Add a test for the live location sharing prompt.
* fix copyright
* Add tests for notification settings
* Add tests for user security tab.
* Add test for room security tab.
* Add test for video settings tab.
* remove .only
* Test creating a video room
* Mask the IM name in the header.
* Add spaces vis tab test.
* Fixup unit tests to check correct attributes.
* Various fixes to components for tests.
* lint
* Update compound
* update setting names
* Cleanup tests
prettier
Updates some more playwright tests
Update more snapshots
Update switch
more fixes
drop .only
last screenshot round
fix video room flake
Remove console.logs
Remove roomId from devtools view.
lint
final screenshot
* Add playwright tests
* import pages/ remove duplicate create-room
* Update screenshots
* Fix accessibility for devtools
* Disable region test
* Fixup headers
* remove extra test
* Fix permissions dialog
* fixup tests
* update snapshot
* Update jest tests
* Clear up playwright tests
* update widget screenshot
* Fix wrong snaps from using wrong compound version
* Revert mistaken s/checkbox/switch/
* lint lint
* Update headings
* fix snap
* remove unused
* update snapshot
* update tab screenshot
* Update snapshots
* Fix margins
* 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>
* Delint
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>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update snapshot
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update snapshot
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* Tweak rendering of icons in legacy video feed
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Remove unused classes
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Tweak rendering of icons in face pile
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Tweak rendering of icons in overflow tile
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Tweak rendering of icons in room search view
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Tweak rendering of icons in top unread messages bar
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Tweak rendering of icons in space basic settings
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Tweak rendering of icons in thread summary tile
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Tweak rendering of icons in legacy room tile
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Tweak rendering of icons in incoming call toast
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Tweak rendering of icons in labs jump to date
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Tweak rendering of icons in field validation
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update snapshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Tweak rendering of icons in mini avatar uploader
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Tweak rendering of icons in info tooltip
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Tweak rendering of icons in network dropdown
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix the topic update workflow
* Update room IDs with the new ones after upgrades
* Make room name variable more descriptive
* Fail if the topic doesn't match
* Return when failing
* Add option to pick call options for voice calls.
* hook on the right thing
* Fix wrong call being disabled
* update snaps
* Add tests for menus
* more snaps
* snap snap
(cherry picked from commit a352a3838e4b53bbe87423337dbe78a85e544deb)
Co-authored-by: Will Hunt <2072976+Half-Shot@users.noreply.github.com>
* Make ESLint's TS Root dir relative to .eslintrc.js
As per https://github.com/typescript-eslint/typescript-eslint/issues/251 seems
like this is the answer for having vscode not getting confused about
multiple projects in a monorepo with different tsconfigs.
* Add it here too for good measure
* Add option to pick call options for voice calls.
* hook on the right thing
* Fix wrong call being disabled
* update snaps
* Add tests for menus
* more snaps
* snap snap
* Upgrade module api package
* Add a wrapper component
So that we can render the decoration component with just the room.
* Implement module API method
* Add more tests
* 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.