Repository navigation
fix: analytics pages: render header logo in html, fix anvil logo, load released css (#5003) - #5010
Merged
Merged
Conversation
…d released css (#5003) analytics pages: render the header logo in html, fix anvil's logo and load the released stylesheet. - ship findable-ui 58.0.0's analytics.css with the analytics package and copy it next to each generated index.html, replacing the jsdelivr branch url - render site title, favicon, logo (src, link, alt, width, height) and primary colors into index.html at build time, so they show from first paint - add logo_width, logo_height and extra_css config keys - header markup: fui-header-left wraps fui-header-logo - anvil explorer uses anvilexplorer.png, 44px tall from 1280px up - stat tooltips use the shared .fui-tooltip, capped to the card width, with escape-to-close; chart.js tooltips and colors read the css tokens - bump analytics package to 5.1.0 - re-render gh-pages index.html and add analytics.css, keeping existing data Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: cc-claude-tools <cc-claude-tools@clevercanary.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the build-time branding and bundled-stylesheet changes.
No open issues 🎉
What changed in this PR
Updates the shared analytics generator and published dashboards to render branding in HTML from first paint and use a bundled, released stylesheet, addressing #5003.
Changes:
- Renders titles, favicons, logos, dimensions, and theme colors at build time, with validation before fetching analytics data.
- Bundles findable-ui v58.0.0 CSS, updates tooltip styling, corrects AnVIL Explorer branding, and bumps the analytics package to 5.1.0.
- Regenerates three published dashboards, incorporating earlier template improvements while preserving existing analytics data.
| File | Description |
|---|---|
gh-pages/lungmap/index.html |
Regenerates LungMAP branding and dashboard markup. |
gh-pages/lungmap/analytics.css |
Adds the local released stylesheet. |
gh-pages/hca-explorer/index.html |
Regenerates HCA branding and dashboard markup. |
gh-pages/hca-explorer/analytics.css |
Adds the local released stylesheet. |
gh-pages/anvil-explorer/index.html |
Regenerates AnVIL branding with the corrected, responsive logo. |
gh-pages/anvil-explorer/analytics.css |
Adds the local released stylesheet. |
analytics/uv.lock |
Records analytics version 5.1.0. |
analytics/lungmap/generate_static_site.py |
Configures LungMAP logo dimensions. |
analytics/hca-explorer/generate_static_site.py |
Configures HCA logo dimensions. |
analytics/anvil-explorer/generate_static_site.py |
Corrects the logo asset and configures responsive sizing. |
analytics/anvil-catalog/generate_static_site.py |
Configures AnVIL Catalog logo dimensions. |
analytics/analytics_package/pyproject.toml |
Bumps the version and includes CSS in package data. |
analytics/analytics_package/analytics/static_site/template/index.html |
Adds branding placeholders, local CSS, and shared tooltip behavior. |
analytics/analytics_package/analytics/static_site/template/analytics.css |
Bundles findable-ui v58.0.0 dashboard styles. |
analytics/analytics_package/analytics/static_site/README.md |
Documents branding options and bundled stylesheet maintenance. |
analytics/analytics_package/analytics/static_site/generator.py |
Adds validated HTML rendering and stylesheet copying before data fetching. |
Review effort: Balanced
NoopDog
approved these changes
Oct 29, 2026
NoopDog
left a comment
Collaborator
There was a problem hiding this comment.
Thanks Fran! Nice to have the logo there from first paint.
2 tasks
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.
Closes #5003
What changed
Stylesheet:
analytics.cssfrom findable-ui v58.0.0 now ships with the analytics package (template/analytics.css, included in package data).generate_site()copies it next to eachindex.html, and the template links it relatively. This replaces the jsDelivr link to thefran/873-static-cssbranch.Branding at build time: the new
render_page()/write_page()write the site's branding intoindex.htmlwhen it is generated:<title>and page heading--fui-primary,--fui-primary-darkand--fui-header-logo-heightThe JS that set these after
data/config.jsonloaded is removed.New config keys (all optional):
logo_width,logo_height: the logo's size in px, as shown in the app's header.extra_css: extra CSS for<head>, e.g. a per-breakpoint logo height.Setting only one of
logo_width/logo_heightraises an error, and so does an unknown{{token}}in the template. The page is rendered before the GA4 fetch, so a config mistake stops the run at once.Header markup: now
<div class="fui-header-left"><a class="fui-header-logo">…</a></div>, so only the logo is clickable rather than the whole left column.Site configs:
anvilExplorer.png(waslogoAnvil.png)Stat tooltips:
.fui-tooltip, witharia-describedbyand the Escape-to-close script from the analytics.css usage notes..stat-tooltipCSS is removed.Chart.js: tooltips follow the usage-notes snippet. Tooltip, text and series colours are read from
--fui-ink,--fui-ink-lightand--fui-primary.Stat values: use the theme's heading-xlarge, so they are 40px on desktop (30px on mobile), as intended.
Version: the analytics package goes to 5.1.0.
gh-pages/: the anvil-explorer, hca-explorer and lungmap pages are re-rendered andanalytics.cssis added.data/is unchanged: the July 2026 data stays.Why
The analytics pages' headers didn't match their explorers:
The generator copies the template over
index.htmlon every run, so the template is the only place a fix lasts. anvil-portal#4201 is waiting on this release.Assumptions I made
useBreakpointHelper(UP, "md"), and findable-ui'smdis 1280.width/heightattributes keep the aspect ratio exact; findable-ui'sLogorenders them the same way.site_title. The AnVIL explorer itself uses "NHGRI Analysis Visualization and Informatics Lab-space".analytics.css, not a CDN link, so each generated site works on its own. When findable-ui is upgraded, re-copy it fromnode_modules; the README names the source version.gh-pages/also deploys three template changes that were never deployed (fix: generalize access-request service classification and stat cards in analytics template (#4922) #4930, refactor: consolidate stat-card markup in static analytics template (#4923) #4931, chore: cap static analytics detail exports at top-n rows (#4924) #4932). All three pages load the July data without errors.analytics-5.1.0is tagged after merge, and anvil-portal#4201 then moves to it.How to verify
cd gh-pages && python3 -m http.server 8080.Definition of done:
data/*.jsonloads.<img>: it should be 198.09×32 or 272.38×44, matching the explorer.analytics.css.analytics.csscoming from the page's own origin, with no request tocdn.jsdelivr.net/gh/DataBiosphere/findable-ui@fran/873-static-css.Also check:
--fui-ink) with 13px text, like the stat tooltips.Screenshots
🤖 Generated with Claude Code
🐦 Built with cc-claude-tools