Repository navigation
feat(viewer): gear settings menu + notch default from PowerLineFrequency + cursor white-flash fix - #104
Merged
Conversation
- Collapse the set-once controls (HP/LP/notch filters + DC/Events/Butterfly/ Clock) into a gear popover so the primary bar is just Time/Scale/Channels. Click-outside / Escape close it; a dot on the gear marks an active filter. - Default the notch from the recording's BIDS PowerLineFrequency: the store now carries a `power_line_frequency` attr (embedded by the converter), and the viewer turns the notch on at that frequency (50/60). Datasets without the sidecar field open unfiltered. - Fix the canvas flashing white when the cursor enters/leaves: assigning canvas.width/height clears the bitmap, so only do it on an actual size change, only re-render on width changes, and keep the readout to one line.
- .eegv__menu: hide via the stylesheet (display:none) too, not only the inline style, so the closed state survives if the inline style is stripped. - ResizeObserver: init lastObservedW to -1 so a zero-width first observation (viewer mounted into a hidden/zero-width container) still renders once.
Contributor
Author
Review response (code-reviewer + silent-failure-hunter, Sonnet)Addressed in
Verified and intentionally not changed:
546 tests, 0 type errors, lint clean, build green. |
Deploying nemar-website with
|
| Latest commit: |
d87378b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://39bc7a01.nemar-website.pages.dev |
| Branch Preview URL: | https://feat-viewer-settings-menu.nemar-website.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Viewer refinements (follows P1 #103). Companion producer: nemarDatasets/.github#26.
Gear settings menu
The set-once controls (HP/LP/notch filters + DC/Events/Butterfly/Clock) move into a gear popover, so the primary bar is just Time / Scale / Channels. Click-outside and Escape close it; a dot on the gear marks an active filter so it's clear the trace is filtered even with the menu closed. Keyboard shortcuts (
d/b/t) still work since they drive the same checkboxes.Notch default from PowerLineFrequency
The store now carries a
power_line_frequencyattr (embedded by the converter, #26 above).openRecordingparses it intoRecordingStore.powerLineFrequency, and the viewer defaults the Notch select + filter to it (50/60 Hz). Datasets without the sidecar field open unfiltered — exactly the "if it has it, set it; if not, leave it off" behavior. This is inert until a dataset re-converts with #26.Cursor white-flash fix
Moving the pointer in/out of the scope could flash the canvas white: the readout row changing height fired the ResizeObserver → render() →
sizeCanvas()reassignedcanvas.width, and assigning canvas dimensions clears the bitmap. Fix:546 tests pass, 0 type errors, lint clean, build green. Verified on nm000132 via the dev server (primary bar = Time/Scale/Channels; Filter+Display in the popover; notch defaults off since nm000132's store predates the attr).