Skip to content

fix(analysis): say which component your data hit, so it can be read - #171

Merged
adamjohnwright merged 1 commit into
mainfrom
fix/analysis-hit-legibility
Sep 4, 2026
Merged

fix(analysis): say which component your data hit, so it can be read#171
adamjohnwright merged 1 commit into
mainfrom
fix/analysis-hit-legibility

Conversation

@adamjohnwright

Copy link
Copy Markdown
Contributor

Curators, re-testing #154: "the components are shown, but an indication of which component is hit in the analysis is missing."

It was not missing — it was unreadable

Run against a real tissue analysis (the HPA experiment through /ExperimentDigester, posted exactly as the Tissue form posts it): 8 popups, 15 component rows, 0 without a marker, and the found/not-found split matches the data. So the report is about what the panel looks like — and on that it is right.

Three things made a present indication unreadable:

  • The marker was on its own line. The row is a column flex, so a 7px dot sat above the name rather than beside it, attached to nothing.
  • A hollow dot was the entire signal for a component your data missed. On a row with no values next to it, there was nothing else to read.
  • The values were three bare numbers. Which tissue each belonged to lived in a tooltip, and nobody hovers a tooltip to find out that a column exists.

Before / after

before                              after
● (on its own line)                 ● CYCS [cytosol]
CYCS [cytosol]                        [Liver 2] [Kidney 3] [Cerebral Cortex 2]
                    2 3 2
                                    ○ APAF1:ATP [cytosol]
○ (on its own line)                   not in your data
APAF1:ATP [cytosol]

The dot now sits against the name it belongs to, with a ring separating found from not-found at a glance; a missed row says not in your data in words; and each value is a chip carrying its sample's name.

And an emphasis that never once worked

The current-sample highlight — "the number you are looking at on the canvas is the one that stands out here" — never fired. state.sample holds the column's name (samples()[index] is what sets it), so Number(...) gave NaN for every real analysis. It only appeared to work when no sample was set, where the fallback happened to be the first column anyway. Now the emphasised chip really is the sample the diagram is coloured by.

Verified on beta

All four states: tissue expression (chips, current sample emphasised), overrepresentation (markers, no chips, since there are no values), a component the data missed, and no analysis at all (no marker, no text, nothing added).

Refs #154 — leaving it open until curators confirm this is what they meant. The larger reading (drawing components as nodes inside the canvas) is untouched and still needs a deliberate decision.

Curators, re-testing #154: "the components are shown, but an indication of
which component is hit in the analysis is missing."

It was not missing. Run against a real tissue analysis -- the HPA
experiment through /ExperimentDigester, posted exactly as the Tissue form
posts it -- every component row carries a marker: 8 popups, 15 rows, none
unmarked, and the found/not-found split matches the data. So the report is
about what the panel looks like, and on that it is right.

Three things made a present indication unreadable:

- **The marker was on its own line.** The row is a column flex, so a 7px dot
  sat above the name rather than beside it, unattached to anything.
- **A hollow dot was the entire signal** for a component your data missed.
  On a row with no values beside it there was nothing else to read.
- **The values were three bare numbers.** Which tissue each belonged to was
  in a tooltip, and nobody hovers a tooltip to discover a column exists.

Now: the dot sits against the name it belongs to, with a ring that separates
found from not-found at a glance; a missed row says "not in your data" in
words; and each value is a chip carrying its sample's name.

Also fixes the emphasis that was supposed to mark the sample the diagram is
coloured by, and never once did. `state.sample` holds the column's *name* --
`samples()[index]` is what sets it -- so reading it as a number gave NaN for
every real analysis. It only appeared to work when no sample was set, where
the fallback was the first column anyway.

Verified on beta across all four states: tissue expression (chips, current
sample emphasised), overrepresentation (markers, no chips), a component the
data missed, and no analysis at all (no marker, no text).

Refs #154

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@adamjohnwright
adamjohnwright enabled auto-merge (squash) September 4, 2026 22:49
@adamjohnwright
adamjohnwright merged commit 14a200e into main Sep 4, 2026
6 checks passed
@adamjohnwright
adamjohnwright deleted the fix/analysis-hit-legibility branch September 4, 2026 22:55
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