Skip to content

fix(#1329): accordion map controls on mobile, drop 200px scroll cap#1333

Merged
Kpa-clawbot merged 2 commits into
masterfrom
fix/issue-1329
May 24, 2026
Merged

fix(#1329): accordion map controls on mobile, drop 200px scroll cap#1333
Kpa-clawbot merged 2 commits into
masterfrom
fix/issue-1329

Conversation

@Kpa-clawbot
Copy link
Copy Markdown
Owner

Summary

On mobile (≤640px) the Map controls panel was capped at max-height: 200px and forced an internal scrollbar through all the layer/filter/display toggles. This makes every section a single-open accordion and drops the cap, so the visible content always fits without internal scroll.

Changes

  • public/map.js — Each fieldset.mc-section legend becomes a tappable aria-expanded toggle. On mobile the first section opens by default; activating any other section auto-closes the previously open one (single-open). Desktop still renders all sections expanded.
  • public/style.css@media (max-width: 640px) rules:
    • max-height: 200pxcalc(100vh - 80px).
    • .mc-collapsed > *:not(legend) { display: none } hides bodies of collapsed sections.
    • Legend styled as flex row with ▸/▾ indicator (colors via var(--text-muted)).
    • All new rules live inside the mobile media query, so desktop layout is unchanged.

Test

test-issue-1329-map-controls-accordion-e2e.js (added to CI in deploy.yml):

  • mobile 375x812: ≥1 accordion toggle present, ≤1 expanded by default, no internal scroll, clicking another toggle collapses the first.
  • desktop 1280x800: position: absolute, panel <50% viewport wide, all controls visible.

Red commit: 85fdc25267eaf210369371f55da767016435dbff (test fails on master — no accordion toggles exist; all fieldsets render expanded under the 200px cap forcing scroll).

E2E assertion added: test-issue-1329-map-controls-accordion-e2e.js:56.

Fixes #1329

openclaw-bot added 2 commits May 23, 2026 20:00
E2E asserting:
- ≥1 accordion section with aria-expanded toggle (mobile 375x812)
- ≤1 section expanded by default (single-open behavior)
- panel does NOT require internal scroll
- clicking another toggle collapses the first
- desktop 1280x800: layout unchanged, all controls visible

Currently fails: the panel uses static fieldsets with no accordion
behavior — all sections render expanded, exceeding the 200px cap and
forcing internal scroll on mobile.

Refs #1329
Mobile (≤640px):
- Each fieldset.mc-section legend becomes an aria-expanded toggle.
- Initial state: first section open, others collapsed (single-open).
- Clicking a closed section auto-closes the currently-open one.
- Collapsed sections hide their body via .mc-collapsed (CSS-only inside
  the @media (max-width: 640px) block so desktop is unaffected).
- max-height: 200px → calc(100vh - 80px). Combined with single-open
  accordion, panel no longer needs internal scroll.
- Legends styled as flex with ▸/▾ disclosure indicator (var-driven).

Desktop unchanged:
- .mc-collapsed has no rules outside the mobile media query, so all
  sections render fully expanded as today.
- panel position:absolute and clamp() width preserved.

Fixes #1329
@Kpa-clawbot Kpa-clawbot merged commit adcf29d into master May 24, 2026
6 checks passed
@Kpa-clawbot Kpa-clawbot deleted the fix/issue-1329 branch May 24, 2026 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(map mobile): controls panel max-height: 200px forces scrolling on mobile — operator reported repeatedly

1 participant