Most Wanted Features for Modals #5883
-
Why did I open this discussion?I did because there are a lot of discussions for modals. I want to collect them and show my ideas about them. Most Wanted Features for ModalsAttachment Component
Related Discussions
Description / Use Cases
Concept DesignMade by @Tolga1452 Example Code{
"title": "My Cool Modal",
"custom_id": "cool_modal",
"components": [{
"type": 0, // a new type for attachment components
"custom_id": "file",
"label": "Upload a file",
"required": true
}]
} Number Input Component
Related Discussions
Description / Use Cases
Concept DesignMade by @Tolga1452 Example Code{
"title": "My Cool Modal",
"custom_id": "cool_modal",
"components": [{
"type": 0, // a new type for number input components
"custom_id": "number",
"label": "Enter a number between 0 and 100",
"min_value": 0,
"max_value": 100,
"default_value": 20,
"required": true
}]
} Boolean Component
Related Discussions
Description / Use Cases
My IdeasI named it "Boolean Component" because I think checkboxes, switches, and radio switches should be styles of the same component (like buttons). Because they have different purposes but they have the same value. For example; checkboxes are generally used for selecting, and switches are generally used for enabling/disabling. And they are returning with a boolean. Also, radio switches couldn't return with Concept DesignsMade by @Tolga1452 Example Code{
"title": "My Cool Modal",
"custom_id": "cool_modal",
"components": [
{
"type": 0, // a new type for boolean components
"custom_id": "sure",
"label": "Are you sure?",
"style": 1, // 1 for checkbox style
"required": true
},
{
"type": 0, // a new type for boolean components
"custom_id": "enable",
"label": "Just enable it.",
"style": 2, // 2 for switch style
"required": true
},
{
"type": 0, // a new type for boolean components
"custom_id": "manage_messages",
"label": "Manage Messages Permission",
"style": 3, // 3 for radio switch style
"required": true
}
]
} Text Display Component
Related Discussions
Description / Use CasesThis will allow you to add regular texts inside modals. My IdeasLabels are really a good idea for confirmation modals. So I think there could be no warning for label-only modals because you can't send anything with them. Also "Submit" button could be an "Okay" button. Concept DesignMade by @Tolga1452 Example Code{
"title": "My Cool Modal",
"custom_id": "cool_modal",
"components": [{
"type": 10, // type 10 for text display components
"content": "# This is a header\nAnd here is some other text\n\n- here is some more markdown\n- even ||spoilers|| and `codes`\n- https://discord.com is a link\n - and emojis! ✨🔥🎉"
}]
} Select Components
Related Discussions
Description / Use CasesThis will allow you to add Select Menu Components inside modals. Concept DesignOfficial concept image taken from #7773 Example Code{
"title": "My Cool Modal",
"custom_id": "cool_modal",
"components": [{
"type": 18, // type 18 for label component
"label": "Favorite Color",
"description": "What is your favorite color?",
"component": {
"type": 3, // type 3, 5, 6, 7 or 8 for select components
"custom_id": "color",
"placeholder": "Select a color...",
"required": true,
"options": [
{
"label": "Red",
"value": "red"
},
{
"label": "Blue",
"value": "blue"
},
{
"label": "Orange",
"value": "orange"
}
]
}
}]
} Pagination
Related DiscussionsNone. Description / Use CasesMost people want to make pages for modals or add more components to a modal. As all of you know, we can only add up to 5 action rows into a modal right now. But we can add more components with pagination. And I think pages should be set automatically. So if you put 7 action rows in a modal, it will have 2 pages. The first has 5 (max), and the second has 2 action rows. Then you don't need to make any changes on your code. Concept DesignMade by @Tolga1452 Color Picker Component
Related DiscussionsNone. Description / Use CasesA color picker component would be useful for some customization options and more. Especially it would be helpful for people who don't have much knowledge about color codes. Just click on it and select your color! Concept DesignMade by @Zyrenth Example Code{
"title": "My Cool Modal",
"custom_id": "cool_modal",
"components": [{
"type": 0, // a new type for color picker component
"custom_id": "color",
"label": "Select your profile color.",
"description": "Profile Color", // this will be displayed under the color picker box, maybe it can be "name" or "label" instead of "description"
"required": true
}]
} Autocompletion for Emojis and Mentions
Related DiscussionsDescription / Use CasesDiscord has built-in autocompletion for emojis and mentions in chat input, but you can't use it in modals. If you want to type an emoji then you have to close the modal, type the emoji, and copy it with its id. Same problem with mentions. This makes it harder to use modals. Date Picker Component
Related Discussions
Description / Use CasesA date picker inside modals could be a good feature for the general usage of modals. My IdeasDiscord already has built-in date pickers. For example you can find one while creating an event. But these only allow you to select a date and time. I think a relative date selection can also be a good idea. For example you used a reminder command to remind you of a message after 5 hours and the For regular date pickers; Also style Concept DesignMade by @Tolga1452 Example Code{
"title": "My Cool Modal",
"custom_id": "cool_modal",
"components": [
{
"type": 0, // a new type for date picker component
"custom_id": "date_only",
"label": "A Date Picker",
"style": 1, // style 1 for the date only picker
"required": true
},
{
"type": 0, // a new type for date picker component
"custom_id": "date_and_time",
"label": "A Date Picker With Time"",
"style": 2 // style 2 for the date and time pickers
"required": true
},
{
"type": 0, // a new type for date picker component
"custom_id": "relative",
"label": "A Relative Date Picker",
"style": 3 // style 3 for the relative date picker
"required": true
}
]
} |
Beta Was this translation helpful? Give feedback.
Replies: 67 comments 29 replies
-
👌 |
Beta Was this translation helpful? Give feedback.
-
I would like to mention that my concept includes labels as a button style, too. And you forgot modal pages. |
Beta Was this translation helpful? Give feedback.
-
I'd absolutely love to see at least some of these features make it into the API |
Beta Was this translation helpful? Give feedback.
-
Boolean component was confirmed to be the planned by @kingmigdor |
Beta Was this translation helpful? Give feedback.
-
I'd like to suggest multiSelect components. |
Beta Was this translation helpful? Give feedback.
-
Man I really hope they add some new stuff to Modals.. |
Beta Was this translation helpful? Give feedback.
-
Seriously, any kind of dev feedback on this would be greatly appreciated. Even just Buttons and Selectors (but preferably also Pagination) would solve making forms viable. Alternatively, making InputText allowed in messages would also solve this, even if in a kind of ugly way. The current state of things is incredibly frustrating as a new dev. |
Beta Was this translation helpful? Give feedback.
-
I agree with everything people are saying. I built an integrated dashboard for my bot with modals buttons and selects because the tools are so powerful. BUT, I was really restricted with modals. Everything else is great! I really feel like Discord should prioritize this. Bots are what make Discord a one-size-fits-all in my opinion, but in their current state, they're bulky to use. I think this would be a major step forward. |
Beta Was this translation helpful? Give feedback.
-
I would like to see these make it into an update, it would be really useful. Also, I thought a color picker could be helpful as well so I made a concept for that one as well. |
Beta Was this translation helpful? Give feedback.
-
bump |
Beta Was this translation helpful? Give feedback.
-
This definitely needs to be answered by a dev. |
Beta Was this translation helpful? Give feedback.
-
This is actually getting old. Do we have any ETA for deploying the planned features? |
Beta Was this translation helpful? Give feedback.
-
I would love to see this implemented as well along with these modal upgrades: #5291 (Allow the use of Mentions and Emojis in Modals) |
Beta Was this translation helpful? Give feedback.
-
Much needed! I hope the API developers consider some of these suggestions. Would definitely improve the usability and applicability of Modals. |
Beta Was this translation helpful? Give feedback.
-
I definitely see potential here with these features for modals. I already had ideas for chechboxes usage but was let down it's not implemented :( Just text fields for modals are boring. |
Beta Was this translation helpful? Give feedback.
-
+9001 Maybe someday guys... maybe some day... |
Beta Was this translation helpful? Give feedback.
-
+1 |
Beta Was this translation helpful? Give feedback.
-
It would also make sense to include a roles/user/channel select, given that these are already part of dropdowns or slash commands. |
Beta Was this translation helpful? Give feedback.
-
+1 Absolutely. |
Beta Was this translation helpful? Give feedback.
-
Even just adding selection menus (like the already possible list selections in messages) would be a great step in the right direction. The current system of modals is very clunky, especially when you start needing Text and Selection input/buttons. |
Beta Was this translation helpful? Give feedback.
-
So long, and still nothing done 😔 |
Beta Was this translation helpful? Give feedback.
-
It's been a long while and I have finally updated the discussion post again! Here is a list of notable changes:
|
Beta Was this translation helpful? Give feedback.
-
I feel this is worth mentioning, as I don't think anyone else in this discussion has requested this feature specifically. Having a time picker without the date portion would be extremely useful. I maintain a bot that makes it easy for streamers to update their weekly schedule. Having the ability to configure the time (and presumably send the timezone along with the interaction) without needing to input a time string would make this far more intuitive. |
Beta Was this translation helpful? Give feedback.
-
#7773 WOOO |
Beta Was this translation helpful? Give feedback.
-
We got some good news, modals are finally getting updates! There is a pull request to Discord API Docs (#7773) that introduces a new Label component for modals, which allows us to use String Select in modals! I have updated the Select Components section according to the latest news we officially got. |
Beta Was this translation helpful? Give feedback.
-
We've just released support for String Selects in modals, as well as a new top-level Label component that supports descriptions! |
Beta Was this translation helpful? Give feedback.
-
My number 1 most wanted component for modals: a rich text/markdown input. Basically, an embeddable version of the Discord message interface. My use case? My bot (in a hundred-ish servers) has a "mod statement" feature so that mods can issue statements anonymously, entering a custom message and having it displayed in a big, eye-catching embed so people can't miss it. And for the slash command variant, everything's fine. But I also have a report system for users to flag messages for mod attention, and those reports include select menus for common actions - such as making statements. This is where the vast majority of statements get made. If someone picks "Issue a statement" in that select menu, it opens a modal with a text input so they can type out the statement. Problem is, mods often want to do things like mention channels or users or roles. In fact, they almost always do. But they can't do that easily, because the only way it works is if they manually type the channel or user name, perfectly, so that my bot can then replace that text with an appropriate mention. Markdown works, since the content is rendered in an embed, but even that's not a great user experience because there's no visual preview or formatting tools, like there is when writing a new message normally. If I could switch out the plain text for a version of that message interface, the user experience would be vastly improved. Also, I'm surprised User/Channel/Role selects aren't a primary request in this discussion thread. But hopefully they're coming next. That's number 2 on my list. |
Beta Was this translation helpful? Give feedback.
-
Create a "Date Component", like a calendar. Bots/Apps use tons of Date method. |
Beta Was this translation helpful? Give feedback.
-
Improved Components
New Components
New Modal FeaturesI'd love to be able to return a "rejected" modal with custom validation reasons. The current way to do this is to store (in a db) or encode (into the message) the user's last response, tell them what they did wrong, have them click a button to open the modal again with their previous answers pre-filled, and hope they fix their mistake(s). This is not a very pleasant UX, unfortunately. I'd love to be able to reject the modal natively without workarounds like this! |
Beta Was this translation helpful? Give feedback.
-
An option for the user to specify an emoji with the short text component would be really useful. This corresponds closely to string select menu options which supports an emoji, allowing us to more easily offer users customisable interfaces with string select menus. |
Beta Was this translation helpful? Give feedback.
We've just released support for String Selects in modals, as well as a new top-level Label component that supports descriptions!
https://discord.com/developers/docs/change-log#introducing-new-modal-components