You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Modals: corner close button on every dialog, and open the EEG viewer in one #199
That works, and Esc works (native <dialog> behaviour), but there is no X in the top-right corner where people look first. On the long dialogs the Close button is below the fold, so the only discoverable exit is Esc, which not everyone knows.
Affected today (src/components/ActionBar.astro):
[data-download-dialog] — Download this dataset
[data-compute-dialog] — Compute on this dataset
[data-citations-dialog] — Citations
Plus src/components/ConfirmDialog.astro (its Cancel button is the equivalent affordance; confirm whether an X is right there or whether Cancel already covers it) and the role="dialog" popover in src/components/ProvenanceToggle.astro.
Ask: a shared, theme-aware corner close affordance, used by every dialog rather than re-styled per file. Keep the existing bottom Close button where it reads as a natural end-of-content action; the X is an addition, not a replacement. Keep Esc working. aria-label="Close" on the X, and it must be reachable and visible on keyboard focus.
2. The EEG viewer should open in a full-screen modal
The Zarr signal viewer currently mounts inline, into a slot inside the BIDS file tree row (src/pages/dataset/[id].astro, the previewType === "eeg" branch calling mountEegViewer). A multi-channel scope squeezed into a tree row is the wrong shape for the content: channels are cramped and the time axis is short.
Ask: open it in the same modal treatment the other dialogs use, sized to roughly 70% of the viewport, with the corner close button from part 1.
Constraints worth stating up front:
Keep the code-split. The viewer + zarrita bundle must still load only when a signal file is first opened, not on page load.
Keep every existing failure path intact: zarrAvailable === "false" with its zarrFailureReason, the mount-failed catch with the download fallback, and the aria-busy / data-loaded slot state machine that prevents concurrent fetches on rapid re-open.
The viewer sizes itself to its container; verify it lays out correctly at modal size rather than assuming it reflows for free.
Closing the modal should not orphan the viewer instance or leave a streaming fetch running. Check what mountEegViewer returns and whether there is a teardown path; if there isn't, add one.
Both themes, per the tokens rule in AGENTS.md.
Related: #109 (auto-scale initial gain) touches the same viewer but is independent; whichever lands second rebases.
Activity