From 1fe0a64e91d8ab40075e69fa734160b687808e36 Mon Sep 17 00:00:00 2001 From: automated-signal <37887102+automated-signal@users.noreply.github.com> Date: Thu, 23 Jan 2025 14:42:05 -0600 Subject: [PATCH] Update conversation hero message Co-authored-by: trevor-signal <131492920+trevor-signal@users.noreply.github.com> --- _locales/en/messages.json | 2 +- stylesheets/components/ConversationHero.scss | 30 ------------------- .../conversation/ConversationHero.stories.tsx | 6 ---- .../conversation/ConversationHero.tsx | 7 ----- .../conversation/Timeline.stories.tsx | 1 - ts/state/selectors/items.ts | 5 ---- ts/state/smart/HeroRow.tsx | 3 -- ts/test-mock/messaging/reaction_test.ts | 4 +-- 8 files changed, 3 insertions(+), 55 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index b334db8961..e4c2c701f9 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -2118,7 +2118,7 @@ "description": "Header of the full-screen delete data confirmation screen" }, "icu:deleteAllDataBody": { - "messageformat": "Delete all data and messages from this version of Signal Desktop? You can always relink this desktop, but your messages will not restore. Your Signal account and data on your phone or other linked devices will not be deleted.", + "messageformat": "Delete all data and messages from this version of Signal Desktop? Your Signal account and data on your phone or other linked devices will not be deleted.", "description": "Text describing what exactly will happen if the user clicks the button to delete all data" }, "icu:deleteAllDataProgress": { diff --git a/stylesheets/components/ConversationHero.scss b/stylesheets/components/ConversationHero.scss index f19dda9729..1df007b883 100644 --- a/stylesheets/components/ConversationHero.scss +++ b/stylesheets/components/ConversationHero.scss @@ -194,34 +194,4 @@ } } } - - &__linkNotification { - @include mixins.font-body-2; - - margin-top: 12px; - text-align: center; - user-select: none; - - &::before { - content: ''; - display: inline-block; - height: 16px; - margin-inline-end: 8px; - vertical-align: middle; - width: 16px; - - @include mixins.light-theme { - @include mixins.color-svg( - '../images/icons/v3/info/info.svg', - variables.$color-gray-60 - ); - } - @include mixins.dark-theme { - @include mixins.color-svg( - '../images/icons/v3/info/info.svg', - variables.$color-gray-25 - ); - } - } - } } diff --git a/ts/components/conversation/ConversationHero.stories.tsx b/ts/components/conversation/ConversationHero.stories.tsx index 34f1a75a0b..7dde064137 100644 --- a/ts/components/conversation/ConversationHero.stories.tsx +++ b/ts/components/conversation/ConversationHero.stories.tsx @@ -27,7 +27,6 @@ export default { updateSharedGroups: action('updateSharedGroups'), viewUserStories: action('viewUserStories'), toggleAboutContactModal: action('toggleAboutContactModal'), - isRestoredFromBackup: false, }, } satisfies Meta; @@ -154,11 +153,6 @@ NoteToSelf.args = { isMe: true, }; -export const ImportedFromBackup = Template.bind({}); -ImportedFromBackup.args = { - isRestoredFromBackup: true, -}; - export const UnreadStories = Template.bind({}); UnreadStories.args = { hasStories: HasStories.Unread, diff --git a/ts/components/conversation/ConversationHero.tsx b/ts/components/conversation/ConversationHero.tsx index dd32112c29..b36131bfa5 100644 --- a/ts/components/conversation/ConversationHero.tsx +++ b/ts/components/conversation/ConversationHero.tsx @@ -27,7 +27,6 @@ export type Props = { i18n: LocalizerType; isMe: boolean; isSignalConversation?: boolean; - isRestoredFromBackup: boolean; membersCount?: number; phoneNumber?: string; sharedGroupNames?: ReadonlyArray; @@ -145,7 +144,6 @@ export function ConversationHero({ hasStories, id, isMe, - isRestoredFromBackup, isSignalConversation, membersCount, sharedGroupNames = [], @@ -278,11 +276,6 @@ export function ConversationHero({ phoneNumber, sharedGroupNames, })} - {!isSignalConversation && !isRestoredFromBackup && ( -
- {i18n('icu:messageHistoryUnsynced')} -
- )} {isShowingMessageRequestWarning && ( { id={getDefaultConversation().id} i18n={i18n} isMe={false} - isRestoredFromBackup={false} phoneNumber={getPhoneNumber()} profileName={getProfileName()} sharedGroupNames={['NYC Rock Climbers', 'Dinner Party']} diff --git a/ts/state/selectors/items.ts b/ts/state/selectors/items.ts index 31a57b7d3c..95d15daf9f 100644 --- a/ts/state/selectors/items.ts +++ b/ts/state/selectors/items.ts @@ -273,8 +273,3 @@ export const getBackupMediaDownloadProgress = createSelector( downloadBannerDismissed: state.backupMediaDownloadBannerDismissed ?? false, }) ); - -export const getIsRestoredFromBackup = createSelector( - getItems, - (state: ItemsStateType): boolean => state.isRestoredFromBackup === true -); diff --git a/ts/state/smart/HeroRow.tsx b/ts/state/smart/HeroRow.tsx index 640fe63b62..6803a568b3 100644 --- a/ts/state/smart/HeroRow.tsx +++ b/ts/state/smart/HeroRow.tsx @@ -8,7 +8,6 @@ import { getIntl, getTheme } from '../selectors/user'; import { getHasStoriesSelector } from '../selectors/stories2'; import { isSignalConversation } from '../../util/isSignalConversation'; import { getConversationSelector } from '../selectors/conversations'; -import { getIsRestoredFromBackup } from '../selectors/items'; import { useConversationsActions } from '../ducks/conversations'; import { useGlobalModalActions } from '../ducks/globalModals'; import { useStoriesActions } from '../ducks/stories'; @@ -25,7 +24,6 @@ export const SmartHeroRow = memo(function SmartHeroRow({ const getPreferredBadge = useSelector(getPreferredBadgeSelector); const hasStoriesSelector = useSelector(getHasStoriesSelector); const conversationSelector = useSelector(getConversationSelector); - const isRestoredFromBackup = useSelector(getIsRestoredFromBackup); const conversation = conversationSelector(id); if (conversation == null) { throw new Error(`Did not find conversation ${id} in state!`); @@ -62,7 +60,6 @@ export const SmartHeroRow = memo(function SmartHeroRow({ i18n={i18n} id={id} isMe={isMe} - isRestoredFromBackup={isRestoredFromBackup} isSignalConversation={isSignalConversationValue} membersCount={membersCount} phoneNumber={phoneNumber} diff --git a/ts/test-mock/messaging/reaction_test.ts b/ts/test-mock/messaging/reaction_test.ts index 6219bd21c7..c5cf4f7b46 100644 --- a/ts/test-mock/messaging/reaction_test.ts +++ b/ts/test-mock/messaging/reaction_test.ts @@ -46,8 +46,8 @@ async function getReactionsForMessage(page: Page, timestamp: number) { reactor, ]); } - // click away - await page.getByText("chat history isn't transferred").click(); + // dismiss reaction popup + await page.keyboard.press('Escape'); } catch { // pass }