Skip to content

Commit 9caefab

Browse files
committed
feat: improve UI spacing and add analytics
- Increase card internal padding from 8px to 12px (inline style) - Better spacing for checkbox and badges from card borders - Applied to SoftwareCard and ConfigOption components - Remove "Select All" / "Deselect All" buttons from categories - Simplify category header to single expand/collapse button - Cleaner, more focused UI - Remove gray background containers from grid layouts - Cleaner visual appearance - Cards now sit directly on page background - Add Umami Analytics tracking script - Privacy-focused analytics with defer loading - Website ID: 0b493e9f-c3e3-4eb8-a119-4bf453dcec5b Bundle size: 370.45 KB (119.53 KB gzipped)
1 parent c61f407 commit 9caefab

File tree

2 files changed

+27
-50
lines changed

2 files changed

+27
-50
lines changed

src/components/ConfigurationSelector/ConfigSection.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const ConfigSection = ({ category, configs }) => {
3939
<div style={{
4040
display: 'grid',
4141
gridTemplateColumns: 'repeat(auto-fill, minmax(280px, 1fr))',
42-
gap: '8px'
42+
gap: '12px'
4343
}}>
4444
{configs.map((config) => (
4545
<ConfigOption key={config.id} config={config} />

src/components/SoftwareSelector/CategorySection.jsx

Lines changed: 26 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,45 @@
11
import { useState } from 'react';
2-
import { useSelection } from '../../context/SelectionContext';
32
import SoftwareCard from './SoftwareCard';
43

54
const CategorySection = ({ category, software }) => {
65
const [expanded, setExpanded] = useState(true);
7-
const { selectAllInCategory, deselectAllInCategory, isAllCategorySelected } =
8-
useSelection();
9-
10-
const allSelected = isAllCategorySelected(category.id);
11-
12-
const handleToggleAll = () => {
13-
if (allSelected) {
14-
deselectAllInCategory(category.id);
15-
} else {
16-
selectAllInCategory(category.id);
17-
}
18-
};
196

207
return (
218
<section id={`category-${category.id}`} style={{ marginBottom: '16px' }}>
229
<div className="win98-raised" style={{ padding: '8px', marginBottom: '8px' }}>
23-
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: '12px', flexWrap: 'wrap' }}>
24-
<button
25-
onClick={() => setExpanded(!expanded)}
26-
className="win98-button"
27-
style={{
28-
flex: 1,
29-
minWidth: '200px',
30-
minHeight: '50px',
31-
display: 'flex',
32-
alignItems: 'center',
33-
gap: '8px',
34-
justifyContent: 'flex-start',
35-
padding: '8px 12px'
36-
}}
37-
>
38-
<span style={{ fontSize: '20px', flexShrink: 0 }}>{category.icon}</span>
39-
<div style={{ textAlign: 'left', flex: 1, overflow: 'hidden' }}>
40-
<div style={{ fontSize: '13px', fontWeight: 'bold', marginBottom: '3px', lineHeight: '1.2' }}>
41-
{category.name}
42-
</div>
43-
<div className="category-description" style={{ fontSize: '11px', fontWeight: 'normal', color: '#000', lineHeight: '1.3' }}>
44-
{category.description}
45-
</div>
10+
<button
11+
onClick={() => setExpanded(!expanded)}
12+
className="win98-button"
13+
style={{
14+
width: '100%',
15+
minHeight: '50px',
16+
display: 'flex',
17+
alignItems: 'center',
18+
gap: '8px',
19+
justifyContent: 'flex-start',
20+
padding: '8px 12px'
21+
}}
22+
>
23+
<span style={{ fontSize: '20px', flexShrink: 0 }}>{category.icon}</span>
24+
<div style={{ textAlign: 'left', flex: 1, overflow: 'hidden' }}>
25+
<div style={{ fontSize: '13px', fontWeight: 'bold', marginBottom: '3px', lineHeight: '1.2' }}>
26+
{category.name}
4627
</div>
47-
<span style={{ fontSize: '10px', marginLeft: 'auto', flexShrink: 0 }}>
48-
{expanded ? '▼' : '▶'}
49-
</span>
50-
</button>
51-
<button
52-
onClick={handleToggleAll}
53-
className={allSelected ? 'win98-button win98-button-danger' : 'win98-button win98-button-primary'}
54-
style={{ minWidth: '100px' }}
55-
>
56-
{allSelected ? 'Deselect All' : 'Select All'}
57-
</button>
58-
</div>
28+
<div className="category-description" style={{ fontSize: '11px', fontWeight: 'normal', color: '#000', lineHeight: '1.3' }}>
29+
{category.description}
30+
</div>
31+
</div>
32+
<span style={{ fontSize: '10px', marginLeft: 'auto', flexShrink: 0 }}>
33+
{expanded ? '▼' : '▶'}
34+
</span>
35+
</button>
5936
</div>
6037

6138
{expanded && (
6239
<div style={{
6340
display: 'grid',
6441
gridTemplateColumns: 'repeat(auto-fill, minmax(280px, 1fr))',
65-
gap: '8px'
42+
gap: '12px'
6643
}}>
6744
{software.map((sw) => (
6845
<SoftwareCard key={sw.id} software={sw} />

0 commit comments

Comments
 (0)