Skip to content

Commit 09d7faf

Browse files
refactor: Align ComplianceScans page design with application patterns (#47)
## Design Consistency Improvements - Change Container maxWidth from "lg" to "xl" for full-width utilization - Add standard header structure with page title and descriptive subtitle - Wrap stepper in Paper container with consistent padding (p: 3, mb: 3) - Wrap main content in Card with CardContent for proper visual hierarchy - Wrap navigation actions in Paper container matching other pages ## Typography and Spacing Updates - Update section headers from h6 to h5 with component="h2" for proper hierarchy - Change description text from body2 to body1 for better readability - Standardize spacing: mb: 4 for major sections, mb: 3 for cards/papers - Apply consistent content padding (p: 3) across all container components ## Visual Hierarchy Alignment - Match header pattern used in Dashboard, Hosts, and Users pages - Implement proper Paper/Card wrapping strategy for visual consistency - Eliminate excessive blank space by utilizing full container width - Ensure consistent shadow elevation and border styling ## User Experience Enhancement - Remove centered layout that left too much whitespace on sides - Create visual consistency across the entire application interface - Maintain existing functionality while improving visual presentation - Preserve responsive behavior and accessibility features This update ensures the compliance scanning workflow integrates seamlessly with the overall OpenWatch application design language and user experience. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <noreply@anthropic.com>
1 parent 930b35a commit 09d7faf

1 file changed

Lines changed: 51 additions & 32 deletions

File tree

frontend/src/pages/scans/ComplianceScans.tsx

Lines changed: 51 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -221,12 +221,14 @@ const ComplianceScans: React.FC = () => {
221221

222222
const renderSelectTarget = () => (
223223
<Box>
224-
<Typography variant="h6" gutterBottom sx={{ mb: 3 }}>
225-
Select Target Type
226-
</Typography>
227-
<Typography variant="body2" color="text.secondary" sx={{ mb: 4 }}>
228-
Choose whether to scan individual hosts or host groups.
229-
</Typography>
224+
<Box sx={{ mb: 4 }}>
225+
<Typography variant="h5" component="h2" gutterBottom>
226+
Select Target Type
227+
</Typography>
228+
<Typography variant="body1" color="text.secondary">
229+
Choose whether to scan individual hosts or host groups.
230+
</Typography>
231+
</Box>
230232

231233
<Grid container spacing={3}>
232234
<Grid item xs={12} md={6}>
@@ -286,12 +288,12 @@ const ComplianceScans: React.FC = () => {
286288

287289
const renderSelectHosts = () => (
288290
<Box>
289-
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', mb: 3 }}>
291+
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', mb: 4 }}>
290292
<Box>
291-
<Typography variant="h6" gutterBottom>
293+
<Typography variant="h5" component="h2" gutterBottom>
292294
Select Target Hosts
293295
</Typography>
294-
<Typography variant="body2" color="text.secondary">
296+
<Typography variant="body1" color="text.secondary">
295297
Select one or more hosts to scan for compliance.
296298
</Typography>
297299
</Box>
@@ -364,12 +366,14 @@ const ComplianceScans: React.FC = () => {
364366

365367
const renderChooseRules = () => (
366368
<Box>
367-
<Typography variant="h6" gutterBottom sx={{ mb: 3 }}>
368-
Choose Compliance Rules
369-
</Typography>
370-
<Typography variant="body2" color="text.secondary" sx={{ mb: 4 }}>
371-
Select specific compliance rules to check or enable full scan for comprehensive assessment.
372-
</Typography>
369+
<Box sx={{ mb: 4 }}>
370+
<Typography variant="h5" component="h2" gutterBottom>
371+
Choose Compliance Rules
372+
</Typography>
373+
<Typography variant="body1" color="text.secondary">
374+
Select specific compliance rules to check or enable full scan for comprehensive assessment.
375+
</Typography>
376+
</Box>
373377

374378
<Box sx={{ mb: 3 }}>
375379
<Grid container spacing={2} alignItems="center">
@@ -547,9 +551,11 @@ const ComplianceScans: React.FC = () => {
547551

548552
const renderReviewAndStart = () => (
549553
<Box>
550-
<Typography variant="h6" gutterBottom sx={{ mb: 3 }}>
551-
Review & Start Scan
552-
</Typography>
554+
<Box sx={{ mb: 4 }}>
555+
<Typography variant="h5" component="h2" gutterBottom>
556+
Review & Start Scan
557+
</Typography>
558+
</Box>
553559

554560
<Grid container spacing={3}>
555561
<Grid item xs={12}>
@@ -605,32 +611,44 @@ const ComplianceScans: React.FC = () => {
605611
};
606612

607613
return (
608-
<Container maxWidth="lg">
614+
<Container maxWidth="xl">
615+
{/* Standard Header Pattern */}
609616
<Box sx={{ mb: 4 }}>
610617
<Typography variant="h4" component="h1" gutterBottom>
611-
New SCAP Scan
618+
New Compliance Scan
619+
</Typography>
620+
<Typography variant="body1" color="text.secondary">
621+
Create and configure security compliance scans for your infrastructure
612622
</Typography>
613623
</Box>
614624

615-
<Stepper activeStep={activeStep} sx={{ mb: 4 }}>
616-
{steps.map((label, index) => (
617-
<Step key={label}>
618-
<StepLabel>{label}</StepLabel>
619-
</Step>
620-
))}
621-
</Stepper>
625+
{/* Stepper in Paper Container */}
626+
<Paper sx={{ mb: 3, p: 3 }}>
627+
<Stepper activeStep={activeStep}>
628+
{steps.map((label, index) => (
629+
<Step key={label}>
630+
<StepLabel>{label}</StepLabel>
631+
</Step>
632+
))}
633+
</Stepper>
634+
</Paper>
622635

623636
{error && (
624637
<Alert severity="error" sx={{ mb: 3 }} onClose={() => setError(null)}>
625638
{error}
626639
</Alert>
627640
)}
628641

629-
<Box sx={{ mb: 4 }}>
630-
{getStepContent()}
631-
</Box>
642+
{/* Content in Card */}
643+
<Card sx={{ mb: 3 }}>
644+
<CardContent sx={{ p: 3 }}>
645+
{getStepContent()}
646+
</CardContent>
647+
</Card>
632648

633-
<Box sx={{ display: 'flex', justifyContent: 'space-between', mt: 4 }}>
649+
{/* Navigation Actions */}
650+
<Paper sx={{ p: 3 }}>
651+
<Box sx={{ display: 'flex', justifyContent: 'space-between' }}>
634652
<Button
635653
onClick={() => {
636654
if (activeStep === 0 && targetType !== null) {
@@ -659,7 +677,8 @@ const ComplianceScans: React.FC = () => {
659677
Next
660678
</Button>
661679
)}
662-
</Box>
680+
</Box>
681+
</Paper>
663682
</Container>
664683
);
665684
};

0 commit comments

Comments
 (0)