From fcae4b092cd6a5be3bd5d2e8510ebeeb1dc70098 Mon Sep 17 00:00:00 2001 From: robbertjanssen85 <91183957+robbertjanssen85@users.noreply.github.com> Date: Thu, 16 Apr 2026 15:09:38 +0200 Subject: [PATCH] Clean up Webapp function-row alignment and rename tab to Cockpit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Drops the redundant unit label and the approximate caption under the BVO input cell — both had variable widths that shifted the input column across rows. Toggle buttons now match the input cell size for visual balance. Also renames the "Spreadsheet" tab in the Webapp sidebar to "Cockpit" to match the handleiding, where cockpit refers to the results overview view. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/components/layouts/WebappLayout.tsx | 90 ++++++++++--------------- 1 file changed, 35 insertions(+), 55 deletions(-) diff --git a/src/components/layouts/WebappLayout.tsx b/src/components/layouts/WebappLayout.tsx index 7953e07..9ce5818 100644 --- a/src/components/layouts/WebappLayout.tsx +++ b/src/components/layouts/WebappLayout.tsx @@ -225,7 +225,7 @@ export default function WebappLayout({ const tabs: { id: WebappTab; label: string; icon: React.ReactNode }[] = [ { id: 'cover', label: 'Info', icon: }, { id: 'handleiding', label: 'Handleiding', icon: }, - { id: 'dashboard', label: 'Spreadsheet', icon: }, + { id: 'dashboard', label: 'Cockpit', icon: }, { id: 'invoer', label: 'Invoer', icon: }, { id: 'parameters', label: 'Parameters', icon: }, { id: 'clustering', label: 'Clustering', icon: }, @@ -1098,7 +1098,7 @@ export default function WebappLayout({ style={{ display: 'flex', border: `1px solid ${DMI.blueTint2}`, - borderRadius: '6px', + borderRadius: '8px', overflow: 'hidden', flexShrink: 0, }} @@ -1107,15 +1107,15 @@ export default function WebappLayout({ type="button" onClick={() => state.handleFunctionInputModeChange(func.id, 'count')} style={{ - padding: '4px 8px', + padding: '8px 12px', border: 'none', cursor: 'pointer', backgroundColor: mode === 'count' ? DMI.mediumBlue : DMI.white, color: mode === 'count' ? DMI.white : DMI.darkBlue, fontFamily: 'var(--font-ibm-plex-mono), monospace', - fontSize: '0.7rem', + fontSize: '0.9rem', fontWeight: 600, - minWidth: '28px', + minWidth: '40px', }} > # @@ -1124,16 +1124,16 @@ export default function WebappLayout({ type="button" onClick={() => state.handleFunctionInputModeChange(func.id, 'bvo')} style={{ - padding: '4px 8px', + padding: '8px 12px', border: 'none', borderLeft: `1px solid ${DMI.blueTint2}`, cursor: 'pointer', backgroundColor: mode === 'bvo' ? DMI.mediumBlue : DMI.white, color: mode === 'bvo' ? DMI.white : DMI.darkBlue, fontFamily: 'var(--font-ibm-plex-mono), monospace', - fontSize: '0.7rem', + fontSize: '0.9rem', fontWeight: 600, - minWidth: '28px', + minWidth: '40px', }} > m² @@ -1157,53 +1157,33 @@ export default function WebappLayout({ )} -
-
- {/* Unit label - hidden on mobile */} - {!isMobile && ( - - {mode === 'bvo' ? 'm² BVO' : func.unit} - - )} - - {/* Number input — count or BVO */} - mode === 'bvo' - ? state.handleFunctionBvoChange(func.id, e.target.value) - : state.handleFunctionCountChange(func.id, e.target.value)} - style={{ - width: '90px', - padding: '8px 12px', - borderRadius: '8px', - border: `1px solid ${DMI.blueTint2}`, - backgroundColor: DMI.white, - color: DMI.darkBlue, - fontFamily: 'var(--font-ibm-plex-mono), monospace', - fontSize: '0.9rem', - fontWeight: 600, - textAlign: 'right', - outline: 'none', - transition: 'border-color 0.2s ease', - }} - onFocus={(e) => { e.currentTarget.style.borderColor = DMI.mediumBlue; }} - onBlur={(e) => { e.currentTarget.style.borderColor = DMI.blueTint2; }} - /> -
- - ≈ {count.toLocaleString('nl-NL')} {func.unit} - -
+ mode === 'bvo' + ? state.handleFunctionBvoChange(func.id, e.target.value) + : state.handleFunctionCountChange(func.id, e.target.value)} + style={{ + width: '110px', + padding: '8px 12px', + borderRadius: '8px', + border: `1px solid ${DMI.blueTint2}`, + backgroundColor: DMI.white, + color: DMI.darkBlue, + fontFamily: 'var(--font-ibm-plex-mono), monospace', + fontSize: '0.9rem', + fontWeight: 600, + textAlign: 'right', + outline: 'none', + transition: 'border-color 0.2s ease', + boxSizing: 'border-box', + flexShrink: 0, + }} + onFocus={(e) => { e.currentTarget.style.borderColor = DMI.mediumBlue; }} + onBlur={(e) => { e.currentTarget.style.borderColor = DMI.blueTint2; }} + /> ); })}