discord / discord-api-docs

Official Discord API Documentation
https://discord.com/developers/docs/intro
Other
5.9k stars 1.25k forks source link

Documentation on textinputs incomplete #6318

Open FisbanRegner opened 1 year ago

FisbanRegner commented 1 year ago

Description

In https://discord.com/developers/docs/interactions/message-components textinputs is very brief and seems to missing information that the other components offer. How many text inputs per action row, how many action per modal, what components aren't allowed in a modal, what are modal limitations. Also when viewed in some web browsers the text input styles are cut off only listing short as an option. This is mostly on moble platforms as the bottom of the page is cutoff. I was able to find the information I needed on the discordjs guide but I feel text inputs and modals should have the same clarity as buttons and select menus

Steps to Reproduce

Visit https://discord.com/developers/docs/interactions/message-components on android devices and scroll to bottom of page.

Expected Behavior

More documentation on modals and text inputs

Current Behavior

Limited information on text inputs

Screenshots/Videos

No response

Client and System Information

Chrome on android os

kkrypt0nn commented 1 year ago

How many text inputs per action row

"between 1 and 5 (inclusive) components that make up the modal"

what components aren't allowed in a modal

"Support for components in modals is currently limited to type 4 (Text Input)."

what are modal limitations

Described above - Same for the maximum length of the title (45 characters) and the custom ID (100 characters).

Also when viewed in some web browsers the text input styles are cut off only listing short as an option.

While I agree, you can always zoom in a mobile browser and then you'll see everything.

I feel text inputs and modals should have the same clarity as buttons and select menus

Text inputs do, they don't really need more clarity. A modal is not a component but rather a type of interaction response composed of multiple text input components - so they don't belong to the "Message Components" page.

FisbanRegner commented 1 year ago

So does modals have there own page? Because I would like to know the limitations, is it the same as messages allowing only 5 action rows? Does it allow the use of embeds, I just feel like the modal is very unknown own. I understand it does belong with components but it's mentioned there should At least have a link for its respective page/pages

FisbanRegner commented 1 year ago

Yeah I haven't seen this page before on modals I see the page now I was unable to find this before as searching doesn't work well on android

Rapptz commented 1 year ago

Modal components still need to be in an action row, but you can only have 1 text input per action row since it has an internal width of 5. This fact is not documented, as you mentioned. Same with the other internal widths I believe.