Skip to content

Conversation

@KubaZ2
Copy link
Member

@KubaZ2 KubaZ2 commented Jan 2, 2026

ComponentSectionProperties now uses IComponentSectionComponentProperties instead of TextDisplayProperties, allowing sections to contain any compatible component type. Updated constructors, properties, methods, and interfaces accordingly. TextDisplayProperties now implements the new interface and supports proper serialization. This generalizes and extends the section component model.

ComponentSectionProperties now uses IComponentSectionComponentProperties instead of TextDisplayProperties, allowing sections to contain any compatible component type. Updated constructors, properties, methods, and interfaces accordingly. TextDisplayProperties now implements the new interface and supports proper serialization. This generalizes and extends the section component model.
@github-actions
Copy link

github-actions bot commented Jan 2, 2026

The documentation preview is available at https://preview.netcord.dev/239.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the component section model to use interface-based typing instead of concrete types. The ComponentSectionProperties class now accepts IComponentSectionComponentProperties instead of TextDisplayProperties, while TextDisplayProperties implements this new interface with proper serialization support.

  • Introduced IComponentSectionComponentProperties interface implementation to TextDisplayProperties
  • Updated ComponentSectionProperties to use IComponentSectionComponentProperties throughout its API
  • Maintained backward compatibility through interface implementation while enabling future extensibility

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
NetCord/Rest/ComponentProperties/TextDisplayProperties.cs Implements IComponentSectionComponentProperties interface and adds corresponding serialization method
NetCord/Rest/ComponentProperties/ComponentSectionProperties.cs Refactors all references from concrete TextDisplayProperties type to interface type IComponentSectionComponentProperties in constructor, properties, methods, and internal interfaces

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@KubaZ2 KubaZ2 merged commit f418995 into alpha Jan 2, 2026
7 checks passed
@KubaZ2 KubaZ2 deleted the feature/future-proof-section branch January 2, 2026 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants