Skip to content

Commit 3870538

Browse files
YashK2005claude
andcommitted
Fix StepIndicator, dropdown padding, and missing theme tokens
- StepIndicator now honors totalSteps prop (fixes 2-step forms) - FormPageLayout accepts hasDropdownOpen to prevent dropdown clipping - Added missing brand.primaryAlpha and brand.primaryLight tokens 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
1 parent b12d945 commit 3870538

File tree

5 files changed

+27
-9
lines changed

5 files changed

+27
-9
lines changed

frontend/src/components/layout/FormPageLayout.tsx

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ interface FormPageLayoutProps {
1313
* @default "gray.50"
1414
*/
1515
bg?: string;
16+
/**
17+
* Whether a dropdown is currently open (adds extra bottom padding to prevent clipping)
18+
* @default false
19+
*/
20+
hasDropdownOpen?: boolean;
1621
}
1722

1823
/**
@@ -26,9 +31,21 @@ interface FormPageLayoutProps {
2631
* </FormPageLayout>
2732
* ```
2833
*/
29-
export function FormPageLayout({ children, maxW = '1200px', bg = 'gray.50' }: FormPageLayoutProps) {
34+
export function FormPageLayout({
35+
children,
36+
maxW = '1200px',
37+
bg = 'gray.50',
38+
hasDropdownOpen = false,
39+
}: FormPageLayoutProps) {
3040
return (
31-
<Flex minH="100vh" bg={bg} justify="center" py={12} overflow="visible">
41+
<Flex
42+
minH="100vh"
43+
bg={bg}
44+
justify="center"
45+
pt={12}
46+
pb={hasDropdownOpen ? '50vh' : 12}
47+
overflow="visible"
48+
>
3249
<Box
3350
w="full"
3451
maxW={maxW}

frontend/src/components/ui/StepIndicator.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,15 @@ interface StepIndicatorProps {
1414

1515
/**
1616
* Visual progress indicator for multi-step forms.
17-
* Always renders 3 segments, highlighting the current step.
17+
* Renders the specified number of segments, highlighting the current step.
1818
*
1919
* @example
2020
* ```tsx
21-
* <StepIndicator currentStep={2} />
21+
* <StepIndicator currentStep={2} totalSteps={3} />
2222
* ```
2323
*/
24-
export function StepIndicator({ currentStep }: StepIndicatorProps) {
25-
// Always render 3 segments as per current implementation
26-
const segments = 3;
24+
export function StepIndicator({ currentStep, totalSteps }: StepIndicatorProps) {
25+
const segments = totalSteps ?? 3;
2726

2827
return (
2928
<Box mb={10}>

frontend/src/pages/participant/intake/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ export default function ParticipantIntakePage() {
230230
return (
231231
<ProtectedPage allowedRoles={[UserRole.PARTICIPANT, UserRole.ADMIN]}>
232232
<FormStatusGuard allowedStatuses={[FormStatus.INTAKE_TODO]}>
233-
<FormPageLayout>
233+
<FormPageLayout hasDropdownOpen={hasDropdownOpen}>
234234
{currentStepType === 'experience-personal' && (
235235
<PersonalInfoForm
236236
formType="participant"

frontend/src/pages/volunteer/intake/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ export default function VolunteerIntakePage() {
239239
return (
240240
<ProtectedPage allowedRoles={[UserRole.VOLUNTEER, UserRole.ADMIN]}>
241241
<FormStatusGuard allowedStatuses={[FormStatus.INTAKE_TODO]}>
242-
<FormPageLayout>
242+
<FormPageLayout hasDropdownOpen={hasDropdownOpen}>
243243
{currentStepType === 'experience-personal' && (
244244
<PersonalInfoForm
245245
formType="volunteer"

frontend/src/styles/theme.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ const brandTokens = defineTokens({
66
primary: { value: '#056067' },
77
primaryEmphasis: { value: '#044953' },
88
primaryMuted: { value: '#B3CED1' },
9+
primaryAlpha: { value: 'rgba(5, 96, 103, 0.08)' }, // 8% opacity for subtle hover states
10+
primaryLight: { value: '#E6F4F5' }, // Very light teal for hover backgrounds
911
navy: { value: '#1D3448' },
1012
navyMuted: { value: '#41576B' },
1113
fieldText: { value: '#414651' },

0 commit comments

Comments
 (0)