feat(know-your-world): improve region size filter layout

- Arrange checkboxes in a single column on the right side of the map
- Add "All" button to select all region sizes with one click
- Position filter panel from top to bottom of the map

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Thomas Hallock 2025-11-26 21:49:37 -06:00
parent e6f58bfd93
commit 558d369ba0
1 changed files with 41 additions and 5 deletions

View File

@ -725,13 +725,14 @@ export function DrillDownMapSelector({
) )
})()} })()}
{/* Region Size Filters - positioned inside map, bottom right */} {/* Region Size Filters - positioned inside map, right side as column */}
<div <div
data-element="region-size-filters" data-element="region-size-filters"
className={css({ className={css({
position: 'absolute', position: 'absolute',
bottom: '3', top: '3',
right: '3', right: '3',
bottom: '3',
display: 'flex', display: 'flex',
flexDirection: 'column', flexDirection: 'column',
gap: '1', gap: '1',
@ -745,12 +746,47 @@ export function DrillDownMapSelector({
zIndex: 10, zIndex: 10,
})} })}
> >
{/* Select All button */}
<button
data-action="select-all-sizes"
onClick={() => onRegionSizesChange([...ALL_REGION_SIZES])}
disabled={includeSizes.length === ALL_REGION_SIZES.length}
className={css({
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
gap: '1',
paddingX: '2',
paddingY: '1',
bg: isDark ? 'green.800' : 'green.500',
color: 'white',
border: '1px solid',
borderColor: isDark ? 'green.600' : 'green.600',
rounded: 'md',
cursor: includeSizes.length === ALL_REGION_SIZES.length ? 'default' : 'pointer',
opacity: includeSizes.length === ALL_REGION_SIZES.length ? 0.5 : 1,
transition: 'all 0.15s',
fontSize: 'xs',
fontWeight: '600',
_hover:
includeSizes.length === ALL_REGION_SIZES.length
? {}
: {
bg: isDark ? 'green.700' : 'green.600',
},
})}
>
<span></span>
<span>All</span>
</button>
{/* Size checkboxes in a column */}
<div <div
className={css({ className={css({
display: 'flex', display: 'flex',
flexWrap: 'wrap', flexDirection: 'column',
gap: '1', gap: '1',
maxWidth: '280px', flex: 1,
})} })}
> >
{ALL_REGION_SIZES.map((size) => { {ALL_REGION_SIZES.map((size) => {
@ -775,7 +811,7 @@ export function DrillDownMapSelector({
onCheckedChange={handleToggle} onCheckedChange={handleToggle}
disabled={isOnlyOne} disabled={isOnlyOne}
className={css({ className={css({
display: 'inline-flex', display: 'flex',
alignItems: 'center', alignItems: 'center',
gap: '1', gap: '1',
paddingX: '2', paddingX: '2',