From 636367faeaca8957092c3be741ef40a1fef71de2 Mon Sep 17 00:00:00 2001 From: Paul Makles Date: Sun, 11 Jun 2023 18:36:07 +0100 Subject: [PATCH] chore: strip emoji picker experiment chore: use discrim --- external/components | 2 +- external/revolt.js | 2 +- .../messaging/bars/MessageOverlayBar.tsx | 25 +++++++++---------- src/components/common/user/UserHeader.tsx | 14 +++++++++-- src/lib/ContextMenus.tsx | 18 +++++++++++-- src/mobx/stores/Changelog.ts | 4 --- src/mobx/stores/Experiments.ts | 8 +----- src/pages/settings/ServerSettings.tsx | 1 - src/pages/settings/Settings.tsx | 17 +++++++++++-- 9 files changed, 58 insertions(+), 33 deletions(-) diff --git a/external/components b/external/components index 32f73acb..4be02430 160000 --- a/external/components +++ b/external/components @@ -1 +1 @@ -Subproject commit 32f73acbd51ad11d25feaa42a0ebc93294dc7028 +Subproject commit 4be02430c73bb4c69013a3b20b811c1391e1666d diff --git a/external/revolt.js b/external/revolt.js index cdc266ef..0c3da5fa 160000 --- a/external/revolt.js +++ b/external/revolt.js @@ -1 +1 @@ -Subproject commit cdc266ef164b43d715638cb895740155743d1529 +Subproject commit 0c3da5fac33391e937d1631d2ba65d36c04425d6 diff --git a/src/components/common/messaging/bars/MessageOverlayBar.tsx b/src/components/common/messaging/bars/MessageOverlayBar.tsx index f17dcbfd..29735102 100644 --- a/src/components/common/messaging/bars/MessageOverlayBar.tsx +++ b/src/components/common/messaging/bars/MessageOverlayBar.tsx @@ -119,19 +119,18 @@ export const MessageOverlayBar = observer( )} - {message.channel?.havePermission("React") && - state.experiments.isEnabled("picker") && ( - - - - - - - - )} + {message.channel?.havePermission("React") && ( + + + + + + + + )} {isAuthor && ( diff --git a/src/components/common/user/UserHeader.tsx b/src/components/common/user/UserHeader.tsx index 1c442799..e29d9432 100644 --- a/src/components/common/user/UserHeader.tsx +++ b/src/components/common/user/UserHeader.tsx @@ -29,9 +29,14 @@ const HeaderBase = styled.div` text-overflow: ellipsis; } + .new-name { + font-size: 16px; + font-weight: 600; + } + .username { cursor: pointer; - font-size: 16px; + font-size: 13px; font-weight: 600; } @@ -50,6 +55,9 @@ export default observer(({ user }: Props) => { return (
+
+ {user.display_name ?? user.username} +
}> { onClick={() => modalController.writeText(user.username) }> - @{user.username} + {user.username} + {"#"} + {user.discriminator} diff --git a/src/lib/ContextMenus.tsx b/src/lib/ContextMenus.tsx index 2a4ce73d..fe99a232 100644 --- a/src/lib/ContextMenus.tsx +++ b/src/lib/ContextMenus.tsx @@ -20,7 +20,7 @@ import { } from "preact-context-menu"; import { Text } from "preact-i18n"; -import { IconButton, LineDivider } from "@revoltchat/ui"; +import { Column, IconButton, LineDivider } from "@revoltchat/ui"; import { useApplicationState } from "../mobx/State"; import { QueuedMessage } from "../mobx/stores/MessageQueue"; @@ -1142,7 +1142,21 @@ export default function ContextMenus() { content={ }> - @{user.username} + + + {user.display_name ?? + user.username} + + + {user.username} + {"#"} + {user.discriminator ?? + "0000"} + +
, Syncable { runInAction(() => { this.viewed = latestChangelog; }); - } else { - modalController.push({ - type: "changelog_usernames", - }); } } } diff --git a/src/mobx/stores/Experiments.ts b/src/mobx/stores/Experiments.ts index 63df9811..b38ae0b5 100644 --- a/src/mobx/stores/Experiments.ts +++ b/src/mobx/stores/Experiments.ts @@ -10,7 +10,7 @@ import Store from "../interfaces/Store"; /** * Union type of available experiments. */ -export type Experiment = "dummy" | "offline_users" | "plugins" | "picker"; +export type Experiment = "dummy" | "offline_users" | "plugins"; /** * Currently active experiments. @@ -19,7 +19,6 @@ export const AVAILABLE_EXPERIMENTS: Experiment[] = [ "dummy", "offline_users", "plugins", - "picker", ]; /** @@ -42,11 +41,6 @@ export const EXPERIMENTS: { description: "This will enable the experimental plugin API. Only touch this if you know what you're doing.", }, - picker: { - title: "Custom Emoji", - description: - "This will enable a work-in-progress emoji picker, custom emoji settings and a reaction picker.", - }, }; export interface Data { diff --git a/src/pages/settings/ServerSettings.tsx b/src/pages/settings/ServerSettings.tsx index 6cd688a7..893dba32 100644 --- a/src/pages/settings/ServerSettings.tsx +++ b/src/pages/settings/ServerSettings.tsx @@ -79,7 +79,6 @@ export default observer(() => { id: "emojis", icon: , title: , - hidden: !state.experiments.isEnabled("picker"), }, { category: ( diff --git a/src/pages/settings/Settings.tsx b/src/pages/settings/Settings.tsx index 18566e5c..fa068c5f 100644 --- a/src/pages/settings/Settings.tsx +++ b/src/pages/settings/Settings.tsx @@ -80,10 +80,15 @@ const AccountHeader = styled.div` font-size: 12px; gap: 2px; - > span { + .new { font-size: 20px; font-weight: 600; } + + .full { + font-size: 14px; + font-weight: 600; + } } } @@ -336,7 +341,15 @@ export default observer(() => { onClick={() => openContextMenu("Status")} />
- + + {client.user.display_name ?? + client.user.username} + + + {client.user.username} + {"#"} + {client.user.discriminator} +