From df31a8d0d6cd34944cf5bf9fb394c1ea7d1b1560 Mon Sep 17 00:00:00 2001 From: Emil Abramov Date: Thu, 13 Nov 2025 18:44:16 +0100 Subject: [PATCH 01/51] feat: filters as tabs pt. 1 --- src/i18n/en-US.json | 10 ++++ .../ConversationSidebar.tsx | 6 ++ .../ConversationTabs/ConversationTabs.tsx | 49 +++++++++++++++ .../panels/Conversations/Conversations.tsx | 7 +++ .../panels/Conversations/helpers.tsx | 59 +++++++++++++++++++ .../panels/Conversations/useSidebarStore.ts | 5 ++ .../panels/Conversations/utils/draftUtils.ts | 12 +++- src/types/i18n.d.ts | 14 ++++- 8 files changed, 158 insertions(+), 4 deletions(-) diff --git a/src/i18n/en-US.json b/src/i18n/en-US.json index b4b5dbc0845..b5fc83d24e8 100644 --- a/src/i18n/en-US.json +++ b/src/i18n/en-US.json @@ -736,9 +736,14 @@ "conversationJustNow": "Just now", "conversationLabelChannels": "Channels", "conversationLabelDirects": "1:1 Conversations", + "conversationLabelDrafts": "Drafts", "conversationLabelFavorites": "Favorites", "conversationLabelGroups": "Groups", + "conversationLabelMentions": "Mentions", "conversationLabelPeople": "People", + "conversationLabelPings": "Pings", + "conversationLabelReplies": "Replies", + "conversationLabelUnread": "Unread", "conversationLearnMoreChannels": "Learn more about channels", "conversationLikesCaptionPlural": "[bold]{firstUser}[/bold] and [bold]{secondUser}[/bold]", "conversationLikesCaptionPluralMoreThan2": "[bold]{userNames}[/bold] and [showmore]{number} more[/showmore]", @@ -1746,6 +1751,11 @@ "searchConversations": "Search conversations", "searchConversationsNoResult": "No results found", "searchConversationsNoResultConnectSuggestion": "Connect with new users or start a new conversation", + "searchDraftsConversations": "Search in drafts", + "searchMentionsConversations": "Search in mentions", + "searchPingsConversations": "Search in pings", + "searchRepliesConversations": "Search in replies", + "searchUnreadConversations": "Search in unread", "searchCreateGroup": "Create group", "searchCreateGuestRoom": "Create guest room", "searchDirectConversations": "Search 1:1 conversations", diff --git a/src/script/page/LeftSidebar/panels/Conversations/ConversationSidebar/ConversationSidebar.tsx b/src/script/page/LeftSidebar/panels/Conversations/ConversationSidebar/ConversationSidebar.tsx index b73ce2214a3..e84c8c41815 100644 --- a/src/script/page/LeftSidebar/panels/Conversations/ConversationSidebar/ConversationSidebar.tsx +++ b/src/script/page/LeftSidebar/panels/Conversations/ConversationSidebar/ConversationSidebar.tsx @@ -45,12 +45,14 @@ type ConversationSidebarProps = { isTeam: boolean; changeTab: (nextTab: SidebarTabs, folderId?: string) => void; currentTab: SidebarTabs; + conversations: Conversation[]; groupConversations: Conversation[]; channelConversations: Conversation[]; directConversations: Conversation[]; unreadConversations: Conversation[]; favoriteConversations: Conversation[]; archivedConversations: Conversation[]; + draftConversations: Conversation[]; conversationRepository: ConversationRepository; onClickPreferences: (contentState: ContentState) => void; showNotificationsBadge: boolean; @@ -65,11 +67,13 @@ export const ConversationSidebar = ({ isTeam, changeTab, currentTab, + conversations, groupConversations, directConversations, unreadConversations, favoriteConversations, archivedConversations, + draftConversations, conversationRepository, onClickPreferences, showNotificationsBadge, @@ -88,11 +92,13 @@ export const ConversationSidebar = ({ void; currentTab: SidebarTabs; @@ -78,12 +80,14 @@ interface ConversationTabsProps { } export const ConversationTabs = ({ + conversations, unreadConversations, favoriteConversations, archivedConversations, groupConversations, conversationRepository, directConversations, + draftConversations, onChangeTab, currentTab, onClickPreferences, @@ -116,6 +120,16 @@ export const ConversationTabs = ({ const channelConversationsLength = channelConversations.filter(filterUnreadAndArchivedConversations).length; const groupConversationsLength = groupConversations.filter(filterUnreadAndArchivedConversations).length; + const unreadCount = conversations.filter(conv => !conv.is_archived() && conv.hasUnread()).length; + const mentionsCount = conversations.filter( + conv => !conv.is_archived() && conv.unreadState().selfMentions.length > 0, + ).length; + const repliesCount = conversations.filter( + conv => !conv.is_archived() && conv.unreadState().selfReplies.length > 0, + ).length; + const draftsCount = draftConversations.filter(conv => !conv.is_archived()).length; + const pingsCount = conversations.filter(conv => !conv.is_archived() && conv.unreadState().pings.length > 0).length; + const conversationTabs = [ { type: SidebarTabs.RECENT, @@ -147,6 +161,41 @@ export const ConversationTabs = ({ Icon: , unreadConversations: directConversations.filter(filterUnreadAndArchivedConversations).length, }, + { + type: SidebarTabs.UNREAD, + title: t('conversationLabelUnread'), + dataUieName: 'go-unread-view', + Icon: , + unreadConversations: unreadCount, + }, + { + type: SidebarTabs.MENTIONS, + title: t('conversationLabelMentions'), + dataUieName: 'go-mentions-view', + Icon: , + unreadConversations: mentionsCount, + }, + { + type: SidebarTabs.REPLIES, + title: t('conversationLabelReplies'), + dataUieName: 'go-replies-view', + Icon: , + unreadConversations: repliesCount, + }, + { + type: SidebarTabs.DRAFTS, + title: t('conversationLabelDrafts'), + dataUieName: 'go-drafts-view', + Icon: , + unreadConversations: draftsCount, + }, + { + type: SidebarTabs.PINGS, + title: t('conversationLabelPings'), + dataUieName: 'go-pings-view', + Icon: , + unreadConversations: pingsCount, + }, { type: SidebarTabs.FOLDER, title: t('folderViewTooltip'), diff --git a/src/script/page/LeftSidebar/panels/Conversations/Conversations.tsx b/src/script/page/LeftSidebar/panels/Conversations/Conversations.tsx index fd1d3e7a095..b12c2e38918 100644 --- a/src/script/page/LeftSidebar/panels/Conversations/Conversations.tsx +++ b/src/script/page/LeftSidebar/panels/Conversations/Conversations.tsx @@ -159,6 +159,11 @@ export const Conversations = ({ SidebarTabs.GROUPS, SidebarTabs.CHANNELS, SidebarTabs.DIRECTS, + SidebarTabs.UNREAD, + SidebarTabs.MENTIONS, + SidebarTabs.REPLIES, + SidebarTabs.DRAFTS, + SidebarTabs.PINGS, SidebarTabs.ARCHIVES, ].includes(currentTab); @@ -390,11 +395,13 @@ export const Conversations = ({ isTeam={isTeam} changeTab={changeTab} currentTab={currentTab} + conversations={conversations} groupConversations={groupConversations} directConversations={directConversations} unreadConversations={unreadConversations} favoriteConversations={favoriteConversations} archivedConversations={archivedConversations} + draftConversations={draftConversations} conversationRepository={conversationRepository} onClickPreferences={onClickPreferences} showNotificationsBadge={notifications.length > 0} diff --git a/src/script/page/LeftSidebar/panels/Conversations/helpers.tsx b/src/script/page/LeftSidebar/panels/Conversations/helpers.tsx index f08d2447370..bac52f46f6a 100644 --- a/src/script/page/LeftSidebar/panels/Conversations/helpers.tsx +++ b/src/script/page/LeftSidebar/panels/Conversations/helpers.tsx @@ -169,6 +169,65 @@ export function getTabConversations({ }; } + if (currentTab === SidebarTabs.UNREAD) { + const filteredConversations = conversations + .filter(conversationArchivedFilter) + .filter(conv => conv.hasUnread()) + .filter(conversationSearchFilter); + + return { + conversations: filteredConversations, + searchInputPlaceholder: t('searchUnreadConversations'), + }; + } + + if (currentTab === SidebarTabs.MENTIONS) { + const filteredConversations = conversations + .filter(conversationArchivedFilter) + .filter(conv => conv.unreadState().selfMentions.length > 0) + .filter(conversationSearchFilter); + + return { + conversations: filteredConversations, + searchInputPlaceholder: t('searchMentionsConversations'), + }; + } + + if (currentTab === SidebarTabs.REPLIES) { + const filteredConversations = conversations + .filter(conversationArchivedFilter) + .filter(conv => conv.unreadState().selfReplies.length > 0) + .filter(conversationSearchFilter); + + return { + conversations: filteredConversations, + searchInputPlaceholder: t('searchRepliesConversations'), + }; + } + + if (currentTab === SidebarTabs.DRAFTS) { + const filteredConversations = draftConversations + .filter(conversationArchivedFilter) + .filter(conversationSearchFilter); + + return { + conversations: filteredConversations, + searchInputPlaceholder: t('searchDraftsConversations'), + }; + } + + if (currentTab === SidebarTabs.PINGS) { + const filteredConversations = conversations + .filter(conversationArchivedFilter) + .filter(conv => conv.unreadState().pings.length > 0) + .filter(conversationSearchFilter); + + return { + conversations: filteredConversations, + searchInputPlaceholder: t('searchPingsConversations'), + }; + } + return { conversations: [], searchInputPlaceholder: '', diff --git a/src/script/page/LeftSidebar/panels/Conversations/useSidebarStore.ts b/src/script/page/LeftSidebar/panels/Conversations/useSidebarStore.ts index 9c87fe4f3ae..dbd56f29eb9 100644 --- a/src/script/page/LeftSidebar/panels/Conversations/useSidebarStore.ts +++ b/src/script/page/LeftSidebar/panels/Conversations/useSidebarStore.ts @@ -27,6 +27,11 @@ export enum SidebarTabs { GROUPS, CHANNELS, DIRECTS, + UNREAD, + MENTIONS, + REPLIES, + DRAFTS, + PINGS, ARCHIVES, CONNECT, PREFERENCES, diff --git a/src/script/page/LeftSidebar/panels/Conversations/utils/draftUtils.ts b/src/script/page/LeftSidebar/panels/Conversations/utils/draftUtils.ts index fd07fcccc28..fd577b4ffe5 100644 --- a/src/script/page/LeftSidebar/panels/Conversations/utils/draftUtils.ts +++ b/src/script/page/LeftSidebar/panels/Conversations/utils/draftUtils.ts @@ -51,8 +51,16 @@ export const conversationHasDraft = (conversation: Conversation): boolean => { const amplifyData: AmplifyWrapper | DraftData = JSON.parse(draftData); // Amplify wraps the data in an object with 'data' and 'expires' properties const draft = (amplifyData as AmplifyWrapper).data || (amplifyData as DraftData); - // Check if draft has content (editorState or plainMessage) - return Boolean(draft && (draft.editorState || draft.plainMessage)); + + if (!draft) { + return false; + } + + // Check if plainMessage has actual content (not just whitespace) + const plainMessage = draft.plainMessage || ''; + const hasTextContent = plainMessage.trim().length > 0; + + return hasTextContent; } catch (error) { // Only log error type, not the actual error to avoid exposing draft content logger.warn( diff --git a/src/types/i18n.d.ts b/src/types/i18n.d.ts index 85a09eb95cf..b66616b1d4a 100644 --- a/src/types/i18n.d.ts +++ b/src/types/i18n.d.ts @@ -584,6 +584,7 @@ declare module 'I18n/en-US.json' { 'conversationAudioAssetUploadFailed': `Upload failed: {name}`; 'conversationAudioAssetUploading': `Uploading: {name}`; 'conversationButtonSeparator': `or`; + 'conversationCellsConversationEnabled': `File collaboration (Cells beta) is on`; 'conversationClassified': `Security level: VS-NfD`; 'conversationCommonFeature1': `Up to [bold]{capacity}[/bold] people`; 'conversationCommonFeature2': `Video conferencing`; @@ -602,7 +603,6 @@ declare module 'I18n/en-US.json' { 'conversationContextMenuLike': `Like`; 'conversationContextMenuReply': `Reply`; 'conversationContextMenuUnlike': `Unlike`; - 'conversationCellsConversationEnabled': `File collaboration (Cells beta) is on`; 'conversationCreateReceiptsEnabled': `Read receipts are on`; 'conversationCreateTeam': `with [showmore]all team members[/showmore]`; 'conversationCreateTeamGuest': `with [showmore]all team members and one guest[/showmore]`; @@ -625,8 +625,8 @@ declare module 'I18n/en-US.json' { 'conversationDetailsActionArchive': `Archive`; 'conversationDetailsActionBlock': `Block`; 'conversationDetailsActionCancelRequest': `Cancel request`; - 'conversationDetailsActionCellsTitle': `File collaboration (Cells beta version) is on`; 'conversationDetailsActionCellsOption': `Permanently on for this conversation.`; + 'conversationDetailsActionCellsTitle': `File collaboration (Cells beta version) is on`; 'conversationDetailsActionClear': `Clear content`; 'conversationDetailsActionConversationParticipants': `Show all ({number})`; 'conversationDetailsActionCreateGroup': `Create group`; @@ -740,9 +740,14 @@ declare module 'I18n/en-US.json' { 'conversationJustNow': `Just now`; 'conversationLabelChannels': `Channels`; 'conversationLabelDirects': `1:1 Conversations`; + 'conversationLabelDrafts': `Drafts`; 'conversationLabelFavorites': `Favorites`; 'conversationLabelGroups': `Groups`; + 'conversationLabelMentions': `Mentions`; 'conversationLabelPeople': `People`; + 'conversationLabelPings': `Pings`; + 'conversationLabelReplies': `Replies`; + 'conversationLabelUnread': `Unread`; 'conversationLearnMoreChannels': `Learn more about channels`; 'conversationLikesCaptionPlural': `[bold]{firstUser}[/bold] and [bold]{secondUser}[/bold]`; 'conversationLikesCaptionPluralMoreThan2': `[bold]{userNames}[/bold] and [showmore]{number} more[/showmore]`; @@ -1750,6 +1755,11 @@ declare module 'I18n/en-US.json' { 'searchConversations': `Search conversations`; 'searchConversationsNoResult': `No results found`; 'searchConversationsNoResultConnectSuggestion': `Connect with new users or start a new conversation`; + 'searchDraftsConversations': `Search in drafts`; + 'searchMentionsConversations': `Search in mentions`; + 'searchPingsConversations': `Search in pings`; + 'searchRepliesConversations': `Search in replies`; + 'searchUnreadConversations': `Search in unread`; 'searchCreateGroup': `Create group`; 'searchCreateGuestRoom': `Create guest room`; 'searchDirectConversations': `Search 1:1 conversations`; From 477b9f54b1d428cb55c684578e4e541119691c5b Mon Sep 17 00:00:00 2001 From: Emil Abramov Date: Thu, 13 Nov 2025 18:49:46 +0100 Subject: [PATCH 02/51] feat: only filter unread conversations instead all of them... --- .../ConversationTabs/ConversationTabs.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/script/page/LeftSidebar/panels/Conversations/ConversationTabs/ConversationTabs.tsx b/src/script/page/LeftSidebar/panels/Conversations/ConversationTabs/ConversationTabs.tsx index ba5cd9870e3..92727cb7d78 100644 --- a/src/script/page/LeftSidebar/panels/Conversations/ConversationTabs/ConversationTabs.tsx +++ b/src/script/page/LeftSidebar/panels/Conversations/ConversationTabs/ConversationTabs.tsx @@ -120,15 +120,17 @@ export const ConversationTabs = ({ const channelConversationsLength = channelConversations.filter(filterUnreadAndArchivedConversations).length; const groupConversationsLength = groupConversations.filter(filterUnreadAndArchivedConversations).length; - const unreadCount = conversations.filter(conv => !conv.is_archived() && conv.hasUnread()).length; - const mentionsCount = conversations.filter( + const unreadCount = unreadConversations.filter(conv => !conv.is_archived()).length; + const mentionsCount = unreadConversations.filter( conv => !conv.is_archived() && conv.unreadState().selfMentions.length > 0, ).length; - const repliesCount = conversations.filter( + const repliesCount = unreadConversations.filter( conv => !conv.is_archived() && conv.unreadState().selfReplies.length > 0, ).length; const draftsCount = draftConversations.filter(conv => !conv.is_archived()).length; - const pingsCount = conversations.filter(conv => !conv.is_archived() && conv.unreadState().pings.length > 0).length; + const pingsCount = unreadConversations.filter( + conv => !conv.is_archived() && conv.unreadState().pings.length > 0, + ).length; const conversationTabs = [ { From 1595ca56b560ef054f0bd6a8945e763a15d2a54b Mon Sep 17 00:00:00 2001 From: Emil Abramov Date: Thu, 13 Nov 2025 19:08:52 +0100 Subject: [PATCH 03/51] fix: wrong icon? --- .../panels/Conversations/ConversationTabs/ConversationTabs.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/script/page/LeftSidebar/panels/Conversations/ConversationTabs/ConversationTabs.tsx b/src/script/page/LeftSidebar/panels/Conversations/ConversationTabs/ConversationTabs.tsx index 92727cb7d78..cb74ce7de4c 100644 --- a/src/script/page/LeftSidebar/panels/Conversations/ConversationTabs/ConversationTabs.tsx +++ b/src/script/page/LeftSidebar/panels/Conversations/ConversationTabs/ConversationTabs.tsx @@ -167,7 +167,7 @@ export const ConversationTabs = ({ type: SidebarTabs.UNREAD, title: t('conversationLabelUnread'), dataUieName: 'go-unread-view', - Icon: , + Icon: , unreadConversations: unreadCount, }, { From 72bc1807a35fa140a7d8ec4b06b4777760c43a28 Mon Sep 17 00:00:00 2001 From: Emil Abramov Date: Thu, 13 Nov 2025 22:10:24 +0100 Subject: [PATCH 04/51] feat(tabs): removed previous conversationFilter, replaced with tabs preferences selector, removed old translation keys --- src/i18n/ar-SA.json | 7 - src/i18n/bn-BD.json | 7 - src/i18n/bs-BA.json | 7 - src/i18n/ca-ES.json | 7 - src/i18n/cs-CZ.json | 7 - src/i18n/da-DK.json | 7 - src/i18n/de-DE.json | 7 - src/i18n/el-CY.json | 7 - src/i18n/el-GR.json | 7 - src/i18n/en-US.json | 8 +- src/i18n/es-ES.json | 7 - src/i18n/et-EE.json | 7 - src/i18n/fa-IR.json | 7 - src/i18n/fi-FI.json | 7 - src/i18n/fr-FR.json | 7 - src/i18n/ga-IE.json | 7 - src/i18n/he-IL.json | 7 - src/i18n/hi-IN.json | 7 - src/i18n/hr-HR.json | 7 - src/i18n/hu-HU.json | 7 - src/i18n/id-ID.json | 7 - src/i18n/is-IS.json | 7 - src/i18n/it-IT.json | 7 - src/i18n/ja-JP.json | 7 - src/i18n/lb-LU.json | 7 - src/i18n/lt-LT.json | 7 - src/i18n/lv-LV.json | 7 - src/i18n/me-ME.json | 7 - src/i18n/mk-MK.json | 7 - src/i18n/ms-MY.json | 7 - src/i18n/mt-MT.json | 7 - src/i18n/nl-NL.json | 7 - src/i18n/no-NO.json | 7 - src/i18n/pl-PL.json | 7 - src/i18n/pt-BR.json | 7 - src/i18n/pt-PT.json | 7 - src/i18n/ro-RO.json | 7 - src/i18n/ru-RU.json | 7 - src/i18n/si-LK.json | 7 - src/i18n/sk-SK.json | 7 - src/i18n/sl-SI.json | 7 - src/i18n/sq-AL.json | 7 - src/i18n/sr-Cyrl-ME.json | 7 - src/i18n/sr-SP.json | 7 - src/i18n/sv-SE.json | 7 - src/i18n/th-TH.json | 7 - src/i18n/tr-CY.json | 7 - src/i18n/tr-TR.json | 7 - src/i18n/uk-UA.json | 7 - src/i18n/uz-UZ.json | 7 - src/i18n/vi-VN.json | 7 - src/i18n/zh-CN.json | 7 - src/i18n/zh-HK.json | 7 - src/i18n/zh-TW.json | 7 - .../ConversationFilterButton.tsx | 111 ---------------- .../ConversationTabs/ConversationTabs.tsx | 15 ++- .../panels/Conversations/Conversations.tsx | 2 - .../panels/Conversations/Helpers.test.tsx | 5 +- .../TabsFilterButton.styles.ts} | 34 ++--- .../TabsFilterButton/TabsFilterButton.tsx | 120 ++++++++++++++++++ .../index.ts | 2 +- .../panels/Conversations/helpers.tsx | 45 ++----- .../panels/Conversations/useSidebarStore.ts | 52 ++++++-- src/types/i18n.d.ts | 8 +- 64 files changed, 193 insertions(+), 580 deletions(-) delete mode 100644 src/script/page/LeftSidebar/panels/Conversations/ConversationFilterButton/ConversationFilterButton.tsx rename src/script/page/LeftSidebar/panels/Conversations/{ConversationFilterButton/ConversationFilterButton.styles.ts => TabsFilterButton/TabsFilterButton.styles.ts} (71%) create mode 100644 src/script/page/LeftSidebar/panels/Conversations/TabsFilterButton/TabsFilterButton.tsx rename src/script/page/LeftSidebar/panels/Conversations/{ConversationFilterButton => TabsFilterButton}/index.ts (92%) diff --git a/src/i18n/ar-SA.json b/src/i18n/ar-SA.json index 592bdda5129..8cff32f7e14 100644 --- a/src/i18n/ar-SA.json +++ b/src/i18n/ar-SA.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/bn-BD.json b/src/i18n/bn-BD.json index b4b5dbc0845..edfb1e2f011 100644 --- a/src/i18n/bn-BD.json +++ b/src/i18n/bn-BD.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/bs-BA.json b/src/i18n/bs-BA.json index b4b5dbc0845..edfb1e2f011 100644 --- a/src/i18n/bs-BA.json +++ b/src/i18n/bs-BA.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/ca-ES.json b/src/i18n/ca-ES.json index b4b5dbc0845..edfb1e2f011 100644 --- a/src/i18n/ca-ES.json +++ b/src/i18n/ca-ES.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/cs-CZ.json b/src/i18n/cs-CZ.json index f8ddb2de614..78910a239cf 100644 --- a/src/i18n/cs-CZ.json +++ b/src/i18n/cs-CZ.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/da-DK.json b/src/i18n/da-DK.json index 2a910b391e7..0c6712b7843 100644 --- a/src/i18n/da-DK.json +++ b/src/i18n/da-DK.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/de-DE.json b/src/i18n/de-DE.json index b914c46479f..83cf6bc62b0 100644 --- a/src/i18n/de-DE.json +++ b/src/i18n/de-DE.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag and Drop nutzen, um Dateien hinzuzufügen", "conversationFileUploadOverlayTitle": "Dateien hochladen", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Entwürfe", - "conversationFilterMentions": "Erwähnungen", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Antworten", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Ungelesen", "conversationFoldersEmptyText": "Fügen Sie Ihre Unterhaltungen Ordnern hinzu, um organisiert zu bleiben.", "conversationFoldersEmptyTextLearnMore": "Mehr erfahren", "conversationFooterArchive": "Archiv", diff --git a/src/i18n/el-CY.json b/src/i18n/el-CY.json index b4b5dbc0845..edfb1e2f011 100644 --- a/src/i18n/el-CY.json +++ b/src/i18n/el-CY.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/el-GR.json b/src/i18n/el-GR.json index 4e3b37c001c..7d07235c1e6 100644 --- a/src/i18n/el-GR.json +++ b/src/i18n/el-GR.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/en-US.json b/src/i18n/en-US.json index b5fc83d24e8..548c9b3d64e 100644 --- a/src/i18n/en-US.json +++ b/src/i18n/en-US.json @@ -679,13 +679,7 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", + "tabsFilterTooltip": "Customize visible tabs", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/es-ES.json b/src/i18n/es-ES.json index d8d9c30be17..aa877fae0c0 100644 --- a/src/i18n/es-ES.json +++ b/src/i18n/es-ES.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/et-EE.json b/src/i18n/et-EE.json index 8313360ad43..55dd999c749 100644 --- a/src/i18n/et-EE.json +++ b/src/i18n/et-EE.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/fa-IR.json b/src/i18n/fa-IR.json index c7a829698ba..9c08bef12b5 100644 --- a/src/i18n/fa-IR.json +++ b/src/i18n/fa-IR.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/fi-FI.json b/src/i18n/fi-FI.json index fcc75f2c0e2..bd2b7e483fd 100644 --- a/src/i18n/fi-FI.json +++ b/src/i18n/fi-FI.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/fr-FR.json b/src/i18n/fr-FR.json index d4c226a1eee..7d5a36603f5 100644 --- a/src/i18n/fr-FR.json +++ b/src/i18n/fr-FR.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Ajoutez vos conversations à des dossiers pour rester organisé.", "conversationFoldersEmptyTextLearnMore": "En savoir plus", "conversationFooterArchive": "Archiver", diff --git a/src/i18n/ga-IE.json b/src/i18n/ga-IE.json index b4b5dbc0845..edfb1e2f011 100644 --- a/src/i18n/ga-IE.json +++ b/src/i18n/ga-IE.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/he-IL.json b/src/i18n/he-IL.json index b4b5dbc0845..edfb1e2f011 100644 --- a/src/i18n/he-IL.json +++ b/src/i18n/he-IL.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/hi-IN.json b/src/i18n/hi-IN.json index 7e457308bec..6b99136dbf9 100644 --- a/src/i18n/hi-IN.json +++ b/src/i18n/hi-IN.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/hr-HR.json b/src/i18n/hr-HR.json index 10c85da5d7e..8d3fc9148bc 100644 --- a/src/i18n/hr-HR.json +++ b/src/i18n/hr-HR.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/hu-HU.json b/src/i18n/hu-HU.json index 4597081c910..9b61cabf69c 100644 --- a/src/i18n/hu-HU.json +++ b/src/i18n/hu-HU.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/id-ID.json b/src/i18n/id-ID.json index 8dc57ac640b..e33b31cfe34 100644 --- a/src/i18n/id-ID.json +++ b/src/i18n/id-ID.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/is-IS.json b/src/i18n/is-IS.json index b4b5dbc0845..edfb1e2f011 100644 --- a/src/i18n/is-IS.json +++ b/src/i18n/is-IS.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/it-IT.json b/src/i18n/it-IT.json index 7029fca85b9..e6225a1aca5 100644 --- a/src/i18n/it-IT.json +++ b/src/i18n/it-IT.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/ja-JP.json b/src/i18n/ja-JP.json index 016d2c3425e..bfa1e150de4 100644 --- a/src/i18n/ja-JP.json +++ b/src/i18n/ja-JP.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/lb-LU.json b/src/i18n/lb-LU.json index b4b5dbc0845..edfb1e2f011 100644 --- a/src/i18n/lb-LU.json +++ b/src/i18n/lb-LU.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/lt-LT.json b/src/i18n/lt-LT.json index d43855d6efa..d628458e089 100644 --- a/src/i18n/lt-LT.json +++ b/src/i18n/lt-LT.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/lv-LV.json b/src/i18n/lv-LV.json index 27b1ed53fe1..3c469cfbbdb 100644 --- a/src/i18n/lv-LV.json +++ b/src/i18n/lv-LV.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/me-ME.json b/src/i18n/me-ME.json index b4b5dbc0845..edfb1e2f011 100644 --- a/src/i18n/me-ME.json +++ b/src/i18n/me-ME.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/mk-MK.json b/src/i18n/mk-MK.json index b4b5dbc0845..edfb1e2f011 100644 --- a/src/i18n/mk-MK.json +++ b/src/i18n/mk-MK.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/ms-MY.json b/src/i18n/ms-MY.json index b4b5dbc0845..edfb1e2f011 100644 --- a/src/i18n/ms-MY.json +++ b/src/i18n/ms-MY.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/mt-MT.json b/src/i18n/mt-MT.json index b4b5dbc0845..edfb1e2f011 100644 --- a/src/i18n/mt-MT.json +++ b/src/i18n/mt-MT.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/nl-NL.json b/src/i18n/nl-NL.json index e129c2a9641..d50fa037b4d 100644 --- a/src/i18n/nl-NL.json +++ b/src/i18n/nl-NL.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/no-NO.json b/src/i18n/no-NO.json index 44470aa22d7..ddaa2a6a4f2 100644 --- a/src/i18n/no-NO.json +++ b/src/i18n/no-NO.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/pl-PL.json b/src/i18n/pl-PL.json index 1823639320a..5aa9800dc21 100644 --- a/src/i18n/pl-PL.json +++ b/src/i18n/pl-PL.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/pt-BR.json b/src/i18n/pt-BR.json index 74735283565..62102c85f2f 100644 --- a/src/i18n/pt-BR.json +++ b/src/i18n/pt-BR.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Arquivar", diff --git a/src/i18n/pt-PT.json b/src/i18n/pt-PT.json index 384db7e8ffd..874fffc014d 100644 --- a/src/i18n/pt-PT.json +++ b/src/i18n/pt-PT.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/ro-RO.json b/src/i18n/ro-RO.json index ad05878cbfd..e63a7937e17 100644 --- a/src/i18n/ro-RO.json +++ b/src/i18n/ro-RO.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/ru-RU.json b/src/i18n/ru-RU.json index 14a31508892..c3fd4e955cd 100644 --- a/src/i18n/ru-RU.json +++ b/src/i18n/ru-RU.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Перетаскивайте и добавляйте файлы", "conversationFileUploadOverlayTitle": "Загрузить файлы", "conversationFileVideoPreviewLabel": "Предпросмотр видео для: {src}", - "conversationFilterDrafts": "Черновики", - "conversationFilterMentions": "Упоминания", - "conversationFilterNone": "Без фильтра", - "conversationFilterPings": "Пинги", - "conversationFilterReplies": "Ответы", - "conversationFilterTooltip": "Отфильтровать беседы", - "conversationFilterUnread": "Непрочитано", "conversationFoldersEmptyText": "Добавляйте беседы в папки, чтобы сохранять их упорядоченность.", "conversationFoldersEmptyTextLearnMore": "Подробнее", "conversationFooterArchive": "Архив", diff --git a/src/i18n/si-LK.json b/src/i18n/si-LK.json index 512f7e45e21..db351ab8adf 100644 --- a/src/i18n/si-LK.json +++ b/src/i18n/si-LK.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "සංරක්‍ෂණය", diff --git a/src/i18n/sk-SK.json b/src/i18n/sk-SK.json index c09d050b782..8954efa40dd 100644 --- a/src/i18n/sk-SK.json +++ b/src/i18n/sk-SK.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/sl-SI.json b/src/i18n/sl-SI.json index 180d3156be6..47afca400a3 100644 --- a/src/i18n/sl-SI.json +++ b/src/i18n/sl-SI.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/sq-AL.json b/src/i18n/sq-AL.json index b4b5dbc0845..edfb1e2f011 100644 --- a/src/i18n/sq-AL.json +++ b/src/i18n/sq-AL.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/sr-Cyrl-ME.json b/src/i18n/sr-Cyrl-ME.json index b4b5dbc0845..edfb1e2f011 100644 --- a/src/i18n/sr-Cyrl-ME.json +++ b/src/i18n/sr-Cyrl-ME.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/sr-SP.json b/src/i18n/sr-SP.json index 76b7d693a57..20bc4db66d1 100644 --- a/src/i18n/sr-SP.json +++ b/src/i18n/sr-SP.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/sv-SE.json b/src/i18n/sv-SE.json index c43b2a576f2..bd9e4a9bac6 100644 --- a/src/i18n/sv-SE.json +++ b/src/i18n/sv-SE.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Läs mer", "conversationFooterArchive": "Archive", diff --git a/src/i18n/th-TH.json b/src/i18n/th-TH.json index b4b5dbc0845..edfb1e2f011 100644 --- a/src/i18n/th-TH.json +++ b/src/i18n/th-TH.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/tr-CY.json b/src/i18n/tr-CY.json index b4b5dbc0845..edfb1e2f011 100644 --- a/src/i18n/tr-CY.json +++ b/src/i18n/tr-CY.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/tr-TR.json b/src/i18n/tr-TR.json index 02063938517..47d42a12d92 100644 --- a/src/i18n/tr-TR.json +++ b/src/i18n/tr-TR.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/uk-UA.json b/src/i18n/uk-UA.json index 05a6a9ea264..c0487bf1b9d 100644 --- a/src/i18n/uk-UA.json +++ b/src/i18n/uk-UA.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/uz-UZ.json b/src/i18n/uz-UZ.json index b4b5dbc0845..edfb1e2f011 100644 --- a/src/i18n/uz-UZ.json +++ b/src/i18n/uz-UZ.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/vi-VN.json b/src/i18n/vi-VN.json index b4b5dbc0845..edfb1e2f011 100644 --- a/src/i18n/vi-VN.json +++ b/src/i18n/vi-VN.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/zh-CN.json b/src/i18n/zh-CN.json index f893d7b7005..d7181a2b7a5 100644 --- a/src/i18n/zh-CN.json +++ b/src/i18n/zh-CN.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/zh-HK.json b/src/i18n/zh-HK.json index b4b5dbc0845..edfb1e2f011 100644 --- a/src/i18n/zh-HK.json +++ b/src/i18n/zh-HK.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/i18n/zh-TW.json b/src/i18n/zh-TW.json index 4124e354dde..76eab1d9d35 100644 --- a/src/i18n/zh-TW.json +++ b/src/i18n/zh-TW.json @@ -679,13 +679,6 @@ "conversationFileUploadOverlayDescription": "Drag & drop to add files", "conversationFileUploadOverlayTitle": "Upload files", "conversationFileVideoPreviewLabel": "Video file preview for: {src}", - "conversationFilterDrafts": "Drafts", - "conversationFilterMentions": "Mentions", - "conversationFilterNone": "No filter", - "conversationFilterPings": "Pings", - "conversationFilterReplies": "Replies", - "conversationFilterTooltip": "Filter conversations", - "conversationFilterUnread": "Unread", "conversationFoldersEmptyText": "Add your conversations to folders to stay organized.", "conversationFoldersEmptyTextLearnMore": "Learn more", "conversationFooterArchive": "Archive", diff --git a/src/script/page/LeftSidebar/panels/Conversations/ConversationFilterButton/ConversationFilterButton.tsx b/src/script/page/LeftSidebar/panels/Conversations/ConversationFilterButton/ConversationFilterButton.tsx deleted file mode 100644 index 6c77cb82d2e..00000000000 --- a/src/script/page/LeftSidebar/panels/Conversations/ConversationFilterButton/ConversationFilterButton.tsx +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Wire - * Copyright (C) 2025 Wire Swiss GmbH - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see http://www.gnu.org/licenses/. - * - */ - -import {useState, useRef, useEffect} from 'react'; - -import * as Icon from 'Components/Icon'; -import {Config} from 'src/script/Config'; -import {ConversationFilter, useSidebarStore} from 'src/script/page/LeftSidebar/panels/Conversations/useSidebarStore'; -import {t} from 'Util/LocalizerUtil'; - -import { - dropdown, - dropdownItem, - activeDropdownItem, - filterButton, - filterButtonWrapper, -} from './ConversationFilterButton.styles'; - -export const ConversationFilterButton = () => { - const {conversationFilter, setConversationFilter} = useSidebarStore(); - const [isOpen, setIsOpen] = useState(false); - const dropdownRef = useRef(null); - const buttonRef = useRef(null); - - useEffect(() => { - const handleClickOutside = (event: MouseEvent) => { - if ( - dropdownRef.current && - !dropdownRef.current.contains(event.target as Node) && - buttonRef.current && - !buttonRef.current.contains(event.target as Node) - ) { - setIsOpen(false); - } - }; - - if (isOpen) { - document.addEventListener('mousedown', handleClickOutside); - } - - return () => { - document.removeEventListener('mousedown', handleClickOutside); - }; - }, [isOpen]); - - if (!Config.getConfig().FEATURE.ENABLE_ADVANCED_FILTERS) { - return null; - } - - const filterOptions = [ - {value: ConversationFilter.NONE, label: t('conversationFilterNone')}, - {value: ConversationFilter.UNREAD, label: t('conversationFilterUnread')}, - {value: ConversationFilter.MENTIONS, label: t('conversationFilterMentions')}, - {value: ConversationFilter.REPLIES, label: t('conversationFilterReplies')}, - {value: ConversationFilter.DRAFTS, label: t('conversationFilterDrafts')}, - {value: ConversationFilter.PINGS, label: t('conversationFilterPings')}, - ]; - - const handleFilterSelect = (filter: ConversationFilter) => { - setConversationFilter(filter); - setIsOpen(false); - }; - - const isFilterActive = conversationFilter !== ConversationFilter.NONE; - - return ( -
- - - {isOpen && ( -
- {filterOptions.map(option => ( - - ))} -
- )} -
- ); -}; diff --git a/src/script/page/LeftSidebar/panels/Conversations/ConversationTabs/ConversationTabs.tsx b/src/script/page/LeftSidebar/panels/Conversations/ConversationTabs/ConversationTabs.tsx index cb74ce7de4c..8699550ae44 100644 --- a/src/script/page/LeftSidebar/panels/Conversations/ConversationTabs/ConversationTabs.tsx +++ b/src/script/page/LeftSidebar/panels/Conversations/ConversationTabs/ConversationTabs.tsx @@ -39,7 +39,7 @@ import {TeamState} from 'Repositories/team/TeamState'; import {FEATURES, hasAccessToFeature} from 'Repositories/user/UserPermission'; import {getManageTeamUrl} from 'src/script/externalRoute'; import {ConversationFolderTab} from 'src/script/page/LeftSidebar/panels/Conversations/ConversationTab/ConversationFolderTab'; -import {SidebarTabs} from 'src/script/page/LeftSidebar/panels/Conversations/useSidebarStore'; +import {SidebarTabs, useSidebarStore} from 'src/script/page/LeftSidebar/panels/Conversations/useSidebarStore'; import {Core} from 'src/script/service/CoreSingleton'; import {useKoSubscribableChildren} from 'Util/ComponentUtil'; import {isDataDogEnabled} from 'Util/DataDog'; @@ -59,8 +59,8 @@ import {TeamCreationBanner} from './TeamCreation/TeamCreationBanner'; import {Config} from '../../../../../Config'; import {ContentState} from '../../../../useAppState'; -import {ConversationFilterButton} from '../ConversationFilterButton'; import {ConversationTab} from '../ConversationTab'; +import {TabsFilterButton} from '../TabsFilterButton'; interface ConversationTabsProps { conversations: Conversation[]; @@ -95,6 +95,7 @@ export const ConversationTabs = ({ selfUser, channelConversations, }: ConversationTabsProps) => { + const {visibleTabs} = useSidebarStore(); const {isChannelsEnabled, isChannelsFeatureEnabled} = useChannelsFeatureFlag(); const core = container.resolve(Core); const teamState = container.resolve(TeamState); @@ -224,6 +225,12 @@ export const ConversationTabs = ({ unreadConversations: channelConversationsLength, }); } + + // filter tabs based on visibility prefs (RECENT should always bevisible) + const visibleConversationTabs = conversationTabs.filter( + tab => tab.type === SidebarTabs.RECENT || visibleTabs.includes(tab.type), + ); + const manageTeamUrl = getManageTeamUrl(); const replaceWireLink = replaceLink('https://app.wire.com', '', ''); @@ -239,10 +246,10 @@ export const ConversationTabs = ({ >
{t('videoCallOverlayConversations')} - +
- {conversationTabs.map((conversationTab, index) => { + {visibleConversationTabs.map((conversationTab, index) => { if (conversationTab.type === SidebarTabs.FOLDER) { return ( state)); const {isChannelsEnabled} = useChannelsFeatureFlag(); const [conversationsFilter, setConversationsFilter] = useState(''); @@ -200,7 +199,6 @@ export const Conversations = ({ channelConversations, isChannelsEnabled, channelAndGroupConversations, - conversationFilter, draftConversations, }); diff --git a/src/script/page/LeftSidebar/panels/Conversations/Helpers.test.tsx b/src/script/page/LeftSidebar/panels/Conversations/Helpers.test.tsx index 641540c6da5..c6aeaf1f8aa 100644 --- a/src/script/page/LeftSidebar/panels/Conversations/Helpers.test.tsx +++ b/src/script/page/LeftSidebar/panels/Conversations/Helpers.test.tsx @@ -21,7 +21,7 @@ import {Conversation} from 'Repositories/entity/Conversation'; import {getTabConversations} from 'src/script/page/LeftSidebar/panels/Conversations/helpers'; import {generateConversation} from 'test/helper/ConversationGenerator'; -import {SidebarTabs, ConversationFilter} from './useSidebarStore'; +import {SidebarTabs} from './useSidebarStore'; describe('getTabConversations', () => { let conversations: Conversation[]; @@ -56,7 +56,6 @@ describe('getTabConversations', () => { channelAndGroupConversations: groupConversations, channelConversations: [], isChannelsEnabled: false, - conversationFilter: ConversationFilter.NONE, draftConversations: [], }); }; @@ -123,7 +122,6 @@ describe('getTabConversations', () => { channelAndGroupConversations: newGroupConversations, channelConversations: [], isChannelsEnabled: false, - conversationFilter: ConversationFilter.NONE, draftConversations: [], }); @@ -138,7 +136,6 @@ describe('getTabConversations', () => { channelAndGroupConversations: groupConversations, channelConversations: [], isChannelsEnabled: false, - conversationFilter: ConversationFilter.NONE, draftConversations: [], }); diff --git a/src/script/page/LeftSidebar/panels/Conversations/ConversationFilterButton/ConversationFilterButton.styles.ts b/src/script/page/LeftSidebar/panels/Conversations/TabsFilterButton/TabsFilterButton.styles.ts similarity index 71% rename from src/script/page/LeftSidebar/panels/Conversations/ConversationFilterButton/ConversationFilterButton.styles.ts rename to src/script/page/LeftSidebar/panels/Conversations/TabsFilterButton/TabsFilterButton.styles.ts index 739be1e029c..1eaf1978b56 100644 --- a/src/script/page/LeftSidebar/panels/Conversations/ConversationFilterButton/ConversationFilterButton.styles.ts +++ b/src/script/page/LeftSidebar/panels/Conversations/TabsFilterButton/TabsFilterButton.styles.ts @@ -45,38 +45,28 @@ export const dropdown: CSSObject = { top: '100%', right: 0, marginTop: '4px', - minWidth: '200px', - backgroundColor: 'var(--app-bg)', - border: '1px solid var(--border-color)', - borderRadius: '8px', - boxShadow: '0 4px 16px rgba(0, 0, 0, 0.1)', + width: 'max-content', + padding: '8px 0', + backgroundColor: 'var(--dropdown-menu-bg)', + borderRadius: '12px', + boxShadow: '0 0 1px 0 rgba(0, 0, 0, 0.08), 0 8px 24px 0 rgba(0, 0, 0, 0.16)', zIndex: 10, overflow: 'hidden', }; -export const dropdownItem: CSSObject = { - display: 'block', - width: '100%', - padding: '12px 16px', - textAlign: 'left', - border: 'none', - backgroundColor: 'transparent', - color: 'var(--foreground)', - fontSize: '14px', +export const dropdownCheckboxItem: CSSObject = { + display: 'flex', + alignItems: 'center', + height: '30px', + padding: '0 24px', cursor: 'pointer', transition: 'background-color 0.15s ease', + whiteSpace: 'nowrap', '&:hover': { - backgroundColor: 'var(--background-fade-8)', + backgroundColor: 'var(--foreground-fade-16)', }, }; -export const activeDropdownItem: CSSObject = { - ...dropdownItem, - backgroundColor: 'var(--background-fade-16)', - color: 'var(--accent-color)', - fontWeight: 600, -}; - export const filterButtonWrapper: CSSObject = { position: 'relative', }; diff --git a/src/script/page/LeftSidebar/panels/Conversations/TabsFilterButton/TabsFilterButton.tsx b/src/script/page/LeftSidebar/panels/Conversations/TabsFilterButton/TabsFilterButton.tsx new file mode 100644 index 00000000000..700f94c4e74 --- /dev/null +++ b/src/script/page/LeftSidebar/panels/Conversations/TabsFilterButton/TabsFilterButton.tsx @@ -0,0 +1,120 @@ +/* + * Wire + * Copyright (C) 2025 Wire Swiss GmbH + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see http://www.gnu.org/licenses/. + * + */ + +import {useState, useRef, useEffect} from 'react'; + +import {container} from 'tsyringe'; + +import {Checkbox, CheckboxLabel} from '@wireapp/react-ui-kit'; + +import * as Icon from 'Components/Icon'; +import {TeamState} from 'Repositories/team/TeamState'; +import {Config} from 'src/script/Config'; +import {SidebarTabs, useSidebarStore} from 'src/script/page/LeftSidebar/panels/Conversations/useSidebarStore'; +import {useKoSubscribableChildren} from 'Util/ComponentUtil'; +import {t} from 'Util/LocalizerUtil'; +import {useChannelsFeatureFlag} from 'Util/useChannelsFeatureFlag'; + +import {dropdown, dropdownCheckboxItem, filterButton, filterButtonWrapper} from './TabsFilterButton.styles'; + +export const TabsFilterButton = () => { + const {visibleTabs, toggleTabVisibility} = useSidebarStore(); + const [isOpen, setIsOpen] = useState(false); + const dropdownRef = useRef(null); + const buttonRef = useRef(null); + + const {isChannelsEnabled} = useChannelsFeatureFlag(); + const teamState = container.resolve(TeamState); + const {isCellsEnabled: isCellsEnabledForTeam} = useKoSubscribableChildren(teamState, ['isCellsEnabled']); + + useEffect(() => { + const handleClickOutside = (event: MouseEvent) => { + if ( + dropdownRef.current && + !dropdownRef.current.contains(event.target as Node) && + buttonRef.current && + !buttonRef.current.contains(event.target as Node) + ) { + setIsOpen(false); + } + }; + + if (isOpen) { + document.addEventListener('mousedown', handleClickOutside); + } + + return () => { + document.removeEventListener('mousedown', handleClickOutside); + }; + }, [isOpen]); + + if (!Config.getConfig().FEATURE.ENABLE_ADVANCED_FILTERS) { + return null; + } + + const showCells = Config.getConfig().FEATURE.ENABLE_CELLS && isCellsEnabledForTeam; + + const availableTabs = [ + {type: SidebarTabs.FAVORITES, label: t('conversationLabelFavorites')}, + {type: SidebarTabs.GROUPS, label: t('conversationLabelGroups')}, + {type: SidebarTabs.DIRECTS, label: t('conversationLabelDirects')}, + {type: SidebarTabs.FOLDER, label: t('folderViewTooltip')}, + {type: SidebarTabs.ARCHIVES, label: t('conversationFooterArchive')}, + {type: SidebarTabs.UNREAD, label: t('conversationLabelUnread')}, + {type: SidebarTabs.MENTIONS, label: t('conversationLabelMentions')}, + {type: SidebarTabs.REPLIES, label: t('conversationLabelReplies')}, + {type: SidebarTabs.DRAFTS, label: t('conversationLabelDrafts')}, + {type: SidebarTabs.PINGS, label: t('conversationLabelPings')}, + ]; + + if (isChannelsEnabled) { + availableTabs.splice(2, 0, {type: SidebarTabs.CHANNELS, label: t('conversationLabelChannels')}); + } + + if (showCells) { + availableTabs.push({type: SidebarTabs.CELLS, label: t('cells.sidebar.title')}); + } + + return ( +
+ + + {isOpen && ( +
+ {availableTabs.map(tab => ( +
+ toggleTabVisibility(tab.type)}> + {tab.label} + +
+ ))} +
+ )} +
+ ); +}; diff --git a/src/script/page/LeftSidebar/panels/Conversations/ConversationFilterButton/index.ts b/src/script/page/LeftSidebar/panels/Conversations/TabsFilterButton/index.ts similarity index 92% rename from src/script/page/LeftSidebar/panels/Conversations/ConversationFilterButton/index.ts rename to src/script/page/LeftSidebar/panels/Conversations/TabsFilterButton/index.ts index bc4a01b302f..0f64d2bbcf9 100644 --- a/src/script/page/LeftSidebar/panels/Conversations/ConversationFilterButton/index.ts +++ b/src/script/page/LeftSidebar/panels/Conversations/TabsFilterButton/index.ts @@ -17,4 +17,4 @@ * */ -export * from './ConversationFilterButton'; +export {TabsFilterButton} from './TabsFilterButton'; diff --git a/src/script/page/LeftSidebar/panels/Conversations/helpers.tsx b/src/script/page/LeftSidebar/panels/Conversations/helpers.tsx index bac52f46f6a..5ae2dcb7107 100644 --- a/src/script/page/LeftSidebar/panels/Conversations/helpers.tsx +++ b/src/script/page/LeftSidebar/panels/Conversations/helpers.tsx @@ -21,7 +21,7 @@ import {Conversation} from 'Repositories/entity/Conversation'; import {t} from 'Util/LocalizerUtil'; import {replaceAccents} from 'Util/StringUtil'; -import {ConversationFilter, SidebarTabs} from './useSidebarStore'; +import {SidebarTabs} from './useSidebarStore'; interface GetTabConversationsProps { currentTab: SidebarTabs; @@ -35,7 +35,6 @@ interface GetTabConversationsProps { channelAndGroupConversations: Conversation[]; conversationsFilter: string; isChannelsEnabled: boolean; - conversationFilter: ConversationFilter; draftConversations: Conversation[]; } @@ -44,33 +43,6 @@ type GetTabConversations = { searchInputPlaceholder: string; }; -const applyAdvancedFilter = ( - conversations: Conversation[], - filter: ConversationFilter, - draftConversations: Conversation[], -): Conversation[] => { - if (filter === ConversationFilter.NONE) { - return conversations; - } - - return conversations.filter(conversation => { - switch (filter) { - case ConversationFilter.UNREAD: - return conversation.hasUnread(); - case ConversationFilter.MENTIONS: - return conversation.unreadState().selfMentions.length > 0; - case ConversationFilter.REPLIES: - return conversation.unreadState().selfReplies.length > 0; - case ConversationFilter.DRAFTS: - return draftConversations.some(draftConv => draftConv.id === conversation.id); - case ConversationFilter.PINGS: - return conversation.unreadState().pings.length > 0; - default: - return true; - } - }); -}; - export function getTabConversations({ currentTab, conversations, @@ -82,7 +54,6 @@ export function getTabConversations({ channelConversations, isChannelsEnabled, channelAndGroupConversations, - conversationFilter, draftConversations, }: GetTabConversationsProps): GetTabConversations { const conversationSearchFilter = (conversation: Conversation) => { @@ -97,7 +68,7 @@ export function getTabConversations({ if ([SidebarTabs.FOLDER, SidebarTabs.RECENT].includes(currentTab)) { if (!conversationsFilter) { return { - conversations: applyAdvancedFilter(conversations, conversationFilter, draftConversations), + conversations: conversations, searchInputPlaceholder: t('searchConversations'), }; } @@ -114,7 +85,7 @@ export function getTabConversations({ const combinedConversations = [...filteredConversations, ...filteredGroupConversations]; return { - conversations: applyAdvancedFilter(combinedConversations, conversationFilter, draftConversations), + conversations: combinedConversations, searchInputPlaceholder: t('searchConversations'), }; } @@ -124,7 +95,7 @@ export function getTabConversations({ const filteredConversations = conversations.filter(conversationArchivedFilter).filter(conversationSearchFilter); return { - conversations: applyAdvancedFilter(filteredConversations, conversationFilter, draftConversations), + conversations: filteredConversations, searchInputPlaceholder: t('searchGroupConversations'), }; } @@ -135,7 +106,7 @@ export function getTabConversations({ .filter(conversationSearchFilter); return { - conversations: applyAdvancedFilter(filteredConversations, conversationFilter, draftConversations), + conversations: filteredConversations, searchInputPlaceholder: t('searchChannelConversations'), }; } @@ -146,7 +117,7 @@ export function getTabConversations({ .filter(conversationSearchFilter); return { - conversations: applyAdvancedFilter(filteredConversations, conversationFilter, draftConversations), + conversations: filteredConversations, searchInputPlaceholder: t('searchDirectConversations'), }; } @@ -155,7 +126,7 @@ export function getTabConversations({ const filteredConversations = favoriteConversations.filter(conversationSearchFilter); return { - conversations: applyAdvancedFilter(filteredConversations, conversationFilter, draftConversations), + conversations: filteredConversations, searchInputPlaceholder: t('searchFavoriteConversations'), }; } @@ -164,7 +135,7 @@ export function getTabConversations({ const filteredConversations = archivedConversations.filter(conversationSearchFilter); return { - conversations: applyAdvancedFilter(filteredConversations, conversationFilter, draftConversations), + conversations: filteredConversations, searchInputPlaceholder: t('searchArchivedConversations'), }; } diff --git a/src/script/page/LeftSidebar/panels/Conversations/useSidebarStore.ts b/src/script/page/LeftSidebar/panels/Conversations/useSidebarStore.ts index dbd56f29eb9..aa8e11bd219 100644 --- a/src/script/page/LeftSidebar/panels/Conversations/useSidebarStore.ts +++ b/src/script/page/LeftSidebar/panels/Conversations/useSidebarStore.ts @@ -38,15 +38,6 @@ export enum SidebarTabs { CELLS, } -export enum ConversationFilter { - NONE = 'NONE', - UNREAD = 'UNREAD', - MENTIONS = 'MENTIONS', - REPLIES = 'REPLIES', - DRAFTS = 'DRAFTS', - PINGS = 'PINGS', -} - export const SidebarStatus = { OPEN: 'OPEN', CLOSED: 'CLOSED', @@ -59,8 +50,9 @@ export interface SidebarStore { setStatus: (status: SidebarStatus) => void; currentTab: SidebarTabs; setCurrentTab: (tab: SidebarTabs) => void; - conversationFilter: ConversationFilter; - setConversationFilter: (filter: ConversationFilter) => void; + visibleTabs: SidebarTabs[]; + setVisibleTabs: (tabs: SidebarTabs[]) => void; + toggleTabVisibility: (tab: SidebarTabs) => void; } const useSidebarStore = create()( @@ -72,8 +64,40 @@ const useSidebarStore = create()( }, status: SidebarStatus.OPEN, setStatus: status => set({status: status}), - conversationFilter: ConversationFilter.NONE, - setConversationFilter: (filter: ConversationFilter) => set({conversationFilter: filter}), + visibleTabs: [ + SidebarTabs.RECENT, + SidebarTabs.FOLDER, + SidebarTabs.FAVORITES, + SidebarTabs.GROUPS, + SidebarTabs.CHANNELS, + SidebarTabs.DIRECTS, + SidebarTabs.UNREAD, + SidebarTabs.MENTIONS, + SidebarTabs.REPLIES, + SidebarTabs.DRAFTS, + SidebarTabs.PINGS, + SidebarTabs.ARCHIVES, + ], + setVisibleTabs: (tabs: SidebarTabs[]) => set({visibleTabs: tabs}), + toggleTabVisibility: (tab: SidebarTabs) => { + set(state => { + const isCurrentlyVisible = state.visibleTabs.includes(tab); + const isActiveTab = state.currentTab === tab; + + if (isCurrentlyVisible && isActiveTab) { + return { + currentTab: SidebarTabs.RECENT, + visibleTabs: state.visibleTabs.filter(visibleTab => visibleTab !== tab), + }; + } + + const newVisibleTabs = isCurrentlyVisible + ? state.visibleTabs.filter(visibleTab => visibleTab !== tab) + : [...state.visibleTabs, tab]; + + return {visibleTabs: newVisibleTabs}; + }); + }, }), { name: 'sidebar-store', @@ -83,7 +107,7 @@ const useSidebarStore = create()( currentTab: [SidebarTabs.PREFERENCES, SidebarTabs.CONNECT, SidebarTabs.CELLS].includes(state.currentTab) ? SidebarTabs.RECENT : state.currentTab, - conversationFilter: state.conversationFilter, + visibleTabs: state.visibleTabs, }), }, ), diff --git a/src/types/i18n.d.ts b/src/types/i18n.d.ts index b66616b1d4a..09258ac644f 100644 --- a/src/types/i18n.d.ts +++ b/src/types/i18n.d.ts @@ -683,13 +683,7 @@ declare module 'I18n/en-US.json' { 'conversationFileUploadOverlayDescription': `Drag & drop to add files`; 'conversationFileUploadOverlayTitle': `Upload files`; 'conversationFileVideoPreviewLabel': `Video file preview for: {src}`; - 'conversationFilterDrafts': `Drafts`; - 'conversationFilterMentions': `Mentions`; - 'conversationFilterNone': `No filter`; - 'conversationFilterPings': `Pings`; - 'conversationFilterReplies': `Replies`; - 'conversationFilterTooltip': `Filter conversations`; - 'conversationFilterUnread': `Unread`; + 'tabsFilterTooltip': `Customize visible tabs`; 'conversationFoldersEmptyText': `Add your conversations to folders to stay organized.`; 'conversationFoldersEmptyTextLearnMore': `Learn more`; 'conversationFooterArchive': `Archive`; From 2922a57b057d0e963321f6ad1396fb32ff76d259 Mon Sep 17 00:00:00 2001 From: Emil Abramov Date: Thu, 13 Nov 2025 23:08:02 +0100 Subject: [PATCH 05/51] chore(tabs): linter warnings & typo --- .../panels/Conversations/Conversations.tsx | 65 +++++++++++-------- 1 file changed, 38 insertions(+), 27 deletions(-) diff --git a/src/script/page/LeftSidebar/panels/Conversations/Conversations.tsx b/src/script/page/LeftSidebar/panels/Conversations/Conversations.tsx index e9e9f75aaae..3214233e24f 100644 --- a/src/script/page/LeftSidebar/panels/Conversations/Conversations.tsx +++ b/src/script/page/LeftSidebar/panels/Conversations/Conversations.tsx @@ -225,12 +225,12 @@ export const Conversations = ({ const showConnectionRequests = [SidebarTabs.RECENT, SidebarTabs.DIRECTS].includes(currentTab); const hasVisibleConnectionRequests = connectRequests.length > 0 && showConnectionRequests; const hasVisibleConversations = currentTabConversations.length > 0; - const hasNoVisbleConversations = !hasVisibleConversations && !hasVisibleConnectionRequests; + const hasNoVisibleConversations = !hasVisibleConversations && !hasVisibleConnectionRequests; const hasEmptyConversationsList = !isGroupParticipantsVisible && - ((showSearchInput && hasNoVisbleConversations) || - (hasNoVisbleConversations && currentTab !== SidebarTabs.ARCHIVES)); + ((showSearchInput && hasNoVisibleConversations) || + (hasNoVisibleConversations && currentTab !== SidebarTabs.ARCHIVES)); const toggleSidebar = useCallback(() => { if (isFoldersTabOpen) { @@ -256,7 +256,7 @@ export const Conversations = ({ setCurrentTab(SidebarTabs.RECENT); } }); - }, [currentTabConversations]); + }, [currentTabConversations, setCurrentTab]); useEffect(() => { if (activeConversation && !conversationState.isVisible(activeConversation)) { @@ -275,15 +275,7 @@ export const Conversations = ({ return () => { amplify.unsubscribe(WebAppEvents.CONTENT.EXPAND_FOLDER, openFolder); }; - }, [activeConversation]); - - useEffect(() => { - const openFavorites = () => changeTab(SidebarTabs.FAVORITES); - conversationLabelRepository.addEventListener('conversation-favorited', openFavorites); - return () => { - conversationLabelRepository.removeEventListener('conversation-favorited', openFavorites); - }; - }, []); + }, [activeConversation, openFolder]); const clearConversationFilter = useCallback(() => setConversationsFilter(''), []); @@ -294,7 +286,7 @@ export const Conversations = ({ setCurrentView(ViewType.MOBILE_LEFT_SIDEBAR); switchList(ListState.CONVERSATIONS); switchContent(ContentState.CONVERSATION); - }, []); + }, [setCurrentView, switchList, switchContent]); const changeTab = useCallback( (nextTab: SidebarTabs, folderId?: string) => { @@ -319,20 +311,39 @@ export const Conversations = ({ clearConversationFilter(); setCurrentTab(nextTab); }, - [conversationRepository], + [ + conversationRepository, + closeFolder, + onExitPreferences, + switchList, + switchContent, + clearConversationFilter, + setCurrentTab, + ], ); - const onClickPreferences = useCallback((itemId: ContentState) => { - switchList(ListState.PREFERENCES); - setCurrentView(ViewType.MOBILE_CENTRAL_COLUMN); - switchContent(itemId); - - setTimeout(() => { - const centerColumn = document.getElementById('center-column'); - const nextElementToFocus = centerColumn?.querySelector("[tabindex='0']") as HTMLElement | null; - nextElementToFocus?.focus(); - }, ANIMATED_PAGE_TRANSITION_DURATION + 1); - }, []); + useEffect(() => { + const openFavorites = () => changeTab(SidebarTabs.FAVORITES); + conversationLabelRepository.addEventListener('conversation-favorited', openFavorites); + return () => { + conversationLabelRepository.removeEventListener('conversation-favorited', openFavorites); + }; + }, [changeTab, conversationLabelRepository]); + + const onClickPreferences = useCallback( + (itemId: ContentState) => { + switchList(ListState.PREFERENCES); + setCurrentView(ViewType.MOBILE_CENTRAL_COLUMN); + switchContent(itemId); + + setTimeout(() => { + const centerColumn = document.getElementById('center-column'); + const nextElementToFocus = centerColumn?.querySelector("[tabindex='0']") as HTMLElement | null; + nextElementToFocus?.focus(); + }, ANIMATED_PAGE_TRANSITION_DURATION + 1); + }, + [switchList, setCurrentView, switchContent], + ); const handleEnterSearchClick = useCallback( (event: ReactKeyBoardEvent) => { @@ -358,7 +369,7 @@ export const Conversations = ({ const jumpToRecentSearch = useCallback(() => { switchList(ListState.CONVERSATIONS); setCurrentTab(SidebarTabs.RECENT); - }, []); + }, [switchList, setCurrentTab]); return (
From a2dc4d9d50362a6bb2972f5c2c9a22f143377074 Mon Sep 17 00:00:00 2001 From: Emil Abramov Date: Thu, 13 Nov 2025 23:28:17 +0100 Subject: [PATCH 06/51] chore(tabs): no need to duplicate stuff --- .../ConversationTabs/ConversationTabs.tsx | 13 +++++++------ .../LeftSidebar/panels/Conversations/helpers.tsx | 16 ++++++++++++---- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/src/script/page/LeftSidebar/panels/Conversations/ConversationTabs/ConversationTabs.tsx b/src/script/page/LeftSidebar/panels/Conversations/ConversationTabs/ConversationTabs.tsx index 8699550ae44..b67c401bda3 100644 --- a/src/script/page/LeftSidebar/panels/Conversations/ConversationTabs/ConversationTabs.tsx +++ b/src/script/page/LeftSidebar/panels/Conversations/ConversationTabs/ConversationTabs.tsx @@ -60,6 +60,7 @@ import {TeamCreationBanner} from './TeamCreation/TeamCreationBanner'; import {Config} from '../../../../../Config'; import {ContentState} from '../../../../useAppState'; import {ConversationTab} from '../ConversationTab'; +import {conversationFilters} from '../helpers'; import {TabsFilterButton} from '../TabsFilterButton'; interface ConversationTabsProps { @@ -112,7 +113,7 @@ export const ConversationTabs = ({ ).length; const filterUnreadAndArchivedConversations = (conversation: Conversation) => - !conversation.is_archived() && conversation.hasUnread(); + conversationFilters.notArchived(conversation) && conversationFilters.hasUnread(conversation); const isTeamCreationEnabled = Config.getConfig().FEATURE.ENABLE_TEAM_CREATION && @@ -121,16 +122,16 @@ export const ConversationTabs = ({ const channelConversationsLength = channelConversations.filter(filterUnreadAndArchivedConversations).length; const groupConversationsLength = groupConversations.filter(filterUnreadAndArchivedConversations).length; - const unreadCount = unreadConversations.filter(conv => !conv.is_archived()).length; + const unreadCount = unreadConversations.filter(conversationFilters.notArchived).length; const mentionsCount = unreadConversations.filter( - conv => !conv.is_archived() && conv.unreadState().selfMentions.length > 0, + conv => conversationFilters.notArchived(conv) && conversationFilters.hasMentions(conv), ).length; const repliesCount = unreadConversations.filter( - conv => !conv.is_archived() && conv.unreadState().selfReplies.length > 0, + conv => conversationFilters.notArchived(conv) && conversationFilters.hasReplies(conv), ).length; - const draftsCount = draftConversations.filter(conv => !conv.is_archived()).length; + const draftsCount = draftConversations.filter(conversationFilters.notArchived).length; const pingsCount = unreadConversations.filter( - conv => !conv.is_archived() && conv.unreadState().pings.length > 0, + conv => conversationFilters.notArchived(conv) && conversationFilters.hasPings(conv), ).length; const conversationTabs = [ diff --git a/src/script/page/LeftSidebar/panels/Conversations/helpers.tsx b/src/script/page/LeftSidebar/panels/Conversations/helpers.tsx index 5ae2dcb7107..6663bc021f9 100644 --- a/src/script/page/LeftSidebar/panels/Conversations/helpers.tsx +++ b/src/script/page/LeftSidebar/panels/Conversations/helpers.tsx @@ -23,6 +23,14 @@ import {replaceAccents} from 'Util/StringUtil'; import {SidebarTabs} from './useSidebarStore'; +export const conversationFilters = { + hasUnread: (conv: Conversation) => conv.hasUnread(), + hasMentions: (conv: Conversation) => conv.unreadState().selfMentions.length > 0, + hasReplies: (conv: Conversation) => conv.unreadState().selfReplies.length > 0, + hasPings: (conv: Conversation) => conv.unreadState().pings.length > 0, + notArchived: (conv: Conversation) => !conv.is_archived(), +}; + interface GetTabConversationsProps { currentTab: SidebarTabs; @@ -143,7 +151,7 @@ export function getTabConversations({ if (currentTab === SidebarTabs.UNREAD) { const filteredConversations = conversations .filter(conversationArchivedFilter) - .filter(conv => conv.hasUnread()) + .filter(conversationFilters.hasUnread) .filter(conversationSearchFilter); return { @@ -155,7 +163,7 @@ export function getTabConversations({ if (currentTab === SidebarTabs.MENTIONS) { const filteredConversations = conversations .filter(conversationArchivedFilter) - .filter(conv => conv.unreadState().selfMentions.length > 0) + .filter(conversationFilters.hasMentions) .filter(conversationSearchFilter); return { @@ -167,7 +175,7 @@ export function getTabConversations({ if (currentTab === SidebarTabs.REPLIES) { const filteredConversations = conversations .filter(conversationArchivedFilter) - .filter(conv => conv.unreadState().selfReplies.length > 0) + .filter(conversationFilters.hasReplies) .filter(conversationSearchFilter); return { @@ -190,7 +198,7 @@ export function getTabConversations({ if (currentTab === SidebarTabs.PINGS) { const filteredConversations = conversations .filter(conversationArchivedFilter) - .filter(conv => conv.unreadState().pings.length > 0) + .filter(conversationFilters.hasPings) .filter(conversationSearchFilter); return { From 2673b382d6bf48dfc44f65653e1703d2099ebea3 Mon Sep 17 00:00:00 2001 From: Emil Abramov Date: Thu, 13 Nov 2025 23:49:15 +0100 Subject: [PATCH 07/51] chore(tabs): get rid of polling, use amplify instead --- .../InputBar/common/draftState/draftState.ts | 7 ++++++ .../hooks/useDraftConversations.ts | 23 +++++++++++++++---- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/script/components/InputBar/common/draftState/draftState.ts b/src/script/components/InputBar/common/draftState/draftState.ts index ff63cae9d4f..73a87b772af 100644 --- a/src/script/components/InputBar/common/draftState/draftState.ts +++ b/src/script/components/InputBar/common/draftState/draftState.ts @@ -17,11 +17,15 @@ * */ +import {amplify} from 'amplify'; + import {MessageRepository} from 'Repositories/conversation/MessageRepository'; import {Conversation} from 'Repositories/entity/Conversation'; import {ContentMessage} from 'Repositories/entity/message/ContentMessage'; import {StorageKey, StorageRepository} from 'Repositories/storage'; +export const DRAFT_STATE_CHANGED_EVENT = 'conversation.draft-changed'; + export interface DraftState { editorState: string | null; messageReply?: ContentMessage; @@ -60,6 +64,9 @@ export const saveDraftState = async ({ replyId, editedMessageId, }); + + // Emit event to notify listeners of draft change + amplify.publish(DRAFT_STATE_CHANGED_EVENT, conversation.id); }; export const loadDraftState = async ( diff --git a/src/script/page/LeftSidebar/panels/Conversations/hooks/useDraftConversations.ts b/src/script/page/LeftSidebar/panels/Conversations/hooks/useDraftConversations.ts index 05adb660f8b..6ed941d2f5c 100644 --- a/src/script/page/LeftSidebar/panels/Conversations/hooks/useDraftConversations.ts +++ b/src/script/page/LeftSidebar/panels/Conversations/hooks/useDraftConversations.ts @@ -19,8 +19,10 @@ import {useEffect, useState, useRef, useCallback} from 'react'; +import {amplify} from 'amplify'; import {useDebouncedCallback} from 'use-debounce'; +import {DRAFT_STATE_CHANGED_EVENT} from 'Components/InputBar/common/draftState/draftState'; import {Conversation} from 'Repositories/entity/Conversation'; import {StorageKey} from 'Repositories/storage'; @@ -73,22 +75,33 @@ export const useDraftConversations = (conversations: Conversation[]): Conversati // Initial check checkForDrafts(); + // Listen for draft changes in the current tab + const handleDraftChange = () => { + debouncedCheck(); + }; + // Listen for storage changes from other tabs const handleStorageChange = (event: StorageEvent) => { if (event.key?.includes(StorageKey.CONVERSATION.INPUT)) { - checkForDrafts(); + debouncedCheck(); } }; - // Check periodically but less frequently - // This matches the draft save debounce of 800ms - const interval = setInterval(debouncedCheck, 1000); + // Listen for visibility changes to check when tab becomes active + const handleVisibilityChange = () => { + if (document.visibilityState === 'visible') { + checkForDrafts(); + } + }; + amplify.subscribe(DRAFT_STATE_CHANGED_EVENT, handleDraftChange); window.addEventListener('storage', handleStorageChange); + document.addEventListener('visibilitychange', handleVisibilityChange); return () => { + amplify.unsubscribe(DRAFT_STATE_CHANGED_EVENT, handleDraftChange); window.removeEventListener('storage', handleStorageChange); - clearInterval(interval); + document.removeEventListener('visibilitychange', handleVisibilityChange); debouncedCheck.cancel(); }; }, [checkForDrafts, debouncedCheck]); From f211140ea850ab3f15dbf883c8bc06c8c6e130a3 Mon Sep 17 00:00:00 2001 From: Emil Abramov Date: Fri, 14 Nov 2025 00:00:53 +0100 Subject: [PATCH 08/51] chore(tabs): clarify why recents should always be visible --- .../ConversationTabs/ConversationTabs.tsx | 12 +++++++----- .../panels/Conversations/useSidebarStore.ts | 11 +++++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/script/page/LeftSidebar/panels/Conversations/ConversationTabs/ConversationTabs.tsx b/src/script/page/LeftSidebar/panels/Conversations/ConversationTabs/ConversationTabs.tsx index b67c401bda3..ad7500faa66 100644 --- a/src/script/page/LeftSidebar/panels/Conversations/ConversationTabs/ConversationTabs.tsx +++ b/src/script/page/LeftSidebar/panels/Conversations/ConversationTabs/ConversationTabs.tsx @@ -39,7 +39,11 @@ import {TeamState} from 'Repositories/team/TeamState'; import {FEATURES, hasAccessToFeature} from 'Repositories/user/UserPermission'; import {getManageTeamUrl} from 'src/script/externalRoute'; import {ConversationFolderTab} from 'src/script/page/LeftSidebar/panels/Conversations/ConversationTab/ConversationFolderTab'; -import {SidebarTabs, useSidebarStore} from 'src/script/page/LeftSidebar/panels/Conversations/useSidebarStore'; +import { + SidebarTabs, + useSidebarStore, + isTabVisible, +} from 'src/script/page/LeftSidebar/panels/Conversations/useSidebarStore'; import {Core} from 'src/script/service/CoreSingleton'; import {useKoSubscribableChildren} from 'Util/ComponentUtil'; import {isDataDogEnabled} from 'Util/DataDog'; @@ -227,10 +231,8 @@ export const ConversationTabs = ({ }); } - // filter tabs based on visibility prefs (RECENT should always bevisible) - const visibleConversationTabs = conversationTabs.filter( - tab => tab.type === SidebarTabs.RECENT || visibleTabs.includes(tab.type), - ); + // Filter tabs based on visibility preferences + const visibleConversationTabs = conversationTabs.filter(tab => isTabVisible(tab.type, visibleTabs)); const manageTeamUrl = getManageTeamUrl(); const replaceWireLink = replaceLink('https://app.wire.com', '', ''); diff --git a/src/script/page/LeftSidebar/panels/Conversations/useSidebarStore.ts b/src/script/page/LeftSidebar/panels/Conversations/useSidebarStore.ts index aa8e11bd219..3d986effbfb 100644 --- a/src/script/page/LeftSidebar/panels/Conversations/useSidebarStore.ts +++ b/src/script/page/LeftSidebar/panels/Conversations/useSidebarStore.ts @@ -38,6 +38,17 @@ export enum SidebarTabs { CELLS, } +/** + * Tabs that are always visible and cannot be hidden by the user. + * RECENT tab serves as the default view and fallback when users (accidentally) + * hide their currently active tab. + */ +export const ALWAYS_VISIBLE_TABS: readonly SidebarTabs[] = [SidebarTabs.RECENT]; + +export const isTabVisible = (tab: SidebarTabs, visibleTabs: SidebarTabs[]): boolean => { + return ALWAYS_VISIBLE_TABS.includes(tab) || visibleTabs.includes(tab); +}; + export const SidebarStatus = { OPEN: 'OPEN', CLOSED: 'CLOSED', From 8d40670508dddbd48891c4a0be63ce802f38baf8 Mon Sep 17 00:00:00 2001 From: Emil Abramov Date: Fri, 14 Nov 2025 00:31:23 +0100 Subject: [PATCH 09/51] feat(tabs): accessibility stuffs --- .../TabsFilterButton.styles.ts | 4 ++ .../TabsFilterButton/TabsFilterButton.tsx | 43 +++++++++++++++++-- 2 files changed, 43 insertions(+), 4 deletions(-) diff --git a/src/script/page/LeftSidebar/panels/Conversations/TabsFilterButton/TabsFilterButton.styles.ts b/src/script/page/LeftSidebar/panels/Conversations/TabsFilterButton/TabsFilterButton.styles.ts index 1eaf1978b56..2dbcba084b7 100644 --- a/src/script/page/LeftSidebar/panels/Conversations/TabsFilterButton/TabsFilterButton.styles.ts +++ b/src/script/page/LeftSidebar/panels/Conversations/TabsFilterButton/TabsFilterButton.styles.ts @@ -35,6 +35,10 @@ export const filterButton = (isActive: boolean): CSSObject => ({ '&:focus': { outline: 'none', }, + '&:focus-visible': { + outline: '2px solid var(--accent-color-focus)', + outlineOffset: '2px', + }, '& svg': { fill: 'currentColor', }, diff --git a/src/script/page/LeftSidebar/panels/Conversations/TabsFilterButton/TabsFilterButton.tsx b/src/script/page/LeftSidebar/panels/Conversations/TabsFilterButton/TabsFilterButton.tsx index 700f94c4e74..ab718d30765 100644 --- a/src/script/page/LeftSidebar/panels/Conversations/TabsFilterButton/TabsFilterButton.tsx +++ b/src/script/page/LeftSidebar/panels/Conversations/TabsFilterButton/TabsFilterButton.tsx @@ -17,7 +17,7 @@ * */ -import {useState, useRef, useEffect} from 'react'; +import {useState, useRef, useEffect, useId} from 'react'; import {container} from 'tsyringe'; @@ -28,6 +28,7 @@ import {TeamState} from 'Repositories/team/TeamState'; import {Config} from 'src/script/Config'; import {SidebarTabs, useSidebarStore} from 'src/script/page/LeftSidebar/panels/Conversations/useSidebarStore'; import {useKoSubscribableChildren} from 'Util/ComponentUtil'; +import {handleEscDown} from 'Util/KeyboardUtil'; import {t} from 'Util/LocalizerUtil'; import {useChannelsFeatureFlag} from 'Util/useChannelsFeatureFlag'; @@ -38,6 +39,7 @@ export const TabsFilterButton = () => { const [isOpen, setIsOpen] = useState(false); const dropdownRef = useRef(null); const buttonRef = useRef(null); + const menuId = useId(); const {isChannelsEnabled} = useChannelsFeatureFlag(); const teamState = container.resolve(TeamState); @@ -64,6 +66,23 @@ export const TabsFilterButton = () => { }; }, [isOpen]); + useEffect(() => { + const handleKeyDown = (event: KeyboardEvent) => { + handleEscDown(event, () => { + setIsOpen(false); + buttonRef.current?.focus(); + }); + }; + + if (isOpen) { + document.addEventListener('keydown', handleKeyDown); + } + + return () => { + document.removeEventListener('keydown', handleKeyDown); + }; + }, [isOpen]); + if (!Config.getConfig().FEATURE.ENABLE_ADVANCED_FILTERS) { return null; } @@ -98,16 +117,32 @@ export const TabsFilterButton = () => { onClick={() => setIsOpen(!isOpen)} data-uie-name="tabs-filter-button" title={t('tabsFilterTooltip')} - css={filterButton(false)} + css={filterButton(isOpen)} type="button" + aria-label={t('tabsFilterTooltip')} + aria-expanded={isOpen} + aria-haspopup="menu" + aria-controls={menuId} > {isOpen && ( -
+