Repository navigation
Fix MapLibre layer manager slider width and style panel spacing - #1415
Conversation
The layer name checkbox used an auto flex basis, so its default 300px width squeezed the opacity slider down to its 40px minimum. Give the checkbox a zero flex basis and the slider a fixed 120px width.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
| flex="0 0 auto", | ||
| width="90px", | ||
| min_width="40px", | ||
| min_width="90px", |
There was a problem hiding this comment.
Low-confidence concern: the slider is now rigid (flex="0 0 auto", min_width="120px"). The checkbox can shrink to 0 (flex 1 1 0, min_width=0), but the slider can't. In a panel narrower than roughly 120px plus the buttons and padding, the row would overflow and could push the buttons out. The test only covered a 340px panel. A shrinkable slider would keep the old safety valve, for example flex="0 1 120px" with a smaller min_width such as 60px. The checkbox's zero basis already fixes the original squeeze, so this would keep the fix and still let narrow panels degrade gracefully.
| min_width="90px", | |
| flex="0 1 120px", | |
| width="120px", | |
| min_width="60px", |
|
🚀 Deployed on https://6af62276f1cdf1d8ce704c90--opengeos.netlify.app |
Code reviewThe PR is a small layout tweak in Bugs
Security
Performance
Quality
CLAUDE.md
|
The style widget added its own 10px padding inside the already padded sidebar panel, and the empty output area added margins, leaving a gap below the buttons. Drop both.
| tooltip="Change layer opacity", | ||
| layout=widgets.Layout( | ||
| flex="0 1 90px", | ||
| flex="0 0 auto", |
There was a problem hiding this comment.
Low confidence: the slider is now rigid (flex: 0 0 auto, min_width: 90px), and the checkbox has min_width=0 and overflow=hidden with a zero basis. In a narrow sidebar, or with long layer names, the checkbox label shrinks to nothing and gets clipped, and the slider never gives up space. Before this change the slider could shrink to 40px. Consider keeping a small shrink allowance, for example flex="0 1 90px" with min_width="60px". Alternatively, give the checkbox a modest min_width so labels stay readable.
Code reviewThis PR is a small UI layout fix in Bugs
Security
Performance
Quality
CLAUDE.md
I only read the diff and haven't rendered the UI. The visual outcome, including the slider squeeze concern above, is worth a quick manual check in a notebook sidebar. |
Summary
Test plan
pre-commit run --all-filespassesSummary by CodeRabbit