Add a banner to encrypted rooms with visible history. (#4851)

* Add a banner to encrypted rooms with visible history. (#4738)

* feat: Add history visible alert.

- Adds a dismissable alert that is displayed whenever the user
  opens a room with `history_visibility` != `joined`. When cleared,
  this is recorded in the app's data store.
- When opening a room with `history_visibility` = `joined`, this
  flag is cleared.

Issue: element-hq/element-meta#2875

* tests: Add unit tests for history sharing in `RoomScreenFooterView`.

* feat: Rename flag to `hasSeenHistoryVisibleBannerRooms`, document.

* refactor: Merge enum variants, use function for banner description.

* feat: Use `AppSettings.historyVisibleDetailsURL` over hard-coded value.

* tests: Correct potential race condition with deferred assertion.

* chore: Use Localazy translation string over project-defined.

* fix: Final tweaks and review comments.

* chore: Checkout `Enterprise` submodule.

* tests: Final fixes.

* fix: Condition banner visibility on feature flag state.

* fix: Prioritise identity violations over history visibility banner.

* tests: Add snapshots for history visible banner.

* tests: Use deferred failure timeout for improved test power.

* chore: Tweaks to spelling, simplify state logic.

* fix: Remove "g".

* fix: Show banner for shared/world-readable rooms, not invited.

* refactor: Use `else-if` instead of `if`.
This commit is contained in:
Skye Elliot
2025-12-19 15:26:45 +00:00
committed by GitHub
parent 88cd816392
commit 6153480d90
9 changed files with 297 additions and 9 deletions
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:79e30c512ac42d208dc253b969812b6d3f2d85be8676befde4dc67d8287aeebc
size 150023
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ce717389949a6c0d853d27fdecbfc09b80dc239eae801c89ea1b0ba338bf6a61
size 176311
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ef89b3e0c89f13371380a6f38e350c1b885c79a7c07b6fd215d7c56dbb71f6ef
size 78568
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:09b99546030959ee3a87cda4dfda37b43bc537f7eb22725c4057c68f4a0d8ab9
size 109019