Implement UI for history visibility acknowledgement.#31156
Implement UI for history visibility acknowledgement.#31156kaylendog merged 62 commits intoelement-hq:developfrom
Conversation
68ef636 to
27b11e4
Compare
|
I'm wondering if this would be better off as a floating alert above the UI - would conflict less with the identity reset dialog. |
|
@kaylendog this is a question for the design team. Where are the figma design for this banner? |
Here (for EW)! |
|
Opening this up for review, since I can't make any headway on the CI failures:
|
florianduros
left a comment
There was a problem hiding this comment.
Each components in shared component has its own folder. imo RoomStatusBarHistoryVisible should be in packages/shared-components/src/room/RoomStatusBarHistoryVisible.
The RoomStatusBarHistoryVisible is missing at least a render test and a check that onClose is correctly binded.
...ared-components/src/room/RoomStatusBarHistoryVisible/RoomStatusBarHistoryVisible.stories.tsx
Outdated
Show resolved
Hide resolved
packages/shared-components/src/structures/RoomStatusBarHistoryVisible.stories.tsx
Outdated
Show resolved
Hide resolved
packages/shared-components/src/structures/RoomStatusBarHistoryVisible.module.css
Outdated
Show resolved
Hide resolved
packages/shared-components/src/structures/RoomStatusBarHistoryVisible.tsx
Outdated
Show resolved
Hide resolved
packages/shared-components/src/structures/RoomStatusBarHistoryVisible.tsx
Outdated
Show resolved
Hide resolved
| return ( | ||
| <Tooltip open={isTooltipOpen} description={formatTimeLeft(secondsLeft)} placement="bottom"> | ||
| <div className={classes} ref={this.ref} role="region" aria-label={_t("a11y|message_composer")}> | ||
| <HistoryVisibleBannerView vm={new HistoryVisibleBannerViewModel({ room: this.props.room })} /> |
There was a problem hiding this comment.
At every render of the MessageComposer, the vm will be recreated. We want to avoid that.
You can:
- Create the vm in the message component (constructor/componentDidMount), put in the state, dispose the vm in componentWillUnMount
- Create a functional component where you create the vm with Introduce a hook to auto dispose view models #31178 and render the view
| private readonly featureWatcher: string; | ||
| private readonly acknowledgedWatcher: string; |
This reverts commit cff9119.
This reverts commit cff9119.
This reverts commit cff9119.
This reverts commit cff9119.
This reverts commit cff9119.
* Revert "Update algorithm for history visible banner. (#31577)" This reverts commit ce9c66b. * Revert "Update prop type & documentation for HistoryVisibleBanner and VM. (#31545)" This reverts commit 4da149e. * Revert "Prevent history visible banner from displaying in threads. (#31535)" This reverts commit c7134e8. * Revert "Implement UI for history visibility acknowledgement. (#31156)" This reverts commit cff9119.
Shows a banner above the message composer whenever a user opens a room with non-join history visibility, which they can dismiss.
Issue: element-hq/element-meta#2875
Checklist
public/exportedsymbols have accurate TSDoc documentation.