diff --git a/apps/web/src/app/create/worksheets/components/ConfigSidebar.tsx b/apps/web/src/app/create/worksheets/components/ConfigSidebar.tsx index f9404506..04c159d7 100644 --- a/apps/web/src/app/create/worksheets/components/ConfigSidebar.tsx +++ b/apps/web/src/app/create/worksheets/components/ConfigSidebar.tsx @@ -142,6 +142,7 @@ export function ConfigSidebar({ orientation={formState.orientation} problemsPerPage={formState.problemsPerPage} cols={formState.cols} + pages={formState.pages} displayRules={formState.displayRules} resolvedDisplayRules={resolvedDisplayRules} digitRange={formState.digitRange} diff --git a/apps/web/src/app/create/worksheets/components/config-sidebar/TabNavigation.tsx b/apps/web/src/app/create/worksheets/components/config-sidebar/TabNavigation.tsx index 270f0ba6..b7ad0bee 100644 --- a/apps/web/src/app/create/worksheets/components/config-sidebar/TabNavigation.tsx +++ b/apps/web/src/app/create/worksheets/components/config-sidebar/TabNavigation.tsx @@ -16,6 +16,7 @@ export interface Tab { orientation?: 'portrait' | 'landscape' problemsPerPage?: number cols?: number + pages?: number displayRules?: DisplayRules resolvedDisplayRules?: DisplayRules operator?: 'addition' | 'subtraction' | 'mixed' @@ -36,11 +37,12 @@ export const TABS: Tab[] = [ id: 'layout', label: 'Layout', icon: '📐', - subtitle: ({ orientation, problemsPerPage, cols }) => { - if (!orientation || !problemsPerPage || !cols) return null + subtitle: ({ orientation, problemsPerPage, cols, pages }) => { + if (!orientation || !problemsPerPage || !cols || !pages) return null const orientationLabel = orientation === 'portrait' ? 'Portrait' : 'Landscape' const rows = Math.ceil(problemsPerPage / cols) - return `${orientationLabel}: ${cols}×${rows}` + const pageLabel = pages === 1 ? 'page' : 'pages' + return `${orientationLabel}: ${cols}×${rows}, ${pages} ${pageLabel}` }, }, { @@ -119,6 +121,7 @@ interface TabNavigationProps { orientation?: 'portrait' | 'landscape' problemsPerPage?: number cols?: number + pages?: number displayRules?: DisplayRules resolvedDisplayRules?: DisplayRules digitRange?: { min: number; max: number } @@ -134,6 +137,7 @@ export function TabNavigation({ orientation, problemsPerPage, cols, + pages, displayRules, resolvedDisplayRules, digitRange, @@ -157,6 +161,7 @@ export function TabNavigation({ orientation, problemsPerPage, cols, + pages, displayRules, resolvedDisplayRules, operator, @@ -220,18 +225,19 @@ export function TabNavigation({
+ {/* Icon - left side, uses full height */}
{showPreviewIcon ? ( @@ -244,35 +250,48 @@ export function TabNavigation({ ) : ( {icon} )} - {tab.label}
- {subtitle ? ( - - {subtitle} - - ) : null} + + {/* Label + Subtitle - right side, stacked vertically */} +
+ {tab.label} + {subtitle ? ( + + {subtitle} + + ) : null} +
)