Page MenuHomePhabricator

D12684.diff
No OneTemporary

D12684.diff

diff --git a/landing/competitor-data.js b/landing/competitor-data.js
--- a/landing/competitor-data.js
+++ b/landing/competitor-data.js
@@ -47,7 +47,7 @@
],
},
{
- title: 'Background tab',
+ title: 'Muted tab',
comingSoon: false,
competitorDescriptionShort:
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque vulputate vestibulum leo, vel sollicitudin.',
@@ -181,7 +181,7 @@
'Discord has a single function to mute notifs from a chat. You can mute notifs temporarily or permanently.',
],
commDescriptionLong: [
- 'Comm allows you to manage notif alerts separately from notif badging (unread icon). Comm also sorts muted chats in a separate “Background” tab in order to avoid cluttering your inbox.',
+ 'Comm allows you to manage notif alerts separately from notif badging (unread icon). Comm also sorts muted chats in a separate “Muted” tab in order to avoid cluttering your inbox.',
],
},
{
@@ -271,7 +271,7 @@
'Keybase has a single function to mute notifs from a chat.',
],
commDescriptionLong: [
- 'Comm allows you to manage notif alerts separately from notif badging (unread icon). Comm also sorts muted chats in a separate “Background” tab in order to avoid cluttering your inbox.',
+ 'Comm allows you to manage notif alerts separately from notif badging (unread icon). Comm also sorts muted chats in a separate “Muted” tab in order to avoid cluttering your inbox.',
],
},
],
@@ -427,7 +427,7 @@
'Signal has a single function to mute notifs from a chat.',
],
commDescriptionLong: [
- 'Comm allows you to manage notif alerts separately from notif badging (unread icon). Comm also sorts muted chats in a separate “Background” tab in order to avoid cluttering your inbox.',
+ 'Comm allows you to manage notif alerts separately from notif badging (unread icon). Comm also sorts muted chats in a separate “Muted” tab in order to avoid cluttering your inbox.',
],
},
],
@@ -495,7 +495,7 @@
'Slack has several features for managing notifs across a whole community. However, when it comes to managing notifs from a specific chat, Slack is more limited. There’s only one option, which is to completely mute a chat.',
],
commDescriptionLong: [
- 'Comm allows you to manage notif alerts separately from notif badging (unread icon). Comm also sorts muted chats in a separate “Background” tab in order to avoid cluttering your inbox.',
+ 'Comm allows you to manage notif alerts separately from notif badging (unread icon). Comm also sorts muted chats in a separate “Muted” tab in order to avoid cluttering your inbox.',
],
},
{
@@ -581,7 +581,7 @@
'Telegram supports temporary muting notifs from a chat, disabling message previews, and changing the notification sound associated with a chat.',
],
commDescriptionLong: [
- 'Comm allows you to manage notif alerts separately from notif badging (unread icon). Comm also sorts muted chats in a separate “Background” tab in order to avoid cluttering your inbox.',
+ 'Comm allows you to manage notif alerts separately from notif badging (unread icon). Comm also sorts muted chats in a separate “Muted” tab in order to avoid cluttering your inbox.',
],
},
{
@@ -590,12 +590,12 @@
competitorDescriptionShort:
'Telegram has a Chat Folders feature, but it’s not easy to move a noisy chat out of your inbox.',
commDescriptionShort:
- 'When you disable notifs for a chat, Comm moves it out of your inbox into a separate Background tab.',
+ 'When you disable notifs for a chat, Comm moves it out of your inbox into a separate Muted tab.',
competitorDescriptionLong: [
'Telegram has a Chat Folders feature. Your primary inbox always shows all chats, but Chat Folders can be configured to show or hide a set of selected chats. If you want to separate all of your chats into two Chat Folders, it takes a lot of steps.',
],
commDescriptionLong: [
- 'When you disable notifs for a chat, Comm moves it out of your inbox into a separate Background tab. The Background tab is a core primitive in Comm, and helps you separate signal from noise.',
+ 'When you disable notifs for a chat, Comm moves it out of your inbox into a separate Muted tab. The Muted tab is a core primitive in Comm, and helps you separate signal from noise.',
],
},
{
diff --git a/lib/shared/thread-utils.js b/lib/shared/thread-utils.js
--- a/lib/shared/thread-utils.js
+++ b/lib/shared/thread-utils.js
@@ -1174,9 +1174,9 @@
// Consider updating itemHeight in native/chat/chat-thread-list.react.js
// if you change this
const emptyItemText: string =
- `Background chats are just like normal chats, except they don't ` +
+ `Muted chats are just like normal chats, except they don't ` +
`contribute to your unread count.\n\n` +
- `To move a chat over here, switch the “Background” option in its settings.`;
+ `To move a chat over here, switch the “Muted” option in its settings.`;
function threadNoun(threadType: ThreadType, parentThreadID: ?string): string {
if (threadType === threadTypes.SIDEBAR) {
diff --git a/native/chat/background-chat-thread-list.react.js b/native/chat/background-chat-thread-list.react.js
--- a/native/chat/background-chat-thread-list.react.js
+++ b/native/chat/background-chat-thread-list.react.js
@@ -4,6 +4,7 @@
import { Text, View } from 'react-native';
import { unreadBackgroundCount } from 'lib/selectors/thread-selectors.js';
+import { threadSettingsNotificationsCopy } from 'lib/shared/thread-settings-notifications-utils.js';
import {
threadInBackgroundChatList,
emptyItemText,
@@ -33,7 +34,7 @@
return;
}
prevUnreadNumber.current = unreadBackgroundThreadsNumber;
- let title = 'Background';
+ let title = threadSettingsNotificationsCopy.MUTED;
if (unreadBackgroundThreadsNumber !== 0) {
title += ` (${unreadBackgroundThreadsNumber})`;
}
diff --git a/native/chat/chat.react.js b/native/chat/chat.react.js
--- a/native/chat/chat.react.js
+++ b/native/chat/chat.react.js
@@ -116,13 +116,13 @@
MaterialTopTabNavigationHelpers<ScreenParamList>;
const homeChatThreadListOptions = {
- title: 'Focused',
+ title: threadSettingsNotificationsCopy.HOME,
tabBarIcon: ({ color }: { +color: string, ... }) => (
<SWMansionIcon name="home-1" size={22} style={{ color }} />
),
};
const backgroundChatThreadListOptions = {
- title: 'Background',
+ title: threadSettingsNotificationsCopy.MUTED,
tabBarIcon: ({ color }: { +color: string, ... }) => (
<SWMansionIcon name="bell-disabled" size={22} style={{ color }} />
),
diff --git a/native/profile/default-notifications-preferences.react.js b/native/profile/default-notifications-preferences.react.js
--- a/native/profile/default-notifications-preferences.react.js
+++ b/native/profile/default-notifications-preferences.react.js
@@ -9,6 +9,7 @@
setUserSettingsActionTypes,
} from 'lib/actions/user-actions.js';
import { registerFetchKey } from 'lib/reducers/loading-reducer.js';
+import { threadSettingsNotificationsCopy } from 'lib/shared/thread-settings-notifications-utils.js';
import {
type UpdateUserSettingsRequest,
type NotificationTypes,
@@ -154,19 +155,19 @@
<Text style={styles.header}>NOTIFICATIONS</Text>
<View style={styles.section}>
<NotificationRow
- content="Focused"
+ content={threadSettingsNotificationsCopy.HOME}
onPress={this.selectAllNotifications}
selected={notificationTypes.FOCUSED === selectedDefaultNotification}
/>
<NotificationRow
- content="Focused (badge only)"
+ content={threadSettingsNotificationsCopy.NOTIF_COUNT_ONLY}
onPress={this.selectBackgroundNotifications}
selected={
notificationTypes.BADGE_ONLY === selectedDefaultNotification
}
/>
<NotificationRow
- content="Background"
+ content={threadSettingsNotificationsCopy.MUTED}
onPress={this.selectNoneNotifications}
selected={
notificationTypes.BACKGROUND === selectedDefaultNotification
diff --git a/web/chat/chat-tabs.react.js b/web/chat/chat-tabs.react.js
--- a/web/chat/chat-tabs.react.js
+++ b/web/chat/chat-tabs.react.js
@@ -4,6 +4,7 @@
import * as React from 'react';
import { unreadBackgroundCount } from 'lib/selectors/thread-selectors.js';
+import { threadSettingsNotificationsCopy } from 'lib/shared/thread-settings-notifications-utils.js';
import css from './chat-tabs.css';
import ChatThreadList from './chat-thread-list.react.js';
@@ -11,27 +12,27 @@
import Tabs, { type TabData } from '../components/tabs.react.js';
import { useSelector } from '../redux/redux-utils.js';
-type TabType = 'Background' | 'Focus';
+type TabType = 'Home' | 'Muted';
function ChatTabs(): React.Node {
- let backgroundTitle = 'Background';
+ let mutedTitle = threadSettingsNotificationsCopy.MUTED;
const unreadBackgroundCountVal = useSelector(unreadBackgroundCount);
if (unreadBackgroundCountVal) {
- backgroundTitle += ` (${unreadBackgroundCountVal})`;
+ mutedTitle += ` (${unreadBackgroundCountVal})`;
}
const tabsData: $ReadOnlyArray<TabData<TabType>> = React.useMemo(
() => [
{
- id: 'Focus',
- header: 'Focused',
+ id: 'Home',
+ header: threadSettingsNotificationsCopy.HOME,
},
{
- id: 'Background',
- header: backgroundTitle,
+ id: 'Muted',
+ header: mutedTitle,
},
],
- [backgroundTitle],
+ [mutedTitle],
);
const threadListContext = React.useContext(ThreadListContext);
diff --git a/web/chat/chat-thread-list.react.js b/web/chat/chat-thread-list.react.js
--- a/web/chat/chat-thread-list.react.js
+++ b/web/chat/chat-thread-list.react.js
@@ -78,7 +78,7 @@
state => state.navInfo.chatMode === 'create',
);
- const isBackground = activeTab === 'Background';
+ const isMuted = activeTab === 'Muted';
const communityID = useSelector(state => state.communityPickerStore.chat);
@@ -135,7 +135,7 @@
const threadListContainer = React.useMemo(() => {
const items: Item[] = [{ type: 'search' }, ...threads];
- if (isBackground && threads.length === 0) {
+ if (isMuted && threads.length === 0) {
items.push({ type: 'empty' });
}
@@ -168,7 +168,7 @@
)}
</AutoSizer>
);
- }, [isBackground, threads]);
+ }, [isMuted, threads]);
return (
<>
diff --git a/web/chat/thread-list-provider.js b/web/chat/thread-list-provider.js
--- a/web/chat/thread-list-provider.js
+++ b/web/chat/thread-list-provider.js
@@ -25,7 +25,7 @@
activeChatThreadItem as activeChatThreadItemSelector,
} from '../selectors/chat-selectors.js';
-type ChatTabType = 'Focus' | 'Background';
+type ChatTabType = 'Home' | 'Muted';
type ThreadListContextType = {
+activeTab: ChatTabType,
+setActiveTab: (newActiveTab: ChatTabType) => void,
@@ -41,7 +41,7 @@
+children: React.Node,
};
function ThreadListProvider(props: ThreadListProviderProps): React.Node {
- const [activeTab, setActiveTab] = React.useState('Focus');
+ const [activeTab, setActiveTab] = React.useState('Home');
const activeChatThreadItem = useSelector(activeChatThreadItemSelector);
const activeThreadInfo = activeChatThreadItem?.threadInfo;
@@ -63,8 +63,8 @@
activeTopLevelThreadInfo?.currentUser.subscription.home;
const activeTopLevelThreadIsFromDifferentTab =
- (activeTab === 'Focus' && activeTopLevelThreadIsFromHomeTab) ||
- (activeTab === 'Background' && !activeTopLevelThreadIsFromHomeTab);
+ (activeTab === 'Home' && activeTopLevelThreadIsFromHomeTab) ||
+ (activeTab === 'Muted' && !activeTopLevelThreadIsFromHomeTab);
const activeTopLevelThreadIsInChatList = useIsThreadInChatList(
activeTopLevelThreadInfo,
@@ -78,7 +78,7 @@
const prevActiveThreadID = prevActiveThreadIDRef.current;
prevActiveThreadIDRef.current = activeThreadID;
if (activeThreadID !== prevActiveThreadID && shouldChangeTab) {
- setActiveTab(activeTopLevelThreadIsFromHomeTab ? 'Focus' : 'Background');
+ setActiveTab(activeTopLevelThreadIsFromHomeTab ? 'Home' : 'Muted');
}
}, [activeThreadID, shouldChangeTab, activeTopLevelThreadIsFromHomeTab]);
@@ -178,9 +178,7 @@
viewerID,
);
const threadFilter =
- activeTab === 'Background'
- ? threadInBackgroundChatList
- : threadInHomeChatList;
+ activeTab === 'Muted' ? threadInBackgroundChatList : threadInHomeChatList;
const chatListDataWithoutFilter = getThreadListSearchResults(
chatListData,
searchText,

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 26, 9:11 PM (21 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2586306
Default Alt Text
D12684.diff (12 KB)

Event Timeline