Add Release announcement for the pinning message list (#46)
* Add RA for the pinning message list * Update RoomSummaryCard-test.tsx snapshot * Update RA labels
This commit is contained in:
@@ -72,6 +72,7 @@ import { Key } from "../../../Keyboard";
|
||||
import { useTransition } from "../../../hooks/useTransition";
|
||||
import { useIsVideoRoom } from "../../../utils/video-rooms";
|
||||
import { usePinnedEvents } from "../../../hooks/usePinnedEvents";
|
||||
import { ReleaseAnnouncement } from "../../structures/ReleaseAnnouncement.tsx";
|
||||
|
||||
interface IProps {
|
||||
room: Room;
|
||||
@@ -380,16 +381,25 @@ const RoomSummaryCard: React.FC<IProps> = ({
|
||||
|
||||
{!isVideoRoom && (
|
||||
<>
|
||||
<MenuItem
|
||||
Icon={PinIcon}
|
||||
label={_t("right_panel|pinned_messages_button")}
|
||||
onSelect={onRoomPinsClick}
|
||||
<ReleaseAnnouncement
|
||||
feature="pinningMessageList"
|
||||
header={_t("right_panel|pinned_messages|release_announcement|title")}
|
||||
description={_t("right_panel|pinned_messages|release_announcement|description")}
|
||||
closeLabel={_t("right_panel|pinned_messages|release_announcement|close")}
|
||||
placement="top"
|
||||
>
|
||||
<Text as="span" size="sm">
|
||||
{pinCount}
|
||||
</Text>
|
||||
</MenuItem>
|
||||
|
||||
<div>
|
||||
<MenuItem
|
||||
Icon={PinIcon}
|
||||
label={_t("right_panel|pinned_messages_button")}
|
||||
onSelect={onRoomPinsClick}
|
||||
>
|
||||
<Text as="span" size="sm">
|
||||
{pinCount}
|
||||
</Text>
|
||||
</MenuItem>
|
||||
</div>
|
||||
</ReleaseAnnouncement>
|
||||
<MenuItem Icon={FilesIcon} label={_t("right_panel|files_button")} onSelect={onRoomFilesClick} />
|
||||
</>
|
||||
)}
|
||||
|
||||
@@ -1853,6 +1853,11 @@
|
||||
"other": "You can only pin up to %(count)s widgets"
|
||||
},
|
||||
"menu": "Open menu",
|
||||
"release_announcement": {
|
||||
"close": "Ok",
|
||||
"description": "Find all pinned messages here. Rollover any message and select “Pin” to add it.",
|
||||
"title": "All new pinned messages"
|
||||
},
|
||||
"reply_thread": "Reply to a <link>thread message</link>",
|
||||
"title": "Pinned messages",
|
||||
"unpin_all": {
|
||||
|
||||
@@ -17,7 +17,7 @@ import { Features } from "../settings/Settings";
|
||||
/**
|
||||
* The features are shown in the array order.
|
||||
*/
|
||||
const FEATURES = ["threadsActivityCentre"] as const;
|
||||
const FEATURES = ["threadsActivityCentre", "pinningMessageList"] as const;
|
||||
/**
|
||||
* All the features that can be shown in the release announcements.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user