chore: strip emoji picker experiment

chore: use discrim
This commit is contained in:
Paul Makles 2023-06-11 18:36:07 +01:00
parent f20ada7c49
commit 636367faea
No known key found for this signature in database
GPG key ID: 5059F398521BB0F6
9 changed files with 58 additions and 33 deletions

2
external/components vendored

@ -1 +1 @@
Subproject commit 32f73acbd51ad11d25feaa42a0ebc93294dc7028 Subproject commit 4be02430c73bb4c69013a3b20b811c1391e1666d

2
external/revolt.js vendored

@ -1 +1 @@
Subproject commit cdc266ef164b43d715638cb895740155743d1529 Subproject commit 0c3da5fac33391e937d1631d2ba65d36c04425d6

View file

@ -119,19 +119,18 @@ export const MessageOverlayBar = observer(
</Tooltip> </Tooltip>
)} )}
{message.channel?.havePermission("React") && {message.channel?.havePermission("React") && (
state.experiments.isEnabled("picker") && ( <ReactionWrapper
<ReactionWrapper open={reactionsOpen}
open={reactionsOpen} setOpen={setReactionsOpen}
setOpen={setReactionsOpen} message={message}>
message={message}> <Tooltip content="React">
<Tooltip content="React"> <Entry>
<Entry> <HappyBeaming size={18} />
<HappyBeaming size={18} /> </Entry>
</Entry> </Tooltip>
</Tooltip> </ReactionWrapper>
</ReactionWrapper> )}
)}
{isAuthor && ( {isAuthor && (
<Tooltip content="Edit"> <Tooltip content="Edit">

View file

@ -29,9 +29,14 @@ const HeaderBase = styled.div`
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.new-name {
font-size: 16px;
font-weight: 600;
}
.username { .username {
cursor: pointer; cursor: pointer;
font-size: 16px; font-size: 13px;
font-weight: 600; font-weight: 600;
} }
@ -50,6 +55,9 @@ export default observer(({ user }: Props) => {
return ( return (
<Header topBorder palette="secondary"> <Header topBorder palette="secondary">
<HeaderBase> <HeaderBase>
<div className="new-name">
{user.display_name ?? user.username}
</div>
<Localizer> <Localizer>
<Tooltip content={<Text id="app.special.copy_username" />}> <Tooltip content={<Text id="app.special.copy_username" />}>
<span <span
@ -57,7 +65,9 @@ export default observer(({ user }: Props) => {
onClick={() => onClick={() =>
modalController.writeText(user.username) modalController.writeText(user.username)
}> }>
@{user.username} {user.username}
{"#"}
{user.discriminator}
</span> </span>
</Tooltip> </Tooltip>
</Localizer> </Localizer>

View file

@ -20,7 +20,7 @@ import {
} from "preact-context-menu"; } from "preact-context-menu";
import { Text } from "preact-i18n"; import { Text } from "preact-i18n";
import { IconButton, LineDivider } from "@revoltchat/ui"; import { Column, IconButton, LineDivider } from "@revoltchat/ui";
import { useApplicationState } from "../mobx/State"; import { useApplicationState } from "../mobx/State";
import { QueuedMessage } from "../mobx/stores/MessageQueue"; import { QueuedMessage } from "../mobx/stores/MessageQueue";
@ -1142,7 +1142,21 @@ export default function ContextMenus() {
content={ content={
<Text id="app.special.copy_username" /> <Text id="app.special.copy_username" />
}> }>
@{user.username} <Column gap="0">
<span>
{user.display_name ??
user.username}
</span>
<span
style={{
fontSize: "0.8em",
}}>
{user.username}
{"#"}
{user.discriminator ??
"0000"}
</span>
</Column>
</Tooltip> </Tooltip>
</div> </div>
<div <div

View file

@ -77,10 +77,6 @@ export default class Changelog implements Store, Persistent<Data>, Syncable {
runInAction(() => { runInAction(() => {
this.viewed = latestChangelog; this.viewed = latestChangelog;
}); });
} else {
modalController.push({
type: "changelog_usernames",
});
} }
} }
} }

View file

@ -10,7 +10,7 @@ import Store from "../interfaces/Store";
/** /**
* Union type of available experiments. * Union type of available experiments.
*/ */
export type Experiment = "dummy" | "offline_users" | "plugins" | "picker"; export type Experiment = "dummy" | "offline_users" | "plugins";
/** /**
* Currently active experiments. * Currently active experiments.
@ -19,7 +19,6 @@ export const AVAILABLE_EXPERIMENTS: Experiment[] = [
"dummy", "dummy",
"offline_users", "offline_users",
"plugins", "plugins",
"picker",
]; ];
/** /**
@ -42,11 +41,6 @@ export const EXPERIMENTS: {
description: description:
"This will enable the experimental plugin API. Only touch this if you know what you're doing.", "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 { export interface Data {

View file

@ -79,7 +79,6 @@ export default observer(() => {
id: "emojis", id: "emojis",
icon: <HappyBeaming size={20} />, icon: <HappyBeaming size={20} />,
title: <Text id="app.settings.server_pages.emojis.title" />, title: <Text id="app.settings.server_pages.emojis.title" />,
hidden: !state.experiments.isEnabled("picker"),
}, },
{ {
category: ( category: (

View file

@ -80,10 +80,15 @@ const AccountHeader = styled.div`
font-size: 12px; font-size: 12px;
gap: 2px; gap: 2px;
> span { .new {
font-size: 20px; font-size: 20px;
font-weight: 600; font-weight: 600;
} }
.full {
font-size: 14px;
font-weight: 600;
}
} }
} }
@ -336,7 +341,15 @@ export default observer(() => {
onClick={() => openContextMenu("Status")} onClick={() => openContextMenu("Status")}
/> />
<div className="details"> <div className="details">
<Username user={client.user!} prefixAt /> <span className="new">
{client.user.display_name ??
client.user.username}
</span>
<span className="full">
{client.user.username}
{"#"}
{client.user.discriminator}
</span>
<UserStatus user={client.user!} /> <UserStatus user={client.user!} />
</div> </div>
</div> </div>