Skip to content

feat(hero): no-scroll layout — swap CLI card and downloads#25

Merged
BunsDev merged 1 commit into
mainfrom
fix/hero-noscroll-swap
Jul 5, 2026
Merged

feat(hero): no-scroll layout — swap CLI card and downloads#25
BunsDev merged 1 commit into
mainfrom
fix/hero-noscroll-swap

Conversation

@BunsDev

@BunsDev BunsDev commented Jul 5, 2026

Copy link
Copy Markdown
Member

The intended version of the hero change (supersedes the column-mirror in #23).

What you asked for

  1. Swap just the CLI card and the downloads section — not the whole column.
  2. Arrange the hero so it doesn't require scrolling.

Result — Layout C

  • Left: copy (kicker + headline + lede) + the platform-aware DownloadCTA.
  • Right: the interactive coven cli runtime card.
  • Below both: the 4 core-capability cells as a slim full-width strip (pulled out of the copy column) so neither side grows tall enough to scroll.

No-scroll (verified)

Hero collapses from ~1240px → ~640px. Measured + screenshotted:

Viewport Hero height Fits?
1440×900 741px
1366×768 650px
1280×720 643px ✅ (~30px breathing room below the feature strip)

.hero is a centered flex column capped at calc(100vh - 72px) with tightened vertical rhythm (smaller headline clamp, trimmed margins/padding).

DownloadCTA tidy

  • Button labels shortened (macOS / Windows / Linux / iOS Beta) → stable single-line row.
  • Kept the All releases & checksums utility link.
  • Dropped the redundant "install the CLI" line (the hero's coven cli card already demos it) + removed the now-dead CSS/const/icon.
  • Detected platform is emphasized in place (violet) rather than moved + spanned full-width → deterministic row height (important for the no-scroll budget).

Mobile preserved

Copy leads → CLI card below → feature grid stacks (2-col ≤900px, single column ≤520px per #24). No horizontal overflow (overflow-x:hidden on body; flex children min-width:0). Verified content fits with no right-edge clipping.

Verification note

Chrome headless pins its viewport to a ~485px minimum width, which made earlier mobile screenshots look clipped when they weren't. Confirmed via DOM measurement (document overflow=0, no content element exceeds the viewport) + a true-width render that the card/lede/features all fit. Trusted the measurement + clean render over the misleading canvas-crop.

…trip below

Reworks the hero so it fits within a single viewport (no scroll) on standard
laptop heights, and swaps the two requested elements:

- Copy + the platform-aware DownloadCTA now sit together on the LEFT.
- The interactive 'coven cli' runtime card moves to the RIGHT.
- The 4 core-capability cells are pulled OUT of the copy column into a slim
  full-width strip beneath the two-column main row (.hero-main), so neither
  column grows tall enough to force scrolling.

Height work:
- .hero is a centered flex column capped at calc(100vh - 72px) with tightened
  vertical rhythm (smaller headline clamp, trimmed margins/padding).
- Hero collapses from ~1240px to ~640px: fits at 1440x900, 1366x768, and
  1280x720 (verified, ~30px breathing room below the strip at the tight case).

DownloadCTA tidy:
- Button labels shortened (macOS / Windows / Linux / iOS Beta) to keep the row
  a stable single line; kept the 'All releases & checksums' utility link.
- Dropped the redundant 'install the CLI' affordance — the coven cli card in the
  hero already demos the CLI — and removed the now-dead CSS/const/icon.
- Detected platform is emphasized in place (violet) instead of being moved and
  spanned full-width, so the download row's height is deterministic.

Mobile preserved: copy leads, CLI card below, feature grid stacks (2-col at
<=900px, single column at <=520px per #24). No horizontal overflow (body keeps
overflow-x:hidden; flex children min-width:0). Verified content fits with no
right-edge clipping.

Retitles/replaces the earlier column-mirror attempt (#23) with the intended
element swap.
Copilot AI review requested due to automatic review settings July 5, 2026 06:31
@vercel

vercel Bot commented Jul 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
coven Ready Ready Preview Jul 5, 2026 6:31am
coven-landing Ready Ready Preview Jul 5, 2026 6:31am

@BunsDev
BunsDev merged commit 37e34ac into main Jul 5, 2026
3 checks passed
@BunsDev
BunsDev deleted the fix/hero-noscroll-swap branch July 5, 2026 06:31

Copilot AI left a comment

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.

Pull request overview

This PR updates the landing-page hero to “Layout C” so the hero fits within a single viewport (no scroll) while swapping the CLI runtime card and the platform-aware download CTA into the intended left/right positions, and moving the 4 capability cells into a full-width strip beneath the main row.

Changes:

  • Refactors hero layout into a flex-column section with a 2-column .hero-main row plus a slim full-width .feature-grid strip below.
  • Tightens hero typography/spacing and makes the DownloadCTA buttons a compact 4-across row to keep hero height predictable.
  • Adjusts platform-detection behavior for the DownloadCTA primary styling (in-place emphasis rather than DOM reordering).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
src/styles/global.css Implements Layout C hero structure + compact DownloadCTA/feature strip styling for no-scroll behavior.
src/scripts/main.js Updates download CTA “primary” behavior to stop reordering the detected button in the grid.
src/components/Hero.astro Restructures hero markup into .hero-main (copy+CTA + CLI card) and moves feature grid below as a strip.
src/components/DownloadCTA.astro Removes the CLI install secondary affordance and shortens per-platform button labels for a 4-across row.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/scripts/main.js
Comment on lines +308 to 312
if (primary && detected !== 'ios') {
// Emphasize the detected platform in place (violet fill). We no longer
// move it or span it full-width — the download row stays a stable
// single line of four so the hero height is predictable (no-scroll).
primary.classList.add('is-primary');
Comment thread src/styles/global.css
Comment on lines +1089 to +1092
/* Compact hero: the per-platform sub-line ('.dmg · signed', etc.) is hidden
on the standard buttons to keep the download grid to two slim rows and
the whole hero within one viewport. It stays visible on the detected
(is-primary) button, which gets the full rich treatment below. */
Comment thread src/styles/global.css
.download-btn.is-primary .download-btn-label { font-size: 15px; }
.download-btn.is-primary .download-btn-sub { color: rgba(255,255,255,0.78); }
.download-btn.is-primary .download-btn-label { color: #fff; }
.download-btn.is-primary .download-btn-sub { color: rgba(255,255,255,0.78); display: none; }
Comment on lines 68 to 70
<p class="download-sub" data-download-sub>
Native apps and the CLI. We detected your platform — your one-click
download is highlighted below.
Native apps and the CLI — your platform's build is highlighted.
</p>
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