Skip to content

Label and Select Menu support for Modals #1377

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

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

valzargaming
Copy link
Member

@valzargaming valzargaming commented Aug 7, 2025

This pull request introduces support for Discord's new Label component and updates the modal component structure to reflect Discord's latest standards. The main changes include the addition of the Label component, deprecation of ActionRow usage in modals, and updates to select menus and text inputs to support modal requirements. These changes modernize the component system and improve compatibility with Discord's evolving API.

Component System Updates

  • Added the new Label component as a top-level container for modals, including its implementation in both builders (Label.php) and message parts (Label.php). [1] [2]
  • Registered TYPE_LABEL in the component type constants and mapping, enabling its use throughout the codebase. [1] [2]

Modal Structure Changes

  • Deprecated the use of ActionRow as a top-level container in modals; documentation and code comments now recommend using Component::Label instead. [1] [2]
  • Updated interaction handling logic to support both Label and ActionRow containers when processing modal submissions.

Select Menu and Text Input Enhancements

  • Added support for required select menus in modals, including validation and serialization logic, and exposed setRequired on StringSelect. [1] [2] [3]
  • Deprecated the label property on TextInput for modals, making it optional and updating constructors and serialization accordingly. [1] [2] [3] [4] [5]

Minor Improvements

  • Improved docblocks and error handling for select menu validation, and clarified usage contexts for components. [1] [2] [3] [4]

@valzargaming valzargaming changed the title Select Menu support for Modals Label and Select Menu support for Modals Aug 7, 2025
@valzargaming valzargaming added api changes wait for discord Waiting for release by discord labels Aug 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api changes wait for discord Waiting for release by discord
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant