feat(app): give the topic and bio composers channel-aware autocomplete (#2002)

This commit is contained in:
Hampus authored and GitHub committed 2026-08-25 12:57:18 +02:00
1 parent 1153327c75
commit 2ca756d219
5 files changed
+25 -14

No files matched your search

@@ -4,7 +4,6 @@ import styles from '@app/features/channel/components/modals/channel_tabs/Channel
import {
type FormInputs,
MAX_TOPIC_LENGTH,
TOPIC_AUTOCOMPLETE_TRIGGERS,
} from '@app/features/channel/components/modals/channel_tabs/channel_overview_tab/shared';
import type {Channel} from '@app/features/channel/models/Channel';
import type {FlatEmoji} from '@app/features/emoji/types/EmojiTypes';
@@ -292,7 +291,7 @@ export const ChannelOverviewTopicEditor = observer(
placeholder={i18n._(ADD_A_TOPIC_TO_THIS_CHANNEL_DESCRIPTOR)}
disabled={false}
channel={channel}
allowedTriggers={[...TOPIC_AUTOCOMPLETE_TRIGGERS]}
allowSpecialMentions={false}
markdown={true}
markdownParserFlags={TOPIC_MARKDOWN_PARSER_FLAGS}
singleLine={false}
@@ -1,7 +1,6 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
import type {ChannelRtcRegion} from '@app/features/channel/commands/ChannelCommands';
import type {TriggerType} from '@app/features/messaging/utils/AutocompleteTriggerPolicy';
import type {ComboboxOption} from '@app/features/ui/components/form/FormCombobox';
import {VOICE_CHANNEL_BITRATE_MAX, VOICE_CHANNEL_BITRATE_MIN} from '@fluxer/constants/src/LimitConstants';
@@ -24,7 +23,6 @@ export const BITRATE_KBPS_MIN = VOICE_CHANNEL_BITRATE_MIN / 1000;
export const BITRATE_KBPS_MAX = VOICE_CHANNEL_BITRATE_MAX / 1000;
export const BITRATE_KBPS_MARKERS: ReadonlyArray<number> = [BITRATE_KBPS_MIN, 64, 128, 256, BITRATE_KBPS_MAX];
export const MAX_TOPIC_LENGTH = 1024;
export const TOPIC_AUTOCOMPLETE_TRIGGERS: Array<TriggerType> = ['emoji', 'mention', 'channel'];
export interface RtcRegionOption extends ComboboxOption<string | null> {
region: ChannelRtcRegion | null;