request: add modals
Mateo-tem opened this issue · comments
Is your feature request related to a problem? Please describe.
Be up to date on Discord Interactions, such as modal interactions.
Describe the solution you'd like
Add support for modals and text input components. Basically, is a pop-up form and I'd like (if possible) to write on text inputs.
It contains a Title, a warning, text inputs with a label, a 'Cancel' option and a 'Submit' button.
Describe alternatives you've considered
n/a
Additional context
n/a
I'm honestly not sure if I want to take this into the scope of this project. The thing with modals is that they are not really all that easy to code as UX may make them seem. We'd need to setup a z-index
priority, overlay styling, popper styling and more. Even the most simple Modal as described by W3School has a bunch of requirements: https://www.w3schools.com/howto/howto_css_modals.asp
Maybe once DiscordJS, the library we use for our bots, merges in modals and we can start using them we can come back to this because we can pull styles from the element inspector but until that time this is either stalled or open for PRs
Oh, no problem. It was like an idea because I was thinking about applying that for the modals section on the discord.js guide.
I think the animation opening the modal is not necessary, just like showing the opened modal. But that's in your hands and what you can do.
It was like an idea because I was thinking about applying that for the modals section on the discord.js guide.
DJS guide uses Sanc's library (https://github.com/Danktuary/discord-message-components/tree/main/packages/vue), not this one.
I think the animation opening the modal is not necessary
Animation can be done with pure CSS using transitions. It's more so that I have no idea what the CSS is and I want to wait for DJS to actually have modals that I can then use for testing and the dev tools to find the proper CSS. That's literally what most of the CSS in this lib is, copied straight from the Discord desktop client
Ohhh, right. I misread the package.json on discordjs/guide and I thought it said this library, sorry.