Skip to content

Feature/064 cartes shader et bloc tarifs - #64

Merged
Zoubeir23 merged 12 commits into
mainfrom
Feature/064-cartes-shader-et-bloc-tarifs
Aug 2, 2026
Merged

Feature/064 cartes shader et bloc tarifs#64
Zoubeir23 merged 12 commits into
mainfrom
Feature/064-cartes-shader-et-bloc-tarifs

Conversation

@Zoubeir23

@Zoubeir23 Zoubeir23 commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Nouvelles fonctionnalités
    • Les cartes de fonctionnalités bénéficient de visuels animés, de dégradés de repli et d’animations à l’apparition.
    • Les animations respectent désormais la préférence système de réduction des mouvements.
    • La grille des fonctionnalités adopte une présentation simplifiée en deux colonnes.
    • Les cartes tarifaires affichent clairement prix, période, essai, avantages, badge de popularité et appel à l’action.
    • Les animations des cartes tarifaires sont déclenchées lors de leur visibilité à l’écran.

Copilot AI review requested due to automatic review settings August 2, 2026 01:49
@vercel

vercel Bot commented Aug 2, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
doc-flow-ai Ready Ready Preview Aug 2, 2026 2:37am

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Zoubeir23, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 14 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e83aeaff-5ba6-41c8-8c0b-d790d8e01779

📥 Commits

Reviewing files that changed from the base of the PR and between 9c4ea12 and 32530f9.

📒 Files selected for processing (6)
  • .gitignore
  • app/globals.css
  • components/landing/feature-shader-card.tsx
  • components/landing/pricing-plan-card.tsx
  • lib/hooks/use-brand-shader-palette.ts
  • lib/hooks/use-in-view.ts
📝 Walkthrough

Walkthrough

La landing page utilise de nouvelles cartes de fonctionnalités avec shaders Warp et de nouvelles cartes tarifaires. Deux hooks contrôlent la visibilité et le mouvement réduit. Les règles Git excluent les artefacts locaux.

Changes

Cartes de la landing page

Layer / File(s) Summary
Fondations d’animation et de rendu
lib/hooks/use-in-view.ts, lib/hooks/use-prefers-reduced-motion.ts, package.json
Les hooks détectent la visibilité et la préférence de mouvement réduit. La dépendance @paper-design/shaders-react est ajoutée.
Cartes de fonctionnalités
components/landing/feature-shader-card.tsx, components/landing/features-section.tsx
FeatureShaderCard affiche le contenu, les puces et un shader Warp conditionnel. La section utilise une grille à deux colonnes et supprime la carte de sécurité.
Cartes tarifaires
components/landing/pricing-plan-card.tsx, components/landing/pricing-preview-section.tsx
PricingPlanCard centralise le prix, l’essai, les fonctionnalités, le badge populaire et le CTA. La section transmet désormais les données au composant partagé.

Exclusions de l’espace de travail

Layer / File(s) Summary
Règles Git locales
.gitignore
Les notes de travail locales et le répertoire tasks/ sont ignorés.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Suggested reviewers: copilot

Poem

Petit lapin voit les cartes briller,
Les shaders dansent sans tout animer.
Les prix s’alignent, les puces sautillent,
Les mouvements réduits restent tranquilles.
Dans tasks/, les notes peuvent dormir.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Le titre décrit clairement les deux changements principaux : les cartes shader et le bloc tarifaire.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

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

Cette PR introduit des cartes “shader” (fond animé WebGL) pour la section fonctionnalités de la landing, et refactorise l’aperçu des tarifs en extrayant une carte dédiée, tout en ajoutant des hooks clients utilitaires pour gérer l’apparition au scroll et la préférence système “réduire les animations”.

Changes:

  • Ajout de @paper-design/shaders-react et de sa dépendance @paper-design/shaders.
  • Création de hooks clients useInView et usePrefersReducedMotion pour piloter l’animation et le rendu conditionnel.
  • Refactor de la landing : extraction PricingPlanCard + remplacement des anciennes feature cards par FeatureShaderCard.

Reviewed changes

Copilot reviewed 7 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
package.json Ajoute la dépendance @paper-design/shaders-react.
package-lock.json Verrouille @paper-design/shaders-react et @paper-design/shaders en 0.0.78.
lib/hooks/use-prefers-reduced-motion.ts Nouveau hook client pour détecter prefers-reduced-motion.
lib/hooks/use-in-view.ts Nouveau hook client basé sur IntersectionObserver (une seule fois).
components/landing/pricing-preview-section.tsx Remplace le markup inline par le composant PricingPlanCard.
components/landing/pricing-plan-card.tsx Nouvelle carte tarifaire client avec animation d’apparition au scroll.
components/landing/features-section.tsx Remplace les anciennes cartes features par FeatureShaderCard et ajuste la grille.
components/landing/feature-shader-card.tsx Nouvelle carte feature avec shader Warp + fallback gradient + reduced motion.
.gitignore Ignore tasks/ (notes locales).
Suppressed comments (2)

components/landing/feature-shader-card.tsx:29

  • Même point ici : couleurs HSL en dur → non aligné sur les tokens du thème. Préférer des couleurs basées sur les variables CSS (--primary, --ring, --card, etc.).
    shape: "stripes" as const,
    shapeScale: 0.12,
    colors: ["hsl(200, 68%, 16%)", "hsl(186, 75%, 28%)", "hsl(174, 60%, 55%)", "hsl(166, 58%, 76%)"],
  },

components/landing/feature-shader-card.tsx:39

  • Même point ici : couleurs HSL en dur → non aligné sur les tokens du thème. Préférer des couleurs basées sur les variables CSS (--primary, --ring, --card, etc.).
    shape: "checks" as const,
    shapeScale: 0.11,
    colors: ["hsl(178, 72%, 13%)", "hsl(166, 78%, 30%)", "hsl(158, 58%, 54%)", "hsl(150, 52%, 74%)"],
  },

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

Comment on lines +16 to +19
shape: "checks" as const,
shapeScale: 0.09,
colors: ["hsl(190, 70%, 14%)", "hsl(173, 80%, 30%)", "hsl(168, 62%, 52%)", "hsl(160, 55%, 72%)"],
},
Comment on lines +43 to +47
const FALLBACK_GRADIENTS = [
"linear-gradient(135deg, hsl(190 70% 14%), hsl(173 80% 30%) 55%, hsl(160 55% 72%))",
"linear-gradient(135deg, hsl(200 68% 16%), hsl(186 75% 28%) 55%, hsl(166 58% 76%))",
"linear-gradient(135deg, hsl(178 72% 13%), hsl(166 78% 30%) 55%, hsl(150 52% 74%))",
] as const;

@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

🧹 Nitpick comments (1)
lib/hooks/use-in-view.ts (1)

43-56: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

Le hook ne suspend pas les rendus une fois la carte quittée.

Le docstring (lignes 20-22) annonce que ce hook sert à « suspendre les rendus coûteux (shaders WebGL) tant qu'ils sont hors écran ». Mais l'implémentation appelle observer.disconnect() dès la première intersection (ligne 48) et ne remet jamais isInView à false. Une fois qu'une carte a été vue une fois, elle reste considérée « en vue » pour toujours.

Dans components/landing/feature-shader-card.tsx (lignes 77, 88-103), ce hook contrôle le montage du composant Warp (canvas WebGL animé en continu). Avec ce comportement, dès qu'une carte de fonctionnalité a été vue une fois, son shader continue de s'exécuter indéfiniment, même après un défilement loin de la carte. Avec jusqu'à 6 cartes sur la page, cela peut maintenir 6 canvases WebGL actifs en permanence, ce qui va à l'encontre de l'objectif de performance énoncé dans le docstring.

Ajoutez une option pour permettre une observation continue, utilisée par les consommateurs qui doivent suspendre un rendu coûteux.

♻️ Proposition : ajouter une option `once`
 interface UseInViewOptions {
   /** Marge de déclenchement autour du viewport, syntaxe CSS. */
   rootMargin?: string;
   /** Part de l'élément visible avant déclenchement, entre 0 et 1. */
   threshold?: number;
+  /** Si `false`, l'état suit les entrées/sorties du viewport en continu. Par défaut `true`. */
+  once?: boolean;
 }

 export function useInView<T extends HTMLElement>({
   rootMargin = "0px 0px -10% 0px",
   threshold = 0.15,
+  once = true,
 }: UseInViewOptions = {}): UseInViewResult<T> {
   const ref = useRef<T>(null);
   const [isInView, setIsInView] = useState(false);

   useEffect(() => {
     const element = ref.current;
     if (!element) return;

     if (typeof IntersectionObserver === "undefined") {
       setIsInView(true);
       return;
     }

     const observer = new IntersectionObserver(
       (entries) => {
         const entry = entries[0];
-        if (entry?.isIntersecting) {
-          setIsInView(true);
-          observer.disconnect();
-        }
+        if (!entry) return;
+        setIsInView(entry.isIntersecting);
+        if (entry.isIntersecting && once) {
+          observer.disconnect();
+        }
       },
       { rootMargin, threshold },
     );

     observer.observe(element);
     return () => observer.disconnect();
-  }, [rootMargin, threshold]);
+  }, [rootMargin, threshold, once]);

   return { ref, isInView };
 }

Puis, dans FeatureShaderCard, appelez useInView<HTMLElement>({ once: false }) pour suspendre réellement le shader hors écran.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@lib/hooks/use-in-view.ts` around lines 43 - 56, Update useInView so its
observer is one-shot only when the new once option is enabled; otherwise keep
observing, update isInView to false when the element leaves the viewport, and
disconnect only during cleanup. Preserve the existing default behavior for
current consumers, and update FeatureShaderCard to call useInView with once:
false so its shader pauses outside the viewport.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.gitignore:
- Around line 61-63: Update the tasks ignore pattern in .gitignore to anchor it
to the repository root by adding the leading slash, so only the root-level tasks
directory is ignored and nested directories named tasks remain trackable.

---

Nitpick comments:
In `@lib/hooks/use-in-view.ts`:
- Around line 43-56: Update useInView so its observer is one-shot only when the
new once option is enabled; otherwise keep observing, update isInView to false
when the element leaves the viewport, and disconnect only during cleanup.
Preserve the existing default behavior for current consumers, and update
FeatureShaderCard to call useInView with once: false so its shader pauses
outside the viewport.
🪄 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: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6ab00300-c769-4d4d-a31f-8a46bb935562

📥 Commits

Reviewing files that changed from the base of the PR and between 031419f and 9c4ea12.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (8)
  • .gitignore
  • components/landing/feature-shader-card.tsx
  • components/landing/features-section.tsx
  • components/landing/pricing-plan-card.tsx
  • components/landing/pricing-preview-section.tsx
  • lib/hooks/use-in-view.ts
  • lib/hooks/use-prefers-reduced-motion.ts
  • package.json

Comment thread .gitignore Outdated
@Zoubeir23
Zoubeir23 requested a review from Copilot August 2, 2026 01:55

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Zoubeir23
Zoubeir23 merged commit d08cd32 into main Aug 2, 2026
5 checks passed
@Zoubeir23
Zoubeir23 deleted the Feature/064-cartes-shader-et-bloc-tarifs branch August 2, 2026 02:40
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