Repository navigation
Add a release line above the fold on the landing page - #298
Conversation
Show the latest Hardhat 3 release (version link plus a one-line summary) right under the hero CTA, matching the Figma design. The release body is markdown, so only its first paragraph is shown, stripped to plain text and truncated with an ellipsis. Also removes the "Ready to use out of the box" block from the hero and its now-unused styles. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
🟡 Changes recommended
The hero currently assumes release ordering and may render a non-latest release and/or a label that doesn’t match the stated “Hardhat vX.Y.Z” format, plus the new mobile text size is likely too small for accessibility.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds a “latest Hardhat 3 release” line into the landing page hero area (right under the primary CTA), sourced from the existing githubReleases content collection and styled to match the intended responsive layout.
Changes:
- Render the latest GitHub release (version link + “Released …: …” summary) in
HeroBlock.astrowhen releases are available. - Add markdown-to-plain-text summarization for the first paragraph of the release body and truncate it via CSS.
- Adjust hero section spacing/styling and remove the previous “Ready to use out of the box” block/styles.
File summaries
| File | Description |
|---|---|
| src/components/landing/HeroBlock.astro | Adds latest-release UI to the hero and updates hero spacing/styles to accommodate the new above-the-fold line. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| const githubReleases = await getCollection("githubReleases"); | ||
| const latestRelease = githubReleases[0]; |
| rel="noopener noreferrer" | ||
| class="release-version" | ||
| > | ||
| {latestRelease.data.name} |
| .release-description | ||
| margin: 0 | ||
| max-width: 100% | ||
| font-weight: 400 | ||
| font-size: 9px | ||
| line-height: 1.4 | ||
| white-space: nowrap | ||
| overflow: hidden | ||
| text-overflow: ellipsis |
Summary
Shows the latest Hardhat 3 release right under the hero CTA on the landing page, matching the Figma design:
githubReleasescollection (only fetched on Vercel or withFORCE_GITHUB_RELEASES=1), so nothing renders when the collection is empty.Test plan
prettier --checkandastro checkpassFORCE_GITHUB_RELEASES=1 pnpm dev🤖 Generated with Claude Code