Skip to content

docs: polish banner + add en.dev footer#110

Merged
jdx merged 2 commits intomainfrom
feat/banner-followups
Apr 23, 2026
Merged

docs: polish banner + add en.dev footer#110
jdx merged 2 commits intomainfrom
feat/banner-followups

Conversation

@jdx
Copy link
Copy Markdown
Owner

@jdx jdx commented Apr 23, 2026

Follow-ups to #109 that landed after the merge, plus the en.dev footer.

Summary

Banner polish

  • Contrast: switch to dark text on the pink brand bg (white text failed contrast)
  • z-index: bump to 1001 so the banner stays above the site's nav
  • Centering: message + link centered; dismiss button pinned to the right via absolute positioning
  • Analytics: drop rel=noreferrer so en.dev gets referrer attribution. Keep rel=noopener.

Footer

  • Adds the en.dev footer matching the one on the mise docs, via VitePress's layout-bottom slot

Test plan

  • Run docs dev server, confirm banner text is centered and readable
  • Confirm en.dev footer appears at the bottom of pages
  • Click the \u00d7 on the banner \u2014 dismisses and stays hidden across reload

\U0001F916 Generated with Claude Code


Note

Low Risk
Low risk: docs-only theme/CSS tweaks plus a small rel attribute change on an external link; no backend or data model impact.

Overview
Polishes the docs site announcement banner styling to improve readability and layout (dark text, centered content, higher z-index, and an absolutely positioned dismiss button), with updated responsive padding.

Adds a new EndevFooter component and wires it into VitePress via the layout-bottom slot, and adjusts the banner link to use rel="noopener" (dropping noreferrer).

Reviewed by Cursor Bugbot for commit 151266a. Bugbot is set up for automated code reviews on this repo. Configure here.

Follow-ups to the banner PR plus the en.dev footer.

Banner polish:
- Dark text on the pink brand background for readable contrast
- z-index bumped to 1001 so the banner stays above nav
- Center message+link; dismiss button pinned right via absolute pos
- Drop rel=noreferrer so en.dev gets analytics attribution for clicks

Footer:
- Adds the en.dev footer from the mise docs via the layout-bottom slot

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.08%. Comparing base (eb49d11) to head (151266a).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #110   +/-   ##
=======================================
  Coverage   94.08%   94.08%           
=======================================
  Files          26       26           
  Lines        4055     4055           
  Branches     4055     4055           
=======================================
  Hits         3815     3815           
  Misses        155      155           
  Partials       85       85           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 23, 2026

Greptile Summary

This PR polishes the existing announcement banner (contrast, z-index, centering, dismiss button positioning) and adds a new EndevFooter component injected via VitePress's layout-bottom slot to match the en.dev branding on the mise docs. The only behavioral change is dropping rel=noreferrer on the banner outbound link so that referrer attribution flows to en.dev.

Confidence Score: 5/5

Safe to merge — purely visual/docs changes with no logic regressions.

All changes are CSS tweaks, a new presentational Vue component, and one intentional rel attribute change. No P0 or P1 findings; the only previously noted centering nuance is already in the thread.

No files require special attention.

Important Files Changed

Filename Overview
docs/.vitepress/theme/EndevFooter.vue New Vue component rendering an en.dev branded footer with dynamic copyright year; clean, scoped CSS, no issues.
docs/.vitepress/theme/banner.css Banner polish: z-index raised to 1001, dark text for contrast, flex centering with symmetric-ish padding, button repositioned with absolute positioning inside the fixed banner container.
docs/.vitepress/theme/banner.ts Drops noreferrer from the outbound link, keeping noopener; intentional change to allow referrer attribution to en.dev.
docs/.vitepress/theme/index.ts Wires EndevFooter into VitePress via the layout-bottom slot using the standard h() render function override pattern.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[VitePress Layout] -->|layout-bottom slot| B[EndevFooter.vue]
    A -->|enhanceApp| C[initBanner]
    C --> D{Fetch banner.json}
    D -->|enabled + not dismissed| E[render banner div]
    E --> F[message span]
    E --> G[anchor link\nrel=noopener only]
    E --> H[dismiss button\nposition: absolute]
    B --> I[footer: MIT · year · en.dev logo]
Loading

Reviews (2): Last reviewed commit: "docs: fix asymmetric banner padding so t..." | Re-trigger Greptile

Comment thread docs/.vitepress/theme/banner.css Outdated
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new footer component and integrates it into the site layout, alongside styling updates for the banner including color changes and positioning adjustments. Feedback focuses on improving accessibility by addressing a low-contrast color pairing in the banner and maintaining project consistency by explicitly defining the script language as TypeScript in the new footer component.

padding: 0.5rem 2.75rem 0.5rem 1rem;
background: var(--vp-c-brand-1, #3451b2);
color: #fff;
color: #000;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The hardcoded black text (#000) has poor contrast against the default fallback background color #3451b2 (dark blue). Since this polish is intended for a "pink brand bg", the fallback background color (on line 12) should ideally be updated to a lighter shade to ensure accessibility if the CSS variable fails to load or if the theme switches to a dark mode where the brand color is dark.

</footer>
</template>

<script setup>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

To maintain consistency with the other TypeScript files in this theme (index.ts and banner.ts), consider adding lang="ts" to the script block.

<script setup lang="ts">

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0f2c149. Configure here.

Comment thread docs/.vitepress/theme/banner.css Outdated
Left/right padding was asymmetric (1rem vs 2.75rem desktop; 0.75rem vs
2.5rem mobile), which shifted the "centered" text off from true viewport
center. Match the sides so justify-content: center lines up with the
viewport midpoint.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@jdx jdx merged commit bfef7f6 into main Apr 23, 2026
9 checks passed
@jdx jdx deleted the feat/banner-followups branch April 23, 2026 19:18
jdx added a commit that referenced this pull request Apr 23, 2026
Follow-ups after #110 merged.

## Summary
- Drop \`cache: \"no-cache\"\` from the banner fetch. The server already
sends \`Cache-Control: public, max-age=300, must-revalidate\`, so
default browser caching gives 5-min freshness without a conditional GET
on every page load.
- Fix the banner background fallback color. Previously fell back to
\`#3451b2\` (VitePress dark blue), which rendered black banner text
unreadable if \`--vp-c-brand-1\` ever fails to resolve. Now falls back
to \`#ff71ce\` (the actual communique brand).

\U0001F916 Generated with [Claude Code](https://claude.com/claude-code)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk: only adjusts docs-site banner styling and removes a
`no-cache` fetch option, which may slightly change how quickly banner
updates propagate but doesn’t affect core app logic.
> 
> **Overview**
> Updates the docs announcement banner to rely on default browser
caching by removing `cache: "no-cache"` from the `fetch` in
`initBanner()`.
> 
> Also changes the banner background fallback color in `banner.css` to
`#ff71ce` to keep text readable if `--vp-c-brand-1` isn’t defined.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
67ff10a. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
jdx added a commit that referenced this pull request Apr 23, 2026
A small patch release that fixes a panic when generating notes against
releases with multi-byte characters in their bodies, and picks up a
security fix in `rustls-webpki`.

## Fixed

- **Don't panic on multi-byte chars in style-reference bodies** —
`communique generate` truncates each recent release body to 3072 bytes
to keep the prompt small, but previously sliced `&body[..3072]`
directly. If byte 3072 fell inside a multi-byte UTF-8 character (common
with em-dashes, which are 3 bytes), the command would panic with `byte
index 3072 is not a char boundary`. The truncation now walks back to the
nearest char boundary before slicing, with a regression test covering
the case. ([#113](#113)) (@jdx)

## Security

- **`rustls-webpki` bumped to 0.103.13** — Addresses
[RUSTSEC-2026-0104](https://rustsec.org/advisories/RUSTSEC-2026-0104), a
reachable panic in certificate revocation list parsing. Lockfile-only
change. ([#107](#107)) (@jdx)

## Docs

- Added a dismissible cross-site announcement banner and an en.dev
footer to the documentation site, with follow-up polish (contrast,
centering, z-index), smarter caching, and `ResizeObserver`-based height
syncing so VitePress's nav offset stays correct on resize.
([#109](#109),
[#110](#110),
[#111](#111),
[#112](#112)) (@jdx)

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.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.

1 participant