Skip to content

Add a Show menu to the Search panel for the media filter - #429

Merged
lstein merged 1 commit into
masterfrom
lstein/feature/search-panel-show-menu
Nov 7, 2026
Merged

lstein merged 1 commit into
masterfrom
lstein/feature/search-panel-show-menu

Conversation

@lstein

@lstein lstein commented Nov 7, 2026

Copy link
Copy Markdown
Owner

Summary

Choosing between images, videos and both used to mean opening the semantic map. A new Show icon in the Search panel, between Bookmarks and By Map, opens a small menu, and the icon changes to show the active mode. The map's Images/Videos/Both radio buttons were redundant after that, so they are removed.

Mode Icon Why
Images Camera The picture frame already means By Image
Videos Clapper Pairs with the camera
Both Small camera and clapper on a diagonal Literally the other two

Behaviour

  • Same setting as before: the menu calls setMediaFilter, so the swiper, grid, search and map react just as they did to the radios.
  • Albums with only one media type: Show greys out and its tooltip gives the reason. The saved choice is kept and applies again on the next mixed album.
  • /media_indices fails: Show stays usable and the tooltip says the list could not be read. The map classifies its own points and may still be filtered, so this is the only way to change it.
  • Closing the menu: an outside click or touch, Esc, an album change, a resize or rotate, or entering or leaving fullscreen.

media-filter.js gains albumMediaMix() and a mediaIndicesUpdated event, because mediaFilterChanged deliberately stays quiet when nothing was or is filtered.

Layout

The seventh icon overran the panels, and these changes also affect the Control panel:

  • 601–860px: icon rows tighten to 1px gaps so the panels clear each other on portrait iPads. Labels are tight there.
  • Below 430px: buttons step down from 48px to 40px, including on 390–393px iPhones, where the row was clipping. Gaps go to zero below 358px.
  • Stacked panels: now box-sizing: border-box, which fixes rows sitting off-centre and clipping on the right.

Known limitations

  • Fullscreen: the panels are hidden in document fullscreen, so the filter can't be changed there. The radios stayed reachable through the map window.
  • Windows about 601–743px wide: the panels still overlap, by less than before.
  • 320px screens: the Control panel's outer labels still clip by about 6px per side, also less than before.

Testing

  • npm test (1036 passing), plus lint and format checks.
  • pytest tests passed before the radio removal and review fixes; those later changes only touch frontend files and docs.
  • Driven with Playwright in Chromium on an album of images and videos: filtering, album switch, disabled state, and a failed /media_indices.
  • An adversarial review ran over the diff, and its confirmed bugs are fixed.
  • The author has tried it and approved opening this PR.

🤖 Generated with Claude Code

Choosing between images, videos and both meant opening the semantic map.
A new icon between Bookmarks and By Map opens a small menu, and the icon
changes to show the active mode: a camera for images, a clapper for videos,
and the two together for both. The picture frame was already taken by By
Image. The map's radio buttons are redundant now and are removed.

The control is greyed out for an album holding only one kind, whose reason
it gives in a tooltip. If /media_indices fails it stays usable, because the
map classifies its own points and may still be filtered.

media-filter.js gains albumMediaMix() and a mediaIndicesUpdated event, since
mediaFilterChanged deliberately stays quiet when nothing was or is filtered.

A seventh icon overran the panels, so the icon rows tighten at 601-860px and
step down to 40px buttons below 430px. Stacked panels also use border-box,
which stops their rows sitting off-centre and clipping on the right.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lstein
lstein enabled auto-merge (squash) November 7, 2026 00:03
@lstein
lstein merged commit 00f6c81 into master Nov 7, 2026
11 checks passed
@lstein
lstein deleted the lstein/feature/search-panel-show-menu branch November 7, 2026 00:16
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.

1 participant