Skip to content

codex: limit ungrouped spaces to two columns on landing page#3540

Open
theletterf wants to merge 1 commit into
mainfrom
codex-landing-2col-grid
Open

codex: limit ungrouped spaces to two columns on landing page#3540
theletterf wants to merge 1 commit into
mainfrom
codex-landing-2col-grid

Conversation

@theletterf

Copy link
Copy Markdown
Member

Why

The Codex landing grid uses 3 columns for all items. When the number of ungrouped spaces doesn't divide evenly into 3, a lone card at the end of a row leaves two empty slots — a visually jarring gap.

What

The outer grid is reduced from lg:grid-cols-3 to md:grid-cols-2. Ungrouped cards now flow in a 2-column layout, so an odd orphan leaves at most one empty slot. Groups with 2+ docsets are promoted to col-span-full (they fill both outer columns), while their internal card grid still renders up to 3 columns inside the group box — so group density is unchanged.

Reduces the outer grid from 3 to 2 columns so a lone ungrouped card
leaves at most one empty slot per row instead of two. Groups with
2+ docsets now always span full width; their internal grid still
renders up to 3 columns inside the group box.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@theletterf

Copy link
Copy Markdown
Member Author

@reakaleek

@theletterf theletterf requested a review from reakaleek June 19, 2026 16:41
@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 15c82bc4-b332-4217-aca2-1cfdddd10866

📥 Commits

Reviewing files that changed from the base of the PR and between 654fcce and 563237a.

📒 Files selected for processing (1)
  • src/Elastic.Codex/Landing/LandingView.cshtml

📝 Walkthrough

Walkthrough

The codex-grid wrapper in LandingView.cshtml had lg:grid-cols-3 removed from its responsive class list. Within the per-group card rendering, colSpan now uses col-span-full when repoCount >= 2 (previously a higher threshold), and innerCols is determined by two thresholds—repoCount >= 3 and repoCount >= 2—replacing the previous logic that included special-casing for specific counts like repoCount == 3.

Possibly related PRs

  • elastic/docs-builder#3517: Modifies the same group-card inner grid and card rendering in LandingView.cshtml, introducing adaptive column spanning based on repo counts—directly overlapping with the colSpan/innerCols logic this PR adjusts.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main change: limiting ungrouped spaces to two columns on the landing page, which is the core modification in the changeset.
Description check ✅ Passed The description directly explains the motivation and implementation of the grid layout changes shown in the changeset, providing clear context for the modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch codex-landing-2col-grid

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants