Skip to content

chore: mark parameters as required #17551

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

Merged
merged 2 commits into from
Apr 24, 2025

Conversation

jaaydenh
Copy link
Contributor

@jaaydenh jaaydenh commented Apr 23, 2025

This adds a red asterisk next to a parameter name if it is required and marks passes the parameter required value to input and textarea form controls.

The multi-select combobox needs additional work (in a separate PR) so that it can handle the required prop correctly for form submit.

Screenshot 2025-04-24 at 00 02 10

@jaaydenh jaaydenh self-assigned this Apr 23, 2025
@@ -95,8 +95,12 @@ const ParameterLabel: FC<ParameterLabelProps> = ({ parameter, isPreset }) => {

<div className="flex flex-col w-full gap-1">
<Label className="flex gap-2 flex-wrap text-sm font-medium">
{displayName}

<span className="flex">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

For now, I decided to add the required asterisk for all parameters even though it really doesn't make sense for (checkbox, slider, radio, switch) since all parameters have the required prop.

@jaaydenh jaaydenh requested a review from aslilac April 23, 2025 23:02
@jaaydenh jaaydenh merged commit e562e3c into main Apr 24, 2025
34 checks passed
@jaaydenh jaaydenh deleted the jaaydenh/dynamic-params-required-fields branch April 24, 2025 21:14
@github-actions github-actions bot locked and limited conversation to collaborators Apr 24, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants