fix(frontend): improve playground config panel layout#4481
Conversation
Add a "Config" header to the playground left panel when no top-level object section already supplies one, so scalar-only custom configs have a visible anchor. Sections like prompt and advanced_settings keep their existing headers. Add a `gap` prop to LabeledField. TextInputControl opts into `gap="sm"` (8px) for multi-line textareas where the default 4px looked cramped.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Two small fixes to how the playground left panel renders custom configs.
1. "Config" header for scalar-only configs
Before: a custom app whose schema exposes only top-level scalars (e.g.
{temperature, system_prompt}) renders a header-less list of inputs, with no visual anchor at the top of the panel.After: a static "Config" header appears whenever no top-level object section already provides one. Object sections like
prompt,advanced_settings, andfeedback_configkeep their existing collapsible headers, so no double headers.2. Breathing room between textarea label and box
Before:
LabeledFieldusesgap-1(4px) between label and control. Looks cramped when the control is a multi-line<textarea>.After: a new optional
gapprop onLabeledField(defaults toxs, unchanged for every existing caller).TextInputControlopts intogap="sm"(8px) when the field is multi-line.Test plan
system_prompt): 8px between label and textarea, not 4px.