Skip to content

Label the funders histogram axes, and quiet the clean checks on /relation_integrity - #537

Merged
robsv merged 3 commits into
mainfrom
feature-funders-histogram-and-empty-sections
Oct 7, 2026
Merged

robsv merged 3 commits into
mainfrom
feature-funders-histogram-and-empty-sections

Conversation

@robsv

@robsv robsv commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

Two unrelated UI fixes, three commits.

/funders — the histogram had no axis labels

dis_plots has no single-series vertical bar chart. The only bar options are
stacked_bar_chart and hbar_chart, which is horizontal — so the histogram
was drawn by stacking a single series. That renders correctly (vbar_stack of
one series is a plain vbar), but it left the chart with nothing naming its
axes.

The cause is that stacked_bar_chart identifies its series through a legend,
so it never sets an axis label. Of its thirteen callers the funders histogram
is the only one passing legend=False, and the only single-series one:
having suppressed the legend it had no label of any kind left. The other twelve
are genuinely stacked, read fine from their legends, and are untouched.

Adds bar_chart — the vertical counterpart to hbar_chart — taking x_label
and y_label that default to the field names. Same color, grid, baseline and
background as before, so the only visual change is the labels, and it carries
the same _make_clickable drill-down support as its neighbours. No legend to
suppress.

The histogram now reads Funders named on a record against Records.

/relation_integrity — clean checks were shouting

Eight checks run; four are clean on current data. Each clean one rendered a
heading, a paragraph explaining the check, and "Nothing found." — and got a
summary card at the top reading 0, linking down to that "Nothing found."
Half the page, and half the card row, was about things that had not happened.

Two changes, both only affecting checks with no findings:

  • The explanatory paragraph goes. It explains what to do about a finding,
    which is moot when there are none. The heading stays: it is what makes the
    severity-band counts reconcile, and (0) is itself the useful statement —
    the check ran and found nothing.
  • The card goes. The row is the at-a-glance summary of what needs
    attention. Current data takes it from eight cards to four. The (0) headings
    below still show every check that ran, so nothing is hidden.

Guarded for the all-clean case, where the card list is empty and stat_cards
would render a bare row: that reads "Every check is clean."

Nothing changes for a section that has findings.

Verification

Both pages checked against a running server.

The chart's rendered Bokeh payload carries both labels and no legend:

"axis_label":"Funders named on a record"
"axis_label":"Records"
"VBar" × 3 Legend × 0

/relation_integrity asserted per section — all 8 correct: the 4 clean ones
heading-plus-"Nothing found." with no paragraph, the 4 with findings unchanged,
and 4 cards rendered rather than 8, none reading zero.

113 tests pass. No new lint messages — the C0302 on dis_plots.py was
already present on main at 1185/1000; these 46 lines moved the number, not the
verdict.

🤖 Generated with Claude Code

robsv and others added 3 commits October 7, 2026 13:25
dis_plots had no single-series vertical bar chart - only stacked_bar_chart
and hbar_chart, which is horizontal - so the funders histogram was drawn by
stacking one series. That renders correctly, since vbar_stack of a single
series is a plain vbar, but it left the chart with nothing naming its axes.

stacked_bar_chart identifies its series through a legend, so it never sets
an axis label. Of its thirteen callers the funders histogram is the only
one passing legend=False, and the only single-series one: having suppressed
the legend it had no label of any kind left. The other twelve are genuinely
stacked and read fine from their legends, so they are untouched.

bar_chart takes x_label and y_label, defaulting to the field names, and is
otherwise the same chart: same color, grid, baseline and ghostwhite
background, and the same _make_clickable drill-down support as its
neighbors. No legend to suppress.

The histogram now reads "Funders named on a record" against "Records".

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ctions

A check with no findings rendered three blocks: the heading, the paragraph
explaining the check, and "Nothing found." Four of the eight checks are
clean on current data, so half the page was explanations of things that had
not happened, pushing the sections that do need attention down the screen.

The heading stays. It is what makes the severity-band counts reconcile, and
a count of zero is itself the useful statement: the check ran and found
nothing. The paragraph does not stay - it explains what to do about a
finding, which is moot when there are none.

Nothing changes for a section that has findings.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The card row carried one card per check, so half of it was cards reading
zero whose link led to "Nothing found." The row is the at-a-glance summary
of what needs attention; a zero belongs in it only if nothing else does.

Current data: eight checks, four clean, so the row goes from eight cards to
four. The section headings below still carry their zero, so a check that
ran and found nothing is still visible - it just no longer competes with
the findings for the top of the page.

Guarded for the all-clean case, where the list is empty and stat_cards
would otherwise render a bare row: that says "Every check is clean."

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@robsv robsv self-assigned this Oct 7, 2026
@robsv robsv added the enhancement New feature or request label Oct 7, 2026
@robsv
robsv merged commit ddbb961 into main Oct 7, 2026
2 checks passed
@robsv
robsv deleted the feature-funders-histogram-and-empty-sections branch October 7, 2026 17:30
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.

1 participant