From 3e843e005176fe13f923be954c8b2e76b0dfe5b7 Mon Sep 17 00:00:00 2001 From: Thomas Hallock Date: Tue, 18 Nov 2025 11:14:11 -0600 Subject: [PATCH] debug: add logging for problemNumbers and cellBorders changes --- .../components/config-sidebar/LayoutTab.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/apps/web/src/app/create/worksheets/components/config-sidebar/LayoutTab.tsx b/apps/web/src/app/create/worksheets/components/config-sidebar/LayoutTab.tsx index 56da5cc0..76b3c36a 100644 --- a/apps/web/src/app/create/worksheets/components/config-sidebar/LayoutTab.tsx +++ b/apps/web/src/app/create/worksheets/components/config-sidebar/LayoutTab.tsx @@ -12,6 +12,8 @@ export function LayoutTab() { const { resolvedTheme } = useTheme() const isDark = resolvedTheme === 'dark' + console.log('[LayoutTab] Current formState.displayRules:', formState.displayRules) + // Orientation change handler with automatic problemsPerPage/cols updates const handleOrientationChange = ( orientation: 'portrait' | 'landscape', @@ -83,6 +85,11 @@ export function LayoutTab() { onProblemNumbersChange={(value) => { const displayRules: DisplayRules = formState.displayRules ?? defaultAdditionConfig.displayRules + console.log('[LayoutTab] Changing problemNumbers:', { + from: displayRules.problemNumbers, + to: value, + fullDisplayRules: displayRules, + }) onChange({ displayRules: { ...displayRules, @@ -93,6 +100,11 @@ export function LayoutTab() { onCellBordersChange={(value) => { const displayRules: DisplayRules = formState.displayRules ?? defaultAdditionConfig.displayRules + console.log('[LayoutTab] Changing cellBorders:', { + from: displayRules.cellBorders, + to: value, + fullDisplayRules: displayRules, + }) onChange({ displayRules: { ...displayRules,