Skip to content
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

Add a dedicated form field for plain select fields #5470

Merged
merged 4 commits into from May 4, 2023

Conversation

BurntimeX
Copy link
Member

The existing SingleSelectionFormField has multiple design flaws that are difficult to solve in a backward compatible way. The main issue with the existing implementation is that it tries to solve too many problems at once, creating an API that is inconsistent and difficult to use / easy to misuse.

This is the first implementation with more to follow that will eventually allow us to phase out the SingleSelectionFormField.

Closes #5265
Closes #4789

The existing `SingleSelectionFormField` has multiple design flaws that are difficult to solve in a backward compatible way. The main issue with the existing implementation is that it tries to solve too many problems at once, creating an API that is inconsistent and difficult to use / easy to misuse.

This is the first implementation with more to follow that will eventually allow us to phase out the `SingleSelectionFormField`.

Closes #5265
Closes #4789
@BurntimeX BurntimeX requested a review from TimWolla May 3, 2023 16:07
@BurntimeX BurntimeX added this to Needs Triage in WoltLab Suite 6.0 via automation May 3, 2023
Convert the empty string to `null` immediately when reading the data to allow
custom validators to check for the `null` value instead of the empty string.
@BurntimeX BurntimeX merged commit 9324533 into master May 4, 2023
8 checks passed
WoltLab Suite 6.0 automation moved this from Needs Triage to Resolved May 4, 2023
@BurntimeX BurntimeX deleted the select-form-field branch May 4, 2023 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
WoltLab Suite 6.0
  
Resolved
2 participants