Skip to content

feat(home): add grid layout option to features component - #3859

Merged
PierreBrisorgueil merged 2 commits into
masterfrom
feat/home-features-grid-layout-3854
Apr 4, 2026
Merged

PierreBrisorgueil merged 2 commits into
masterfrom
feat/home-features-grid-layout-3854

Conversation

@PierreBrisorgueil

@PierreBrisorgueil PierreBrisorgueil commented Apr 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add layout: 'grid' config option to the features component as an alternative to the default carousel
  • Grid renders all cards in a responsive v-row/v-col layout with configurable cols (2, 3, 4, or 6) or auto-calculated from item count
  • Carousel remains the default behavior when layout is unset or set to 'carousel'

Changes

  • Conditional template: grid (v-if="isGrid") vs carousel (v-if="!isGrid")
  • isGrid and gridColSize computed properties
  • Dynamic island hidden in grid mode (no pagination needed)
  • Updated component docblock with new config options

Closes #3854

Test plan

  • Verify carousel still works as default (no layout key)
  • Set layout: 'grid' and confirm cards render in a responsive grid
  • Test cols: 2, cols: 3, cols: 4, cols: 6 overrides
  • Test auto column calculation (1-2 items → 2 cols, 3 → 3 cols, 4+ → 4 cols)
  • Verify responsive behavior on mobile (all cards stack to cols="12")
  • Lint, unit tests, and build pass

Summary by CodeRabbit

  • New Features
    • Added grid layout mode for feature cards, complementing the default carousel display
    • Grid mode includes configurable column sizing to accommodate different layout preferences

Allow features section to render cards in a responsive grid instead of
the default carousel. Controlled via `layout: 'grid'` in the setup
config, with optional `cols` (2/3/4/6) or auto-calculated from item
count.

Closes #3854
Copilot AI review requested due to automatic review settings April 4, 2026 15:19
@coderabbitai

coderabbitai Bot commented Apr 4, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@PierreBrisorgueil has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 19 minutes and 10 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 19 minutes and 10 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 648dbb0d-d65d-476d-85be-6bdd16689099

📥 Commits

Reviewing files that changed from the base of the PR and between 92afe0f and 44e596f.

📒 Files selected for processing (2)
  • src/modules/home/components/home.features.component.vue
  • src/modules/home/tests/home.features.component.unit.tests.js

Walkthrough

The features component now supports both carousel and grid layout modes. Added isGrid and gridColSize computed properties to switch rendering modes and determine grid column sizing. Template conditionally renders either grid or carousel based on the layout configuration. Dynamic island display is restricted to carousel mode only.

Changes

Cohort / File(s) Summary
Layout Mode Support
src/modules/home/components/home.features.component.vue
Added grid layout option alongside existing carousel mode. Introduced isGrid and gridColSize computed properties to handle mode switching and column sizing. Updated template to conditionally render either grid or carousel layout. Restricted dynamic island to carousel mode only.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding a grid layout option to the features component.
Description check ✅ Passed The description includes summary, changes, test plan, and linked issue, following the template's core sections, though some validation checkboxes and guardrails sections are missing.
Linked Issues check ✅ Passed The code changes fully implement the requirements from #3854: grid layout option, configurable/auto-calculated columns, carousel as default, responsive grid rendering, and preserved card styling.
Out of Scope Changes check ✅ Passed All changes are scoped to the features component template and computed properties to implement the grid layout feature; no unrelated modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/home-features-grid-layout-3854

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.

@codecov

codecov Bot commented Apr 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.23%. Comparing base (3a99e67) to head (44e596f).
⚠️ Report is 6 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3859   +/-   ##
=======================================
  Coverage   99.23%   99.23%           
=======================================
  Files          28       28           
  Lines         910      910           
  Branches      243      243           
=======================================
  Hits          903      903           
  Misses          7        7           

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a new layout: 'grid' option to the Home features/cards component so landing pages can render feature cards in a responsive grid instead of the default carousel.

Changes:

  • Introduces conditional rendering for grid vs carousel layouts.
  • Adds isGrid and gridColSize computed properties to drive grid behavior and column sizing.
  • Disables the dynamic island pagination UI when grid layout is active.

Comment thread src/modules/home/components/home.features.component.vue Outdated
Comment thread src/modules/home/components/home.features.component.vue

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/modules/home/components/home.features.component.vue`:
- Around line 140-146: The gridColSize() function can throw when
this.setup.content is undefined; update gridColSize to guard access to content
(e.g., compute const count = (this.setup?.content ?? []).length or use
(this.setup.content || []).length) and use that count for the subsequent
comparisons; ensure the initial check for this.setup.cols remains unchanged and
that the fallback behavior (count <=2 => 6, <=3 =>4, else 3) is preserved.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: f99b2a95-29c8-41c2-af68-a73c4747195f

📥 Commits

Reviewing files that changed from the base of the PR and between 3a99e67 and 92afe0f.

📒 Files selected for processing (1)
  • src/modules/home/components/home.features.component.vue

Comment thread src/modules/home/components/home.features.component.vue
…ests

- Grid columns now respect item.fullWidth (resolves copilot review)
- Add optional chaining for setup.content access to prevent throw on
  undefined (resolves CodeRabbit review)
- Add 17 unit tests covering grid/carousel rendering, column sizing,
  fullWidth, null-safety, and computed properties
@PierreBrisorgueil
PierreBrisorgueil merged commit e1b6540 into master Apr 4, 2026
6 checks passed
@PierreBrisorgueil
PierreBrisorgueil deleted the feat/home-features-grid-layout-3854 branch April 4, 2026 15:47
PierreBrisorgueil pushed a commit that referenced this pull request May 1, 2026
# [2.0.0](v1.5.0...v2.0.0) (2026-05-01)

* feat(admin)!: render extra tabs as inline nested routes ([e5ebea9](e5ebea9)), closes [#3955](#3955)

### Bug Fixes

* **admin:** frame Readiness & Activity tabs to match Users/Organizations ([#3987](#3987)) ([73c7527](73c7527))
* **admin:** nav label, activeTab sync, tighter tab-route validation ([39f2eac](39f2eac))
* **admin:** prevent toggleUserRole from erasing user fields ([#3995](#3995)) ([d469759](d469759)), closes [#3993](#3993) [#3993](#3993)
* **audit:** security fixes — SVG XSS, router guard, admin errors, docs config ([#3880](#3880)) ([b57d8fc](b57d8fc)), closes [#3876](#3876) [#3877](#3877) [#3878](#3878) [#3879](#3879) [#3877](#3877)
* **auth,admin:** structured logging + remove stale TODOs ([#3919](#3919)) ([2b52c28](2b52c28))
* **auth:** call backend signout to clear httpOnly TOKEN cookie ([#4018](#4018)) ([6b04471](6b04471)), closes [#3502](#3502)
* **auth:** show loader on oAuth callback, surface token() errors ([#4017](#4017)) ([#4019](#4019)) ([a60d1b9](a60d1b9))
* **auth:** tolerate canonical + legacy + plain-string OAuth error payloads ([#4022](#4022)) ([89fa807](89fa807)), closes [#3495](#3495) [pre-#3513](https://github.com/pre-/issues/3513) [#4021](#4021) [#4021](#4021)
* **avatar:** snap size to backend sharp whitelist ([#3973](#3973)) ([c6f59d9](c6f59d9)), closes [#3972](#3972)
* **billing:** cumulative review — loading race + unconditional useMeter + cleanup ([#4043](#4043)) ([3ff56ba](3ff56ba))
* **billing:** replace networkidle with domcontentloaded in pricing E2E tests ([#3858](#3858)) ([b468027](b468027)), closes [#3848](#3848)
* **billing:** use named import for plans, add migration note for billing.config.js rename ([162689d](162689d))
* **config:** fix layer numbering and clarify downstream README instructions ([3c7c918](3c7c918))
* **config:** guard loadModuleConfigs against array default exports ([#3908](#3908)) ([0c215a0](0c215a0)), closes [#3900](#3900)
* **config:** rename billing.config.js to billing.development.config.js ([394efaa](394efaa))
* **developers:** remove orphan developers module (no backend) ([#3909](#3909)) ([8e1b440](8e1b440))
* **e2e:** eliminate flaky Vite cold-start race on ARC runners ([#3918](#3918)) ([534c7a7](534c7a7)), closes [#3917](#3917)
* **features:** remount carousel cards on step change to replay SVG animations ([#3887](#3887)) ([e202d65](e202d65)), closes [#3886](#3886)
* **footer:** transparent background on link list ([#3875](#3875)) ([83b83b0](83b83b0)), closes [#3862](#3862)
* **footer:** use transparent card color to match section background ([#3871](#3871)) ([eaca4b5](eaca4b5))
* **home:** add title/subtitle spacing in HomeContentComponent ([#3840](#3840)) ([e52a10a](e52a10a)), closes [#3835](#3835)
* **home:** equalize capabilities card heights across tabs ([#3946](#3946)) ([3fa094b](3fa094b)), closes [#3945](#3945)
* **home:** isSvg handles URLs with query strings and fragments ([#3950](#3950)) ([548facf](548facf)), closes [#3949](#3949)
* **home:** prevent last section and footer sharing same background ([#3842](#3842)) ([2cda9c7](2cda9c7)), closes [#3838](#3838)
* **home:** remove hardcoded Ghost API key, use env var ([#3915](#3915)) ([aaba326](aaba326)), closes [#3910](#3910)
* **home:** render SVGs inline to access CSS custom properties ([#3860](#3860)) ([f95ef06](f95ef06)), closes [#3849](#3849)
* **home:** replace console.error/warn with structured logger ([#3916](#3916)) ([631ddac](631ddac)), closes [#3911](#3911)
* **home:** support custom gradient in features section background ([#3866](#3866)) ([d66c36e](d66c36e))
* **home:** use homeImgComponent for about section SVGs ([#3930](#3930)) ([b9246dd](b9246dd)), closes [#3929](#3929)
* **images:** omit port when api.port is empty or undefined ([#3964](#3964)) ([70c2e4c](70c2e4c)), closes [#3927](#3927) [#3963](#3963)
* **img:** await nextTick before setting SVG content from cache ([#3889](#3889)) ([5e98d2c](5e98d2c))
* **navigation:** clean mobile glass navigation ([#3942](#3942)) ([ec6a283](ec6a283))
* **stores:** normalize console.log → console.error in catch blocks ([#3912](#3912)) ([09423de](09423de)), closes [#3906](#3906)
* **tests:** eliminate component mount leaks + harden vitest config ([#4045](#4045)) ([79a8108](79a8108))

### Features

* **admin:** add Activity tab with audit log viewer ([#3928](#3928)) ([79cacff](79cacff)), closes [#3891](#3891)
* **admin:** configurable tabs via admin config array ([#3847](#3847)) ([3a99e67](3a99e67)), closes [#3846](#3846)
* **admin:** SaaS readiness card in admin dashboard ([#3814](#3814)) ([f2f86e0](f2f86e0))
* **admin:** surface API errors in admin store actions ([#3861](#3861)) ([38aa910](38aa910)), closes [#3850](#3850)
* **billing:** meter UI primitives — progress + breakdown + ledger (PR-V2) ([#4038](#4038)) ([089d200](089d200))
* **billing:** meter UX surfaces (PR-V3) ([#4039](#4039)) ([0d0d4f6](0d0d4f6))
* **billing:** mini-bar always-on (free/admin) + extras section in /billing + account links ([#4048](#4048)) ([b459fad](b459fad))
* **billing:** useMeter composable + extras store actions (PR-V1) ([#4037](#4037)) ([1d05894](1d05894))
* **config:** document and standardize {module}.{project}.config.js per-module project overrides ([93393e3](93393e3))
* **core/pageHeader:** breadcrumb slot + canonical height + overflow fix ([#4026](#4026)) ([52e00cd](52e00cd)), closes [#4013](#4013)
* **core:** expose reusable OrgAvatar component ([#3926](#3926)) ([1d71817](1d71817)), closes [#3924](#3924)
* **core:** support SVG/image sidenav logo + click-to-home ([#3988](#3988)) ([958b1a5](958b1a5)), closes [#3986](#3986)
* **docs:** add docs module with embedded Scalar API reference ([#3873](#3873)) ([b5df8d1](b5df8d1)), closes [#3867](#3867)
* **docs:** add markdown guide pages with navigation tabs ([#3874](#3874)) ([a39256c](a39256c)), closes [#3867](#3867) [#3868](#3868)
* **home:** add animated counter to statistics component ([#3845](#3845)) ([df63150](df63150)), closes [#3831](#3831)
* **home:** add configurable cols to services component ([#3856](#3856)) ([ceeb9e0](ceeb9e0)), closes [#3853](#3853)
* **home:** add grid layout option to features component ([#3859](#3859)) ([e1b6540](e1b6540)), closes [#3854](#3854)
* **home:** add HomeCtaComponent for final CTA section ([#3843](#3843)) ([38c5444](38c5444)), closes [#3837](#3837) [#3839](#3839)
* **home:** add imgBackground option to about component ([#3857](#3857)) ([4d939ee](4d939ee)), closes [#3855](#3855)
* **home:** add imgMode prop to features cards for SVG illustrations ([#3844](#3844)) ([bfe6ab7](bfe6ab7)), closes [#3839](#3839)
* **home:** make timeline opposite-side labels optional ([#3841](#3841)) ([564808c](564808c)), closes [#3836](#3836)
* **home:** render icon on the right of title when alignment='right' ([#3952](#3952)) ([94ff2ee](94ff2ee)), closes [#3951](#3951)
* **home:** support custom section background in all home components ([#3872](#3872)) ([5756f9c](5756f9c))
* **home:** support right alignment in homeContentComponent ([#3947](#3947)) ([26af7df](26af7df)), closes [#3944](#3944)
* **modules:** per-module activation config flag ([#3864](#3864)) ([d49dae0](d49dae0)), closes [#3863](#3863)
* **navigation:** support explicit sidenav ordering via meta.order ([#3965](#3965)) ([37eaa67](37eaa67)), closes [#3962](#3962)
* **navigation:** support external links in sidenav ([#3954](#3954)) ([#3956](#3956)) ([8708fa0](8708fa0))
* **observability:** fan-out errors Sentry + PostHog + opt-in flags ([#4012](#4012)) ([0efe3ab](0efe3ab)), closes [#4011](#4011) [#4011](#4011)

### BREAKING CHANGES

* downstream projects using config.admin.tabs with
/admin/* sibling routes must migrate per MIGRATIONS.md — relative
paths in the router file, registration via injectAdminChildren in
app.router.js, and removal of PageHeader from tab views.
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.

feat(home): add grid layout option to features component

2 participants