Skip to content

docs: revert global theme to restore dev-notes CSS#715

Merged
johnnygreco merged 1 commit into
mainfrom
lbliii/fix-dev-notes-layout
May 29, 2026
Merged

docs: revert global theme to restore dev-notes CSS#715
johnnygreco merged 1 commit into
mainfrom
lbliii/fix-dev-notes-layout

Conversation

@lbliii
Copy link
Copy Markdown
Contributor

@lbliii lbliii commented May 29, 2026

📋 Summary

Hotfix that reverts the global-theme migration (#713) to restore the NeMo Data Designer Dev Notes layouts. Under global-theme: nvidia, Fern treats css as a theme-owned field and replaces the child repo's css: list at publish, so DataDesigner's product stylesheets (blog-card, authors, notebook-viewer, metrics-table, trajectory-viewer, main) stopped loading and the Dev Notes pages collapsed to unstyled HTML.

🔗 Related Issue

🔄 Changes

🐛 Fixed

  • Restored the self-hosted theme config in fern/docs.yml (layout, colors, theme, footer, logo, favicon, js) and the full product css: list, so the Dev Notes kit components are styled again.

✨ Added

  • Re-added fern/components/CustomFooter.tsx and the NVIDIA_{dark,light,symbol}.svg assets.

🔧 Changed

  • Reverted the fern.config.json CLI pin and README global-theme notes.

🧪 Testing

  • fern check passes (0 errors)
  • make test (n/a — docs-only change)

✅ Checklist

  • Follows commit message conventions
  • Commits are signed off (DCO)
  • Architecture docs updated (n/a)

Temporary hotfix. Re-land the canonical theme later by moving the product CSS into the NVIDIA/fern-components theme repo, or by having the Dev Notes kit components self-inject their CSS (component dirs are not theme-owned, so they survive the merge).

🤖 Generated with Claude Code

Reverts #713. Under global-theme: nvidia, Fern treats `css` as a
theme-owned field and replaces the child repo's `css:` list at publish,
so DataDesigner's product stylesheets (blog-card, authors,
notebook-viewer, metrics-table, trajectory-viewer, main) stopped loading
and the dev-notes layouts collapsed to unstyled HTML.

Temporary hotfix: restore the self-hosted theme + product CSS so the
dev-notes render correctly. Re-land the canonical theme later once the
product CSS is injected via components or merged into the theme repo.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Lawrence Lane <llane@nvidia.com>
@lbliii lbliii requested a review from a team as a code owner May 29, 2026 17:15
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 29, 2026

Greptile Summary

This hotfix reverts the global-theme: nvidia migration (#713) that caused Fern to override the child repo's css: list at publish time, collapsing Dev Notes pages to unstyled HTML. All self-hosted theme configuration in docs.yml, the CustomFooter.tsx component, NVIDIA SVG assets, and the Fern CLI version pin are restored to their pre-#713 state.

  • fern/docs.yml: global-theme: nvidia is removed; layout, colors, theme, footer, logo, favicon, js, and the full product css: list are reinstated so Dev Notes component styles load again.
  • fern/components/CustomFooter.tsx + fern/assets/NVIDIA_*.svg: Re-added custom footer and logo SVG assets that the self-hosted config depends on.
  • fern/fern.config.json: CLI pin reverted from 5.41.1 to 5.24.0.

Confidence Score: 4/5

Safe to merge; restores a known-good docs configuration that was broken by the previous PR.

The revert is straightforward and the fern check passes. The only item worth a second look is CustomFooter.tsx using the same S3-hosted logo URL for both only-light and only-dark img elements — the local dark/light SVG variants added in this PR are used by the header logo but not the footer, so dark-mode footer branding may render with the wrong logo.

fern/components/CustomFooter.tsx — both footer logo img elements share one URL; the dark-mode image should reference the local NVIDIA_dark.svg just as docs.yml's logo config does.

Important Files Changed

Filename Overview
fern/docs.yml Reverts global-theme: nvidia, restoring self-hosted layout/colors/logo/favicon/js/css config; product stylesheet list fully reinstated.
fern/components/CustomFooter.tsx Re-added custom footer component; both only-light and only-dark logo img elements share the same S3 URL instead of the local dark/light SVG variants.
fern/fern.config.json Reverts Fern CLI version pin from 5.41.1 back to 5.24.0 as part of the hotfix rollback.
fern/README.md Documentation updated to remove global-theme references and reflect the restored self-hosted asset structure.
fern/assets/NVIDIA_dark.svg Re-added NVIDIA logo SVG (white fill) for dark-mode use in docs.yml logo config.
fern/assets/NVIDIA_light.svg Re-added NVIDIA logo SVG (dark fill) for light-mode use in docs.yml logo config.
fern/assets/NVIDIA_symbol.svg Re-added NVIDIA symbol SVG used as the favicon in docs.yml.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[fern/docs.yml] -->|references| B[fern/components/CustomFooter.tsx]
    A -->|logo dark| C[fern/assets/NVIDIA_dark.svg]
    A -->|logo light| D[fern/assets/NVIDIA_light.svg]
    A -->|favicon| E[fern/assets/NVIDIA_symbol.svg]
    A -->|css list| F[fern/main.css + styles/*.css]
    A -->|js| G[Adobe DTM script]
    A -->|version| H[fern/fern.config.json v5.24.0]

    subgraph Reverted from PR #713
      I[global-theme: nvidia]
    end

    I -.->|replaced css list at publish| F
    A -->|restores| F
Loading
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
fern/components/CustomFooter.tsx:23-30
Both `only-light` and `only-dark` footer logo images point to the same S3 URL, so dark mode will render a logo intended for a light background. The local `NVIDIA_dark.svg` (white-fill) and `NVIDIA_light.svg` (dark-fill) assets added in this PR are already referenced by `docs.yml` for the header logo — the footer should follow the same pattern.

```suggestion
              <a
                className="footer-brand"
                href="https://www.nvidia.com"
                target="_blank"
                rel="noopener"
              >
                <img src="./assets/NVIDIA_light.svg" className="logo__image only-light" alt="NVIDIA" />
                <img src="./assets/NVIDIA_dark.svg" className="logo__image only-dark" alt="NVIDIA" />
```

Reviews (1): Last reviewed commit: "docs: revert global theme to restore dev..." | Re-trigger Greptile

Comment on lines +23 to +30
<a
className="footer-brand"
href="https://www.nvidia.com"
target="_blank"
rel="noopener"
>
<img src={logoUrl} className="logo__image only-light" alt="NVIDIA" />
<img src={logoUrl} className="logo__image only-dark" alt="NVIDIA" />
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Both only-light and only-dark footer logo images point to the same S3 URL, so dark mode will render a logo intended for a light background. The local NVIDIA_dark.svg (white-fill) and NVIDIA_light.svg (dark-fill) assets added in this PR are already referenced by docs.yml for the header logo — the footer should follow the same pattern.

Suggested change
<a
className="footer-brand"
href="https://www.nvidia.com"
target="_blank"
rel="noopener"
>
<img src={logoUrl} className="logo__image only-light" alt="NVIDIA" />
<img src={logoUrl} className="logo__image only-dark" alt="NVIDIA" />
<a
className="footer-brand"
href="https://www.nvidia.com"
target="_blank"
rel="noopener"
>
<img src="./assets/NVIDIA_light.svg" className="logo__image only-light" alt="NVIDIA" />
<img src="./assets/NVIDIA_dark.svg" className="logo__image only-dark" alt="NVIDIA" />
Prompt To Fix With AI
This is a comment left during a code review.
Path: fern/components/CustomFooter.tsx
Line: 23-30

Comment:
Both `only-light` and `only-dark` footer logo images point to the same S3 URL, so dark mode will render a logo intended for a light background. The local `NVIDIA_dark.svg` (white-fill) and `NVIDIA_light.svg` (dark-fill) assets added in this PR are already referenced by `docs.yml` for the header logo — the footer should follow the same pattern.

```suggestion
              <a
                className="footer-brand"
                href="https://www.nvidia.com"
                target="_blank"
                rel="noopener"
              >
                <img src="./assets/NVIDIA_light.svg" className="logo__image only-light" alt="NVIDIA" />
                <img src="./assets/NVIDIA_dark.svg" className="logo__image only-dark" alt="NVIDIA" />
```

How can I resolve this? If you propose a fix, please make it concise.

@github-actions
Copy link
Copy Markdown
Contributor

Summary

PR #715 is a focused hotfix that reverts PR #713 (the canonical NVIDIA Fern global-theme migration, merged earlier today, 2026-05-29). The premise is well stated and easy to verify: under global-theme: nvidia, Fern treats css as a theme-owned field and replaces the child repo's css: list at publish, which silently dropped DataDesigner's product stylesheets (main.css, styles/notebook-viewer.css, authors.css, metrics-table.css, trajectory-viewer.css, blog-card.css) and left the Dev Notes pages rendering as unstyled HTML.

The change set is exactly the inverse of #713:

  • fern/docs.yml — drops global-theme: nvidia and restores the explicit layout, colors, theme, footer, logo, favicon, js, and full css: list.
  • fern/components/CustomFooter.tsx — restored (96 lines).
  • fern/assets/NVIDIA_{dark,light,symbol}.svg — restored.
  • fern/fern.config.json — pin reverted from 5.41.15.24.0.
  • fern/README.md — removes the "Theme" section and the inline notes that referenced global-theme inheritance.

Scope is docs/site config only. No Python, no engine, no public API. Risk is contained to the docs build.

Findings

Correctness / convention

  • The revert is faithful. Every field re-introduced in docs.yml mirrors the pre-docs: adopt canonical NVIDIA Fern global theme #713 config, and the css: list now matches the six stylesheets the Dev Notes kit and product MDX components depend on. fern check is reported as green in the PR body — consistent with what the diff shows.
  • New (restored) source files carry the correct SPDX headers (SPDX-FileCopyrightText + SPDX-License-Identifier: LicenseRef-NvidiaProprietary). This matches the project's make update-license-headers convention.
  • CustomFooter.tsx uses target="_blank" rel="noopener" (and noopener noreferrer on the buildwithfern link) — correct for outbound links.
  • README structural diagram is updated coherently (docs.yml description, assets/, main.css line, CustomFooter.tsx re-listed under components).

Risks & things to flag

  1. CLI version regression: fern.config.json 5.41.1 → 5.24.0. This is a 17-minor-version step backward. It's necessary because the global-theme behavior was Fern-version-specific, but it does mean the docs build now runs on an older toolchain. Worth tracking explicitly so the next theme attempt can re-pin forward, and so security/bugfix advisories against <5.41 don't go unnoticed.
  2. No guardrail against accidental re-introduction. PR docs: adopt canonical NVIDIA Fern global theme #713 was merged 6 hours before this revert; there's nothing in the repo (a CHANGELOG note, a comment in docs.yml, or a follow-up issue link) that warns the next contributor why global-theme: nvidia is off and what specifically broke. Consider a one-line comment in docs.yml near the explicit css: list, e.g. # Do not switch to global-theme until product CSS is theme-owned or component-injected (#713 broke Dev Notes). The PR body has the long-term remediation plan, but PR bodies aren't discoverable from the file.
  3. CustomFooter.tsx — SSR/hydration nit (pre-existing). currentYear = new Date().getFullYear() runs both server- and client-side. At a year boundary it can hydrate-mismatch. Not introduced by this PR (it's a faithful restoration), so not blocking — flagging only because the file is touched again here, and a useState/build-time constant would be a one-line fix if Fern's SSR ever surfaces a warning.
  4. Hardcoded external image dependency (pre-existing). The footer logo points to fern-image-hosting.s3.us-east-1.amazonaws.com/.... Same caveat: not introduced here, but it's a single point of failure. The repo has the NVIDIA SVGs locally in fern/assets/ now — using one of those instead of the S3 URL would remove the external dep. Worth a follow-up, not a blocker.
  5. Adobe DTM script reinstated (js: block, strategy: beforeInteractive). This is a third-party analytics tag, restored as it was pre-docs: adopt canonical NVIDIA Fern global theme #713. Mentioning only because beforeInteractive blocks rendering until the script loads; if the global-theme branch had moved this to lazyOnload, that benefit is lost in the revert. Likely intentional (NVIDIA-mandated analytics ordering) but worth confirming with whoever owns the corp analytics requirements.

Test coverage

  • Marked n/a, correctly — this is a docs-only / site-config change. The relevant signal is fern check (green per PR body) and a visual confirmation that the Dev Notes pages render with their full stylesheets again. The latter isn't shown in the PR; a screenshot or preview-deploy link would strengthen the change but isn't required.

Performance / security

Verdict

Approve as a hotfix. This is a tight, well-motivated revert that restores a known-good docs state after #713 broke Dev Notes styling in production. The diff is exactly what the PR description claims — no scope creep, no incidental changes.

Two suggestions before/after merge, neither blocking:

  1. Add a short comment in fern/docs.yml (next to the explicit css: list or theme: block) noting that global-theme: nvidia was tried and reverted, with a link to this PR. Prevents a future contributor from re-applying docs: adopt canonical NVIDIA Fern global theme #713 on the assumption it was an oversight.
  2. File a follow-up issue capturing the long-term plan from the PR body (move product CSS into NVIDIA/fern-components, or have the Dev Notes kit components self-inject their CSS) and the pending Fern CLI re-pin. Otherwise that context lives only in this PR description and is easy to lose.

@github-actions
Copy link
Copy Markdown
Contributor

MkDocs preview: https://32f038bc.dd-docs-preview.pages.dev

Fern preview: https://nvidia-preview-pr-715.docs.buildwithfern.com/nemo/datadesigner

Fern previews include the docs-website version archive with PR changes synced into latest. Notebook tutorials are rendered without execution outputs in previews.

@johnnygreco johnnygreco merged commit 8c4856f into main May 29, 2026
63 checks passed
johnnygreco added a commit that referenced this pull request May 29, 2026
* fix: sync Fern root config during devnote publish

Signed-off-by: Johnny Greco <jogreco@nvidia.com>

* docs: re-adopt global theme; components self-inject CSS

Re-adopts the canonical NVIDIA Fern global theme (global-theme: nvidia)
and fixes the root cause that forced the #715 hotfix revert: `css` is a
theme-owned field, so under a global theme Fern replaces the child repo's
`css:` list with the theme's stylesheets at publish, silently dropping
DataDesigner's product CSS.

Instead of relying on the (theme-owned) `css:` field, each dev-note kit
component now injects its own styles via a <style dangerouslySetInnerHTML>
tag in its render output. Component MDX is not theme-owned, so the styling
survives the theme merge. This is the same approach NemoClaw uses.

- docs.yml: add global-theme: nvidia; drop theme-owned footer/layout/
  colors/theme/favicon/js and the entire css: block; keep the partial
  logo override, GitHub navbar link, and MDX components.
- Inline each component's CSS as a <style> tag: BlogCard/BlogGrid, Authors,
  NotebookViewer, MetricsTable, TrajectoryViewer, and the badge-icon rule
  in BadgeLinks.
- Remove now-unused fern/main.css, fern/styles/*.css, the local NVIDIA
  logo SVGs, and CustomFooter.tsx (all provided by the theme).
- fern.config.json: bump CLI pin to 5.41.1 for global-theme support.
- fern-published-branch.py + README: drop CSS-file references; document
  the self-injected-styles pattern.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Lawrence Lane <llane@nvidia.com>

* docs: address review — themeable accent, CSS comments, safety notes

- BlogCard hover uses var(--accent, #76b900) so the theme palette drives it.
- Restore the explanatory CSS comments lost in the port (rmiz click-to-zoom
  and media margin-reset rationale; NotebookViewer section headers).
- Note at each injection site that the CSS is a static string literal, so
  dangerouslySetInnerHTML carries no user input.
- README documents why injection is intentionally unconditional (duplicate
  <style> tags are harmless; a render-time guard would risk SSR hydration
  mismatch) and points at React <style precedence> as the future dedupe path.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Lawrence Lane <llane@nvidia.com>

---------

Signed-off-by: Johnny Greco <jogreco@nvidia.com>
Signed-off-by: Lawrence Lane <llane@nvidia.com>
Co-authored-by: Johnny Greco <jogreco@nvidia.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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.

2 participants