Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 21, 2026

Description

Addresses review feedback from PR #754 on modal radio/checkbox components. Key fixes:

  • Validation bug: Removed ComponentType.Checkbox from modal validation in two locations:
    • DiscordApiClient.cs: Removed from top-level modal component validation
    • DisCatSharpBuilder.cs: Removed from modal-only component types set
    • Checkboxes must be children of DiscordLabelComponent per Discord API requirements, not standalone modal components
  • Grammar: Fixed "then" → "than" in error messages
  • Documentation: Updated SubComponentType to reflect all attachable component types, not just text input and select. Added clarifying note about Checkbox component usage restrictions.
  • Consistency: Fixed XML doc formatting (tab/space inconsistencies) and indentation (spaces → tabs in converter)
  • Default value: Changed MinimumValues default from 1 to 0 in DiscordCheckboxGroupComponent to align with validation logic

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Solution builds successfully with no warnings
  • Code review passes with no issues
  • Validation logic verified to prevent invalid component configurations in both builders

Test Configuration:

  • .NET SDK: 8.0, 9.0, 10.0
  • Build configuration: Release

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

@Aiko-IT-Systems/discatsharp


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits January 21, 2026 03:24
Co-Authored-By: copilot-swe-agent[bot] <[email protected]>

Co-authored-by: Lulalaby <[email protected]>
Co-Authored-By: copilot-swe-agent[bot] <[email protected]>

Co-authored-by: Lulalaby <[email protected]>
Copilot AI changed the title [WIP] Add radio and checkbox group components for modals fix: address PR #754 review feedback - validation, grammar, and formatting Jan 21, 2026
Copilot AI requested a review from Lulalaby January 21, 2026 03:29
@Lulalaby
Copy link
Member

@copilot you still need to address #754 (review)

Checkboxes can only be children of DiscordLabelComponent, not top-level modal components. This fixes the validation to properly allow checkboxes only when nested in labels.

Co-Authored-By: copilot-swe-agent[bot] <[email protected]>

Co-authored-by: Lulalaby <[email protected]>
Copy link
Contributor Author

Copilot AI commented Jan 21, 2026

@copilot you still need to address #754 (review)

Addressed the sentry review in commit f3d6ff5. Removed ComponentType.Checkbox from s_modalOnlyComponentTypes in DisCatSharpBuilder.cs. Checkboxes are now correctly allowed only as children of DiscordLabelComponent, not as top-level modal components. The validation logic in DiscordApiClient.cs was already fixed in commit 5221ce2.

Co-Authored-By: copilot-swe-agent[bot] <[email protected]>

Co-authored-by: Lulalaby <[email protected]>
@Lulalaby Lulalaby marked this pull request as ready for review January 21, 2026 03:36
@Lulalaby Lulalaby requested a review from a team as a code owner January 21, 2026 03:36
@Lulalaby Lulalaby requested review from JMLutra and fthomys and removed request for a team January 21, 2026 03:36
@Lulalaby Lulalaby merged commit cb607f4 into feat/checkboxes Jan 21, 2026
1 check passed
@Lulalaby Lulalaby deleted the copilot/sub-pr-754 branch January 21, 2026 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants