Skip to content

Conversation

GrabowskiM
Copy link
Contributor

@GrabowskiM GrabowskiM commented Sep 9, 2025

🎫 Issue IBX-10611

Related PRs:

Description:

direct iframe src:

http://localhost:8000/storybook/preview/formControls/RadioButtonField?properties=%7B%22id%22%3A%22default-input%22%2C%22label%22%3A%22Radio+Button+Label%22%2C%22name%22%3A%22default-input%22%2C%22value%22%3A%22radio-value%22%7D

For QA:

Documentation:

@GrabowskiM GrabowskiM requested review from mikadamczyk, a team and Copilot September 9, 2025 12:04
Copy link

@Copilot 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 implements a new RadioButton field component for the Ibexa design system by creating a radio button input component and its corresponding field wrapper. The implementation follows the established pattern used for other choice inputs like checkboxes.

  • Creates a new RadioButton input component with required value property
  • Adds a RadioButtonField form control component with label support
  • Refactors existing choice input components to use a shared base template for consistency

Reviewed Changes

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

Show a summary per file
File Description
RadioButton.php New radio button input component with value property and type method
RadioButtonField.php New form control wrapper that extends RadioButton with labeling capabilities
LabelledChoiceInputTrait.php New trait providing common labeling functionality for choice input fields
AbstractChoiceInput.php Enhanced base class with name, size, inputClass properties and abstract getType method
ThreeStateCheckbox.php, Checkbox.php Updated to implement getType method and add ExposeInTemplate import
Template files Refactored to use shared base templates and consistent component structure

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.


#[AsTwigComponent('ibexa:inputs:radio_button')]
final class RadioButton extends AbstractChoiceInput
class RadioButton extends AbstractChoiceInput
Copy link
Preview

Copilot AI Sep 9, 2025

Choose a reason for hiding this comment

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

The RadioButton class should be declared as final to maintain consistency with other input components like Checkbox and ThreeStateCheckbox.

Suggested change
class RadioButton extends AbstractChoiceInput
final class RadioButton extends AbstractChoiceInput

Copilot uses AI. Check for mistakes.

Base automatically changed from IBX-10636 to main September 10, 2025 06:31
@dew326 dew326 merged commit 175cb4f into main Sep 19, 2025
4 checks passed
@dew326 dew326 deleted the IBX-10611 branch September 19, 2025 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants