* feat: Implement UI for history visibility acknowledgement.
Shows a banner above the message composer whenever a user opens a room
with non-join history visibility, which they can dismiss.
- Whenever a user opens an encrypted room with non-join history
visibility, show them a banner, unless we have already marked it as
dismissed.
- Whenever a user opens an encrypted room with joined history
visibility, we unmark it as dismissed.
Issue: https://github.com/element-hq/element-meta/issues/2875
* tests: Add test suite for `RoomStatusBarHistoryVisible`.
* docs: Document `RoomStatusBarHistoryVisible` and props interface.
* feat: Use newer `@vector-im/compound` components.
* test: Update snapshots for `RoomStatusBarHistoryVisible` tests.
* chore: Update playwright screenshots.
* feat: Move `RoomStatusBarHistoryVisible` to `shared-components`.
* fix: Address review comments on `RoomStatusBarHistoryVisible`.
* fix: Address review comments on `RoomStatusBar` and tests.
* chore: Move `RoomStatusBarHistoryVisible` to `room/RoomStatusBarHistoryVisible`
* chore: Fix linting issues.
* feat: Gate behind history visibility labs flag.
* feat: Add link to history sharing docs.
* fix: Resolve build issue with shared-components.
* tests: Enable history sharing lab for unit tests.
* tests: Set labs flag in SettingsStore mock.
* fix: Remove non-existent arg - documentation should be updated!
* chore: Remove old CSS rule filter.
* fix: Use package name for import over relative path.
* fix: Mark styles as important due to improper CSS load order.
* docs: Add doc comments to `!important` directives.
This change should restore my status as a good person.
* docs: Correct license header.
* tests: Update `RoomStatusBarHistoryVisible` snapshot.
* tests: Update shared history invite screenshot.
* tests: Revert spurious screenshot changes.
* feat: Update to use `Banner` component.
* chore: Remove broken import.
* chore: Remove unused translation string.
* tests: Add `getHistoryVisibility` to `currentState` of stub room.
* tests: Update screenshot.
* chore: Remove old snapshots.
* tests: Update playwright screenshot.
* feat: Separate `HistoryVisibleBanner` hooks into MVVM architecture.
* chore: Remove unused imports.
* feat: Use info link over action button for `HistoryVisibleBanner`
* tests: Update snapshot for `HistoryVisibleBanner`.
* chore: Remove unused imports.
* feat: Switch to MVVM architecture per style guide.
* tests: Update snapshot for `HistoryVisibleBanner`.
* tests: Update shared components snapshots.
* tests: Add unit tests for `HistoryVisibleBannerView` stories.
* fix: Linting errors from SonarCloud.
* feat: Finalise conversion to MVVM.
* fix: Silent `this` binding issue.
* tests: Update playwright snapshot.
* feat: Introduce wrapper component for `HistoryVisibleBanner`.
* tests: Update playwright screenshots for `HistoryVisibleBanner`.
* docs: Add doc comments to fields in `HistoryVisibleBannerViewModel`.
* tests: Update playwright snapshot.
* Update dependency is-ip to v5
* Fix import
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Make jest happier
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>
* Check default PL when setting a new PL in createRoom
* Drop custom PL setting for video rooms
* lint files
* Add room version test
* Cleanup test
* fix import
* Fix e2e icon rendering
Regressed by change to compound icons, due to it relying on a hack of rendering icons atop each other to draw a background.
Also fixes a nested tooltip which became annoying during testing
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>
* EventIndex: add some documentation
... because comments are not subject to rationing.
* EventIndex: rationalise addInitialCheckpoints logic
* EventIndex: improve logging
* use a single `logger` instance to do the prefixing
* use `JSON.stringify` on the checkpoints so that the rageshakes are useful
* distinguish between logger.warn and logger.debug
* emit some logs if the crawler loop fails
* Move check for empty database to `init`
The problem with checking if the database is empty in `onSync` is that, by the
time we get there, it won't be.
Instead let's remember if the db was empty in `init`, and then once a sync
completes, we can add the checkpoints.
* Some tests for EventIndexer
* 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>