Skip to content

Move Tests and CI icons from top nav to sidebar - #356

Merged
EliSchleifer merged 14 commits into
mainfrom
nav-icons-sidebar
Sep 18, 2026
Merged

EliSchleifer merged 14 commits into
mainfrom
nav-icons-sidebar

Conversation

@EliSchleifer

Copy link
Copy Markdown
Member

Match the Merge Queue treatment in docs.json: tabs carry no icon, and the icon is attached to the left-nav group instead.

  • Tests — moved "icon": "flask" off the tab onto the Flaky Tests group.
  • CI — the tab used a flat pages list, so it's now wrapped in a groups entry named CI (same pages, same order) with /assets/icons/product-ci.svg on the group.

Note: Merge Queue and CI use product SVGs, while Tests still uses the built-in flask glyph — there is no product-flaky-tests.svg in assets/icons/ yet.

🤖 Generated with Claude Code

Match the Merge Queue treatment: tabs carry no icon, and the icon is
attached to the left-nav group instead.

- Tests: move "flask" onto the Flaky Tests group
- CI: wrap the tab's flat page list in a CI group and attach
  product-ci.svg to it

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

mintlify Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
trunk 🟢 Ready View Preview Sep 18, 2026, 8:57 AM

EliSchleifer and others added 3 commits September 18, 2026 08:10
Replaces Mintlify's built-in "flask" glyph with the exact icon the app
uses for the Tests product (lucide FlaskConical, per PRODUCT_CONFIG in
trunk2), stored alongside the other product icons.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The framework grid was 3 columns wide, so each card's logo rendered at a
third of the page width. Five columns shrinks the cards, and the images
scale with them.

Also switch the new Tests icon from currentColor to a literal black
stroke, matching the solid-black source convention styles.css documents
for custom SVGs (Mintlify renders them as <img> and inverts for dark).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Same treatment as the test frameworks grid: five columns instead of
three, so each provider logo renders at a fifth of the page width.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Mintlify's Columns component accepts cols values from 1 to 4, so the
cols={5} on these two grids was out of range. Four across is the widest
supported, and still shrinks the logos relative to the original three.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Checking whether Mintlify's nav-icon image proxy (which 403s on custom
SVG paths) can be bypassed. Revert if this does not render.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A nav icon pointing at a repo file gets rewritten to
/_mintlify/image/<project>/<path>, which is unsigned — CloudFront answers
403 MissingKey, so the sidebar <img> never loads and the group header
shows a blank where the icon belongs. This hit all three product icons,
including Merge Queue on production; it was just less obvious next to a
long label than next to "CI".

Page images are unaffected (those get signed mintcdn.com URLs), so the
fix is to hand Mintlify an icon it has no reason to proxy: a data URI.
scripts/embed-nav-icons.py regenerates them from the SVGs, which stay the
source of truth under assets/icons/.

Verified on the branch preview: the sidebar icon now loads at 16x16
instead of reporting naturalWidth 0.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Documents why nav icons are inlined as data URIs, how to regenerate them
after editing an SVG, and the two gotchas that pass Mintlify's checks
while rendering wrong (repo-file nav icons, cols above 4).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
EliSchleifer and others added 2 commits September 18, 2026 08:43
The sidebar group, the eyebrow, and the H1 all read "CI", so the page
stuttered. Merge Queue and Flaky Tests already solve this: the landing
page is titled "Overview" and the product name is carried by the group
header, with og:title keeping the product name for search and social.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Both are gated per page (groups: ["dynamic-ci"] / ["firewatch"]) and
Mintlify does strip those pages from a signed-out visitor's navigation —
but it leaves the emptied tab behind, so the product names still showed
in the top nav. There is no tab-level group restriction in docs.json, so
hide the tabs outright until Mintlify drops emptied tabs on its own.

Tradeoff: hidden applies to everyone, so authorized users no longer get a
tab either and reach these docs by direct link.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
index.mdx's `icon:` frontmatter pointed at /assets/icons/trunk-glyph.svg
and hit the same unsigned-proxy 403 as the group icons — the icon beside
"Trunk Platform" in the nav was never loading.

Extends the script to patch page frontmatter as well. Checked the other
repo-file icons while here: the <Card icon="..."> ones under
setup/integrations/github and ci/get-started resolve to signed mintcdn
URLs and load fine, so page content is genuinely unaffected and stays on
plain paths.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Hiding the tabs took them away from the people who are allowed to see
them too, so move both sections into the Overview tab's sidebar, below
Trunk Platform. Nothing leaks: Mintlify does filter group-gated pages out
of the navigation, and the Overview tab has index to keep it non-empty,
so the emptied-tab bug that forced the hiding never comes up.

The two hidden tabs are removed rather than duplicated, so the page lists
stay single-sourced. Page URLs are unchanged. If Mintlify starts dropping
tabs whose pages are all filtered, this can go back to being two tabs.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@EliSchleifer
EliSchleifer merged commit 8ddbc7b into main Sep 18, 2026
3 checks passed

This branch was successfully deployed

1 active deployment
staging 9f104d45 Deployed Sep 18, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant