Skip to content

Commit a15e661

Browse files
author
Sqoia Dev Agent
committed
fix: main app layout with scrollable content area
App layout is now flex column with fixed header + nav and scrollable content area. Dashboards, details, invoices, and settings all scroll independently within the viewport. No more content cut off at the bottom of the page. - html/body/#root set to height: 100%, overflow: hidden - App container: flex column, height: 100vh - Header + nav: flexShrink: 0 (pinned) - Content area: flex: 1, overflowY: auto (scrollable)
1 parent 280b4ff commit a15e661

2 files changed

Lines changed: 37 additions & 8 deletions

File tree

src/slurmledger.css

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1+
html, body, #root {
2+
height: 100%;
3+
margin: 0;
4+
padding: 0;
5+
overflow: hidden;
6+
}
7+
18
body {
29
/* Use Cockpit/PatternFly's default font so the plugin matches the host UI */
310
font-family: var(--pf-global--FontFamily--sans-serif);
4-
margin: 0;
5-
padding: 0;
611
}
712

813
nav {

src/slurmledger.js

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6231,19 +6231,29 @@ function App() {
62316231

62326232
return React.createElement(
62336233
'div',
6234-
{ className: 'app' },
6234+
{
6235+
className: 'app',
6236+
style: {
6237+
display: 'flex',
6238+
flexDirection: 'column',
6239+
height: '100vh',
6240+
overflow: 'hidden'
6241+
}
6242+
},
62356243

6236-
// Header with role indicator
6244+
// Header with role indicator (fixed)
62376245
React.createElement(
62386246
'div',
62396247
{
62406248
style: {
62416249
display: 'flex',
62426250
justifyContent: 'space-between',
62436251
alignItems: 'center',
6244-
padding: '0.5em 0',
6245-
marginBottom: '0.5em',
6246-
borderBottom: '1px solid #e5e7eb'
6252+
padding: '0.5em 1em',
6253+
borderBottom: '1px solid #e5e7eb',
6254+
flexShrink: 0,
6255+
background: '#fff',
6256+
zIndex: 10
62476257
}
62486258
},
62496259
React.createElement('span', { style: { fontWeight: 'bold', fontSize: '1.1em' } }, 'SlurmLedger'),
@@ -6266,7 +6276,7 @@ function App() {
62666276

62676277
React.createElement(
62686278
'nav',
6269-
null,
6279+
{ style: { flexShrink: 0, padding: '0 1em', background: '#fff', borderBottom: '1px solid #f3f4f6' } },
62706280
navTabs.map(tab =>
62716281
React.createElement(
62726282
'button',
@@ -6279,6 +6289,19 @@ function App() {
62796289
)
62806290
)
62816291
),
6292+
6293+
// Scrollable content area
6294+
React.createElement(
6295+
'div',
6296+
{
6297+
style: {
6298+
flex: 1,
6299+
overflowY: 'auto',
6300+
padding: '1em',
6301+
background: '#fafafa'
6302+
}
6303+
},
6304+
62826305
activeView === 'summary' &&
62836306
React.createElement(
62846307
'div',
@@ -6373,6 +6396,7 @@ function App() {
63736396
activeView === 'invoices' && React.createElement(Invoices, { currentUser: username, billingData: data, institutionProfile }),
63746397
activeView === 'audit' && React.createElement(AuditLogViewer, { invoiceLedger }),
63756398
activeView === 'settings' && React.createElement(Rates, { onRatesUpdated: reload, billingData: data, username, userRole })
6399+
) // close scrollable content div
63766400
);
63776401
}
63786402

0 commit comments

Comments
 (0)