@@ -457,15 +457,27 @@ export function FlagSheet({
457457 { /* Type & Value */ }
458458 < div className = "space-y-4" >
459459 < div className = "space-y-2" >
460- < span className = "text-muted-foreground text-xs" > Type</ span >
460+ < div className = "space-y-0.5" >
461+ < span className = "font-medium text-foreground text-sm" >
462+ Flag Type
463+ </ span >
464+ < p className = "text-muted-foreground text-xs" >
465+ How the flag value is determined for each user
466+ </ p >
467+ </ div >
461468 < div className = "flex gap-2" >
462469 { ( [ "boolean" , "rollout" , "multivariant" ] as const ) . map (
463470 ( type ) => {
464471 const isSelected = watchedType === type ;
472+ const typeDescriptions = {
473+ boolean : "On or Off" ,
474+ rollout : "% of users" ,
475+ multivariant : "A/B variants" ,
476+ } ;
465477 return (
466478 < button
467479 className = { cn (
468- "flex-1 cursor-pointer rounded border py-2.5 text-center font-medium text-sm capitalize transition-all" ,
480+ "flex-1 cursor-pointer rounded border py-2 text-center transition-all" ,
469481 isSelected
470482 ? "border-primary bg-primary/5 text-foreground"
471483 : "border-transparent bg-secondary text-muted-foreground hover:border-border hover:bg-secondary/80 hover:text-foreground"
@@ -474,7 +486,12 @@ export function FlagSheet({
474486 onClick = { ( ) => form . setValue ( "flag.type" , type ) }
475487 type = "button"
476488 >
477- { type }
489+ < span className = "block font-medium text-sm capitalize" >
490+ { type }
491+ </ span >
492+ < span className = "block text-muted-foreground text-xs" >
493+ { typeDescriptions [ type ] }
494+ </ span >
478495 </ button >
479496 ) ;
480497 }
@@ -498,10 +515,15 @@ export function FlagSheet({
498515 render = { ( { field } ) => (
499516 < div className = "space-y-3" >
500517 < div className = "flex items-center justify-between" >
501- < span className = "text-muted-foreground text-sm" >
502- Rollout percentage
503- </ span >
504- < span className = "font-mono text-sm tabular-nums" >
518+ < div className = "space-y-0.5" >
519+ < span className = "font-medium text-foreground text-sm" >
520+ Rollout Percentage
521+ </ span >
522+ < p className = "text-muted-foreground text-xs" >
523+ % of users who get true (when active)
524+ </ p >
525+ </ div >
526+ < span className = "font-mono text-foreground text-lg tabular-nums" >
505527 { field . value } %
506528 </ span >
507529 </ div >
@@ -555,47 +577,54 @@ export function FlagSheet({
555577 ) : (
556578 < motion . div
557579 animate = { { opacity : 1 , y : 0 } }
558- className = "flex items-center justify-between "
580+ className = "space-y-2 "
559581 exit = { { opacity : 0 , y : - 10 } }
560582 initial = { { opacity : 0 , y : 10 } }
561583 key = "boolean"
562584 transition = { { duration : 0.15 } }
563585 >
564- < span className = "text-muted-foreground text-sm" >
565- Default value
566- </ span >
567- < FormField
568- control = { form . control }
569- name = "flag.defaultValue"
570- render = { ( { field } ) => (
571- < div className = "flex items-center gap-3" >
572- < span
573- className = { cn (
574- "text-sm transition-colors" ,
575- field . value
576- ? "text-muted-foreground/60"
577- : "text-foreground"
578- ) }
579- >
580- Off
581- </ span >
582- < Switch
583- checked = { field . value }
584- onCheckedChange = { field . onChange }
585- />
586- < span
587- className = { cn (
588- "text-sm transition-colors" ,
589- field . value
590- ? "text-foreground"
591- : "text-muted-foreground/60"
592- ) }
593- >
594- On
595- </ span >
596- </ div >
597- ) }
598- />
586+ < div className = "flex items-center justify-between" >
587+ < div className = "space-y-0.5" >
588+ < span className = "font-medium text-foreground text-sm" >
589+ Return Value
590+ </ span >
591+ < p className = "text-muted-foreground text-xs" >
592+ What users get when flag is active
593+ </ p >
594+ </ div >
595+ < FormField
596+ control = { form . control }
597+ name = "flag.defaultValue"
598+ render = { ( { field } ) => (
599+ < div className = "flex items-center gap-3" >
600+ < span
601+ className = { cn (
602+ "text-sm transition-colors" ,
603+ field . value
604+ ? "text-muted-foreground/60"
605+ : "text-foreground"
606+ ) }
607+ >
608+ Off
609+ </ span >
610+ < Switch
611+ checked = { field . value }
612+ onCheckedChange = { field . onChange }
613+ />
614+ < span
615+ className = { cn (
616+ "text-sm transition-colors" ,
617+ field . value
618+ ? "text-foreground"
619+ : "text-muted-foreground/60"
620+ ) }
621+ >
622+ On
623+ </ span >
624+ </ div >
625+ ) }
626+ />
627+ </ div >
599628 </ motion . div >
600629 ) }
601630 </ AnimatePresence >
@@ -613,14 +642,26 @@ export function FlagSheet({
613642 ) ;
614643 const canBeActive = inactiveDeps . length === 0 ;
615644
645+ const statusDescriptions = {
646+ active : "Live, evaluates rules" ,
647+ inactive : "Off, always returns false" ,
648+ archived : "Retired, hidden from list" ,
649+ } ;
650+
616651 return (
617652 < div className = "space-y-2" >
618653 < div className = "flex items-center justify-between" >
619- < span className = "text-muted-foreground text-xs" >
620- Status
621- </ span >
654+ < div className = "space-y-0.5" >
655+ < span className = "font-medium text-foreground text-sm" >
656+ Flag Status
657+ </ span >
658+ < p className = "text-muted-foreground text-xs" >
659+ Active = uses settings below. Inactive = completely
660+ off.
661+ </ p >
662+ </ div >
622663 { ! canBeActive && (
623- < span className = "text-amber-600 text-xs" >
664+ < span className = "text-warning text-xs" >
624665 Dependencies must be active first
625666 </ span >
626667 ) }
@@ -634,13 +675,13 @@ export function FlagSheet({
634675 return (
635676 < button
636677 className = { cn (
637- "flex-1 cursor-pointer rounded border py-2 font-medium text-sm capitalize transition-all" ,
678+ "flex-1 cursor-pointer rounded border py-2 transition-all" ,
638679 isSelected
639680 ? status === "active"
640- ? "border- green-500 /50 bg-green-500 /10 text-green-600 "
681+ ? "green-angled-rectangle-gradient border-success /50 bg-success /10 text-success "
641682 : status === "inactive"
642- ? "border-amber-500 /50 bg-amber-500 /10 text-amber-600 "
643- : "border- border bg-secondary text-foreground "
683+ ? "red-angled-rectangle-gradient border-destructive /50 bg-destructive /10 text-destructive "
684+ : "amber-angled-rectangle-gradient border-warning/50 bg-warning/10 text-warning "
644685 : "border-transparent bg-secondary text-muted-foreground hover:border-border hover:bg-secondary/80 hover:text-foreground" ,
645686 isDisabled && "cursor-not-allowed opacity-50"
646687 ) }
@@ -649,7 +690,19 @@ export function FlagSheet({
649690 onClick = { ( ) => field . onChange ( status ) }
650691 type = "button"
651692 >
652- { status }
693+ < span className = "block font-medium text-sm capitalize" >
694+ { status }
695+ </ span >
696+ < span
697+ className = { cn (
698+ "block text-xs" ,
699+ isSelected
700+ ? "opacity-80"
701+ : "text-muted-foreground"
702+ ) }
703+ >
704+ { statusDescriptions [ status ] }
705+ </ span >
653706 </ button >
654707 ) ;
655708 }
0 commit comments