-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Implement UI for history visibility acknowledgement. #31156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
kaylendog
wants to merge
27
commits into
element-hq:develop
Choose a base branch
from
kaylendog:kaylendog/history-sharing/status
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+440
−12
Draft
Changes from 16 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
47ca834
feat: Implement UI for history visibility acknowledgement.
kaylendog efe05c7
tests: Add test suite for `RoomStatusBarHistoryVisible`.
kaylendog 568adbe
docs: Document `RoomStatusBarHistoryVisible` and props interface.
kaylendog 426c957
feat: Use newer `@vector-im/compound` components.
kaylendog a21f850
test: Update snapshots for `RoomStatusBarHistoryVisible` tests.
kaylendog 409d1eb
chore: Update playwright screenshots.
kaylendog a899629
feat: Move `RoomStatusBarHistoryVisible` to `shared-components`.
kaylendog 6a51c18
fix: Address review comments on `RoomStatusBarHistoryVisible`.
kaylendog a5fdc5b
fix: Address review comments on `RoomStatusBar` and tests.
kaylendog 7bc5d67
chore: Move `RoomStatusBarHistoryVisible` to `room/RoomStatusBarHisto…
kaylendog 636ecc9
chore: Fix linting issues.
kaylendog 4ae0b01
feat: Gate behind history visibility labs flag.
kaylendog 6d7bff7
feat: Add link to history sharing docs.
kaylendog a729c86
fix: Resolve build issue with shared-components.
kaylendog 30c41d1
tests: Enable history sharing lab for unit tests.
kaylendog 7444e3b
Merge remote-tracking branch 'upstream/develop' into kaylendog/histor…
kaylendog 6e49704
tests: Set labs flag in SettingsStore mock.
kaylendog 8620722
fix: Remove non-existent arg - documentation should be updated!
kaylendog ccec28f
chore: Remove old CSS rule filter.
kaylendog b8a54b9
fix: Use package name for import over relative path.
kaylendog bed81c3
fix: Mark styles as important due to improper CSS load order.
kaylendog bdc1067
docs: Add doc comments to `!important` directives.
kaylendog 746acc9
docs: Correct license header.
kaylendog f0377f8
tests: Update `RoomStatusBarHistoryVisible` snapshot.
kaylendog 90a0cab
Merge remote-tracking branch 'upstream/develop' into kaylendog/histor…
kaylendog 4e77fab
tests: Update shared history invite screenshot.
kaylendog 4c84126
tests: Revert spurious screenshot changes.
kaylendog File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
...ed-components/src/room/RoomStatusBarHistoryVisible/RoomStatusBarHistoryVisible.module.css
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| /* | ||
| * Copyright 2025 New Vector Ltd. | ||
| * | ||
| * SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial | ||
| * Please see LICENSE files in the repository root for full details. | ||
| */ | ||
|
|
||
| .historyVisibility { | ||
| border-radius: 0; | ||
| border-left: none; | ||
| border-right: none; | ||
| border-bottom: none; | ||
| } | ||
|
|
||
| .historyVisibilityButton { | ||
| white-space: nowrap; | ||
| } | ||
30 changes: 30 additions & 0 deletions
30
...d-components/src/room/RoomStatusBarHistoryVisible/RoomStatusBarHistoryVisible.stories.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| /* | ||
| * Copyright 2025 New Vector Ltd. | ||
| * | ||
| * SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial | ||
| * Please see LICENSE files in the repository root for full details. | ||
| */ | ||
|
|
||
| import { type Meta, type StoryObj } from "@storybook/react-vite"; | ||
| import { fn } from "storybook/test"; | ||
|
|
||
| import { RoomStatusBarHistoryVisible } from "./RoomStatusBarHistoryVisible"; | ||
|
|
||
| const meta = { | ||
kaylendog marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| title: "Structures/RoomStatusBarHistoryVisible", | ||
| component: RoomStatusBarHistoryVisible, | ||
| tags: ["autodocs"], | ||
| args: { | ||
| onClose: fn(), | ||
| }, | ||
| parameters: { | ||
| design: { | ||
| type: "figma", | ||
| url: "https://www.figma.com/design/96hBf15is3HCxTt3X7nnLW/ER-144--Encrypted-Room-History?node-id=1-62053&t=zFsl3I946nBW8qq0-4", | ||
| }, | ||
| }, | ||
| } satisfies Meta<typeof RoomStatusBarHistoryVisible>; | ||
|
|
||
| export default meta; | ||
| type Story = StoryObj<typeof meta>; | ||
| export const Default: Story = {}; | ||
56 changes: 56 additions & 0 deletions
56
...es/shared-components/src/room/RoomStatusBarHistoryVisible/RoomStatusBarHistoryVisible.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| /* | ||
| * Copyright 2025 New Vector Ltd. | ||
| * | ||
| * SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial | ||
| * Please see LICENSE files in the repository root for full details. | ||
| */ | ||
|
|
||
| import React, { type MouseEventHandler, type ReactElement } from "react"; | ||
| import { Alert, Button } from "@vector-im/compound-web"; | ||
|
|
||
| import styles from "./RoomStatusBarHistoryVisible.module.css"; | ||
| import { _t } from "../../utils/i18n"; | ||
|
|
||
| interface RoomStatusBarHistoryVisibleProps { | ||
| /** | ||
| * Called when the user presses the "dismiss" button. | ||
| */ | ||
| onClose: MouseEventHandler<HTMLButtonElement>; | ||
| } | ||
|
|
||
| /** | ||
| * A component to alert that history is shared to new members of the room. | ||
| * | ||
| * @example | ||
| * ```tsx | ||
| * <RoomStatusBarHistoryVisible onClose={onCloseHandler} /> | ||
| * ``` | ||
| */ | ||
| export function RoomStatusBarHistoryVisible(props: RoomStatusBarHistoryVisibleProps): ReactElement { | ||
| return ( | ||
| <Alert | ||
| className={styles.historyVisibility} | ||
| type="info" | ||
| title={_t("room|status_bar|history_visible")} | ||
| actions={ | ||
| <> | ||
| <Button | ||
| as="a" | ||
| href="https://element.io/en/help#e2ee-history-sharing" | ||
| target="_blank" | ||
| className={styles.historyVisibilityButton} | ||
| kind="tertiary" | ||
| size="sm" | ||
| > | ||
| {_t("action|learn_more")} | ||
| </Button> | ||
| <Button className={styles.historyVisibilityButton} kind="primary" size="sm" onClick={props.onClose}> | ||
| {_t("action|dismiss")} | ||
| </Button> | ||
| </> | ||
| } | ||
| > | ||
| {_t("room|status_bar|history_visible_description")} | ||
| </Alert> | ||
| ); | ||
| } |
8 changes: 8 additions & 0 deletions
8
packages/shared-components/src/room/RoomStatusBarHistoryVisible/index.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| /* | ||
| * Copyright 2025 New Vector Ltd. | ||
| * | ||
| * SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial | ||
| * Please see LICENSE files in the repository root for full details. | ||
| */ | ||
|
|
||
| export { RoomStatusBarHistoryVisible } from "./RoomStatusBarHistoryVisible"; |
Binary file modified
BIN
+4.39 KB
(110%)
...apshots/crypto/history-sharing.spec.ts/shared-history-invite-accepted-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-8.59 KB
(53%)
playwright/snapshots/crypto/toasts.spec.ts/key-storage-out-of-sync-toast-linux.png
kaylendog marked this conversation as resolved.
Show resolved
Hide resolved
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-14.1 KB
(41%)
...right/snapshots/file-upload/image-upload.spec.ts/image-upload-preview-linux.png
kaylendog marked this conversation as resolved.
Show resolved
Hide resolved
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.