Skip to content

Hover and annotation colour - #104

Merged
AlexisJanin merged 3 commits into
mainfrom
hover-and-annotation-colour
Sep 10, 2026
Merged

AlexisJanin merged 3 commits into
mainfrom
hover-and-annotation-colour

Conversation

@AlexisJanin

Copy link
Copy Markdown
Collaborator

No description provided.

alexisj-inria and others added 3 commits September 10, 2026 16:29
The annotation modal pre-filled its colour picker with the clicked
signal's line colour, so a mark came out in the one colour it cannot be
read against. It now always opens on the palette default.

The pre-fill also only ever fired for a signal given an explicit colour
in database_options — Plotly assigns colorway colours at render time, so
an uncoloured signal's trace has none — making the behaviour inconsistent
between signals for no reason visible to a user.

Drops the whole path rather than just the read: `line_color` leaves the
trace_map store (with the defensive try/except that produced it) and
`suggested_color` leaves modal_data, so nothing dead crosses the store.
Annotations already in annotations.json keep their colour.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
UNIFIED_HOVER gated two settings with different preconditions: a time
format needs a time axis, a unified panel needs traces worth reading
together at one x. PSD has the second without the first, so the flag
could not express it.

The time format moves to TIME_AXIS and UNIFIED_HOVER keeps the panel
style, which lets psd drop its UNIFIED_HOVER = False. A PSD's rows lose
the frequency the panel header already carries, and PlotOptions grows
x_axis_hover_format so that header reads 12.2 rather than a raw bin
centre — set by a plot type whose x is not time, unlike the user's
time format.

Spectrogram gains the user's hover time format as a result: its x is
time and its heatmap hover printed a raw %{x}, ignoring the setting.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@AlexisJanin AlexisJanin self-assigned this Sep 10, 2026
@AlexisJanin AlexisJanin added the enhancement New feature or request label Sep 10, 2026
@AlexisJanin
AlexisJanin merged commit 3229e5b into main Sep 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants