-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(Settings): implement array types #3121
base: dev
Are you sure you want to change the base?
Conversation
also fixes some bugs lol
src/components/PluginSettings/components/SettingArrayComponent.tsx
Outdated
Show resolved
Hide resolved
…sts' into feat/api/SettingsLists
cda67bf
to
bc843c3
Compare
i tried to fix conflicts but borked smth :P |
Persistent review updated to latest commit 8674764 |
8674764
to
bc843c3
Compare
# Conflicts: # src/components/PluginSettings/PluginModal.tsx # src/plugins/index.ts # src/utils/types.ts
- switch from indices to IDs - make indexes for the channel view unique - Fix guilds shuffling around in the channel view by sorting them alphabetically - Fix possibility to add elements twice from search modal by allowing to hide already added items from the search modal - Remove invalid channels instead of just not rendering them.
const invalidChannels: string[] = []; | ||
|
||
for (const item of items) { | ||
const channel = ChannelStore.getChannel(item); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this account for channels the user cannot access? Honestly not sure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
honestly idk either
This PR implements: #615 #2210
New option types:
OptionType.ARRAY
OptionType.USERS
OptionType.CHANNELS
OptionType.GUILDS
these replace the previously used strings with separators.
Additionally, context menu entries are generated for all user, channel and guild options.
Since IDs are not user-friendly, this PR additionally implements a Modal replicating Discord's forwarding Modal to search for users/channels/guilds by text.