Skip to content

Commit

Permalink
Remove comment
Browse files Browse the repository at this point in the history
  • Loading branch information
synzen committed Feb 15, 2025
1 parent 3ff1610 commit f6e0406
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { PropsWithChildren } from "react";
import { notifyInfo } from "../../utils/notifyInfo";

interface Props {
withBraces?: boolean;
withBrackets?: boolean;
withoutCopy?: boolean;
}

const MessagePlaceholderText = ({
children,
withBraces,
withBrackets,
withoutCopy,
}: PropsWithChildren<Props>) => {
const onCopy = () => {
Expand All @@ -23,11 +23,11 @@ const MessagePlaceholderText = ({
return (
<Flex alignItems="center" display="inline">
<Code>
{withBraces && <chakra.span srOnly>double open curly brackets</chakra.span>}
{withBraces && <chakra.span aria-hidden>{"{{"}</chakra.span>}
{withBrackets && <chakra.span srOnly>double open curly brackets</chakra.span>}
{withBrackets && <chakra.span aria-hidden>{"{{"}</chakra.span>}
{children}
{withBraces && <chakra.span aria-hidden>{"}}"}</chakra.span>}
{withBraces && <chakra.span srOnly>double close curly brackets</chakra.span>}
{withBrackets && <chakra.span aria-hidden>{"}}"}</chakra.span>}
{withBrackets && <chakra.span srOnly>double close curly brackets</chakra.span>}
</Code>
{!withoutCopy && (
<Button srOnly size="xs" variant="ghost" colorScheme="gray" marginLeft="2" onClick={onCopy}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ interface Props {
const PlaceholderRow = ({
placeholderKey,
value,
withBraces,
withBrackets,
withoutCopy,
}: {
placeholderKey: string;
value: string;
withBraces?: boolean;
withBrackets?: boolean;
withoutCopy?: boolean;
}) => {
return (
Expand All @@ -45,7 +45,7 @@ const PlaceholderRow = ({
>
<Td>
<HStack width="auto">
<MessagePlaceholderText withoutCopy={withoutCopy} withBraces={withBraces}>
<MessagePlaceholderText withoutCopy={withoutCopy} withBrackets={withBrackets}>
{placeholderKey}
</MessagePlaceholderText>
</HStack>
Expand Down Expand Up @@ -131,7 +131,7 @@ export const ArticlePlaceholderTable = ({
key={key}
placeholderKey={placeholderKey}
value={value}
withBraces={asPlaceholders}
withBrackets={asPlaceholders}
withoutCopy={withoutCopy}
/>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export const DiscordMessageMentionForm = ({ guildId }: Props) => {
<Trans
i18nKey="components.discordMessageMentionForm.description"
t={t}
components={[<MessagePlaceholderText />]}
components={[<MessagePlaceholderText withBrackets />]}
/>
</Text>
<Controller
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export const DiscordMessagePlaceholderLimitsForm = () => {
return (
<Tr key={field.placeholder}>
<Td>
<MessagePlaceholderText withBraces>
<MessagePlaceholderText withBrackets>
{field.placeholder}
</MessagePlaceholderText>
</Td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ export const PlaceholderLimitDialog = ({
{t("common.buttons.cancel")}
</Button>
<Button
// isDisabled={!isDirty || isSubmitting}
aria-disabled={isSubmitting}
colorScheme="blue"
type="submit"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@
},
"discordMessageMentionForm": {
"title": "Mentions",
"description": "Roles and users that will be mentioned in the <0>discord::mentions</0> placeholder. Directly copy <0>discord::mentions</0> and paste it somewhere in your message format for it to show up.",
"description": "Roles and users that will be mentioned in the <0>discord::mentions</0> placeholder. Directly copy the placeholder paste it somewhere in your message format for it to show up.",
"mentionSettingsTitle": "Mention Settings",
"mentionFiltersTitle": "Filters",
"mentionFiltersDescription": "Filters ensure that this mention will only be added to articles that match these filters. If no filters are added, this mention will be added to all articles that have the mention placeholder.",
Expand Down

0 comments on commit f6e0406

Please sign in to comment.