Skip to content

fix: dismiss ROM detail sidebar by re-clicking selected ROM#176

Merged
JZimz merged 1 commit into
mainfrom
JZimz/sidebar-close-btn
Apr 3, 2026
Merged

fix: dismiss ROM detail sidebar by re-clicking selected ROM#176
JZimz merged 1 commit into
mainfrom
JZimz/sidebar-close-btn

Conversation

@JZimz

@JZimz JZimz commented Apr 3, 2026

Copy link
Copy Markdown
Owner

What's changed?

Plain-clicking an already-selected ROM now deselects it, which closes the detail sidebar. Previously a plain click always set the selection, so once the sidebar opened there was no way to close it.

Why?

Reported by a community member — after clicking a ROM, the sidebar stays open with no dismiss mechanism. The only workaround was restarting the app. Closes #169

How to test

  1. Open ROMie and click a ROM — sidebar opens
  2. Click the same ROM again — sidebar closes
  3. Ctrl/Cmd+click and Shift+click multi-select still work as before

Clicking an already-selected ROM now deselects it, closing the detail
sidebar. Previously there was no way to close the sidebar without
restarting the app.

Closes #169

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@charliecreates charliecreates Bot requested a review from CharlieHelps April 3, 2026 01:41

@charliecreates charliecreates Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Behavior looks correct for the described UX, but the new selection logic is a dense inline ternary that would be clearer as a named boolean or explicit conditional.

Additional notes (1)
  • Readability | src/components/RomList.vue:100-101
    The inline ternary makes the “re-click to deselect” behavior a bit hard to scan/extend (especially if more selection rules are added later). A small, named boolean or an explicit if reads clearer and is easier to debug.
Summary of changes

What changed

  • Updated handleRomClick so a plain click on a ROM that is already the sole selected ROM toggles selection off by emitting [] (closing the detail sidebar).
  • Preserved existing behaviors for Ctrl/Cmd-click (toggle) and Shift-click (range selection).

@charliecreates charliecreates Bot removed the request for review from CharlieHelps April 3, 2026 01:42
@JZimz JZimz merged commit f671dcd into main Apr 3, 2026
1 check passed
@JZimz JZimz linked an issue Apr 6, 2026 that may be closed by this pull request
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.

ROM sidebar can't be closed after selecting a ROM ROM detail sidebar can't be closed after selecting a ROM

1 participant