Skip to content

feat: add animated gradient background to Hero section#148

Open
shazzar00ni wants to merge 6 commits into
mainfrom
feature/animated-gradient-hero
Open

feat: add animated gradient background to Hero section#148
shazzar00ni wants to merge 6 commits into
mainfrom
feature/animated-gradient-hero

Conversation

@shazzar00ni

Copy link
Copy Markdown
Owner

Summary

  • Add animated gradient background to Hero section with subtle movement
  • Include prefers-reduced-motion support for accessibility

Acceptance Criteria

  • Gradient animates smoothly in the background
  • Animation respects prefers-reduced-motion
  • Subtle and not distracting

Testing

Open the landing page and verify the Hero section has a subtle animated gradient background

Copilot AI review requested due to automatic review settings April 1, 2026 19:27
@coderabbitai

coderabbitai Bot commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@shazzar00ni has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 0 minutes and 20 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 0 minutes and 20 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: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 883e75b6-8802-47e0-97c8-9590f27fbea9

📥 Commits

Reviewing files that changed from the base of the PR and between 7fc2d80 and 1e0da12.

⛔ Files ignored due to path filters (16)
  • package-lock.json is excluded by !**/package-lock.json
  • src/stories/assets/accessibility.png is excluded by !**/*.png
  • src/stories/assets/accessibility.svg is excluded by !**/*.svg
  • src/stories/assets/addon-library.png is excluded by !**/*.png
  • src/stories/assets/assets.png is excluded by !**/*.png
  • src/stories/assets/context.png is excluded by !**/*.png
  • src/stories/assets/discord.svg is excluded by !**/*.svg
  • src/stories/assets/docs.png is excluded by !**/*.png
  • src/stories/assets/figma-plugin.png is excluded by !**/*.png
  • src/stories/assets/github.svg is excluded by !**/*.svg
  • src/stories/assets/share.png is excluded by !**/*.png
  • src/stories/assets/styling.png is excluded by !**/*.png
  • src/stories/assets/testing.png is excluded by !**/*.png
  • src/stories/assets/theming.png is excluded by !**/*.png
  • src/stories/assets/tutorials.svg is excluded by !**/*.svg
  • src/stories/assets/youtube.svg is excluded by !**/*.svg
📒 Files selected for processing (26)
  • .github/workflows/ci.yml
  • .gitignore
  • .storybook/main.ts
  • .storybook/preview.ts
  • eslint.config.js
  • index.html
  • package.json
  • src/App.tsx
  • src/components/Hero.tsx
  • src/components/ui/Button.stories.tsx
  • src/components/ui/Container.stories.tsx
  • src/components/ui/Input.stories.tsx
  • src/index.css
  • src/stories/Button.stories.ts
  • src/stories/Button.tsx
  • src/stories/Configure.mdx
  • src/stories/Header.stories.ts
  • src/stories/Header.tsx
  • src/stories/Page.stories.ts
  • src/stories/Page.tsx
  • src/stories/assets/avif-test-image.avif
  • src/stories/button.css
  • src/stories/header.css
  • src/stories/page.css
  • vite.config.ts
  • vitest.shims.d.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/animated-gradient-hero

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.

@vercel

vercel Bot commented Apr 1, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
docugen Error Error Apr 1, 2026 7:27pm

@sonarqubecloud

sonarqubecloud Bot commented Apr 1, 2026

Copy link
Copy Markdown

Comment thread .github/workflows/ci.yml
Comment on lines +60 to +71
name: E2E Tests
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- run: npx playwright install --with-deps
- run: npm run e2e

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 3 months ago

In general, the fix is to add a permissions block that explicitly limits the GITHUB_TOKEN scope to the minimal required set, rather than relying on repository defaults. Since all jobs in this workflow only need to read the repository contents (for actions/checkout and running Node/npm commands) and do not appear to write to the repo, issues, or PRs, the least-privilege configuration is contents: read.

The single best way to fix this without changing existing functionality is to add a workflow-level permissions block near the top of .github/workflows/ci.yml, so it applies to all jobs (lint, typecheck, test, build, e2e) at once. This documents the intended permissions and ensures that even if the repository/org defaults are read-write, this CI workflow will only get read access. Concretely, insert:

permissions:
  contents: read

after the name: CI line (line 1) and before the on: block (line 3). No additional methods, imports, or definitions are needed; this is purely a YAML configuration change in the workflow file.

Suggested changeset 1
.github/workflows/ci.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -1,4 +1,6 @@
 name: CI
+permissions:
+  contents: read
 
 on:
   push:
EOF
@@ -1,4 +1,6 @@
name: CI
permissions:
contents: read

on:
push:
Copilot is powered by AI and may make mistakes. Always verify output.
@codacy-production

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 3 medium . 1 medium

Alerts:
⚠ 4 issues (≤ 0 issues of at least minor severity)

Results:
4 new issues

Category Results
BestPractice 3 medium
Complexity 1 medium

View in Codacy

🟢 Metrics 0 complexity . 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

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 adds an animated gradient background utility and applies it to the landing page Hero, with prefers-reduced-motion support. In addition, it introduces a broad Storybook + Vitest (browser/Playwright) setup, new Storybook example content/assets, and CI changes (including a new E2E job).

Changes:

  • Add .animated-gradient + @keyframes gradient-shift utilities (with reduced-motion override) and apply them to the Hero background layer.
  • Add Storybook configuration, example stories/assets, and Storybook-focused Vitest project configuration.
  • Add accessibility/navigation improvements (skip link + main landmark id) and add a CI E2E job.

Reviewed changes

Copilot reviewed 23 out of 42 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
vitest.shims.d.ts Adds Vitest browser-playwright type references.
vite.config.ts Switches Vitest config to multi-project (unit + Storybook browser tests) and wires Storybook/Vitest plugin.
src/stories/Page.tsx Adds Storybook example Page component.
src/stories/Page.stories.ts Adds Storybook example stories + interaction test.
src/stories/page.css Adds styling for Storybook example Page.
src/stories/Header.tsx Adds Storybook example Header component.
src/stories/Header.stories.ts Adds Storybook example Header stories.
src/stories/header.css Adds styling for Storybook example Header.
src/stories/Configure.mdx Adds Storybook onboarding/configuration docs page content.
src/stories/Button.tsx Adds Storybook example Button component.
src/stories/Button.stories.ts Adds Storybook example Button stories.
src/stories/button.css Adds styling for Storybook example Button.
src/stories/assets/youtube.svg Adds Storybook docs asset.
src/stories/assets/tutorials.svg Adds Storybook docs asset.
src/stories/assets/styling.png Adds Storybook docs asset.
src/stories/assets/github.svg Adds Storybook docs asset.
src/stories/assets/docs.png Adds Storybook docs asset.
src/stories/assets/discord.svg Adds Storybook docs asset.
src/stories/assets/context.png Adds Storybook docs asset.
src/stories/assets/avif-test-image.avif Adds Storybook test asset.
src/stories/assets/assets.png Adds Storybook docs asset.
src/stories/assets/accessibility.svg Adds Storybook docs asset.
src/index.css Adds animated gradient CSS utilities + reduced-motion handling.
src/components/ui/Input.stories.tsx Adds UI Input stories.
src/components/ui/Container.stories.tsx Adds UI Container stories.
src/components/ui/Button.stories.tsx Adds UI Button stories.
src/components/Hero.tsx Applies animated gradient background layer to Hero section.
src/App.tsx Adds main landmark id for skip link and wires CookieConsent component.
package.json Adds Storybook scripts/deps and Playwright/Vitest browser deps.
package-lock.json Locks new Storybook/Playwright/Vitest dependency graph changes.
index.html Adds “Skip to main content” link.
eslint.config.js Adds eslint-plugin-storybook flat config integration.
.storybook/preview.ts Adds Storybook preview parameters (incl. a11y addon config).
.storybook/main.ts Adds Storybook main config (stories/addons/framework).
.gitignore Ignores Storybook logs and static build output.
.github/workflows/ci.yml Adds Playwright E2E job to CI.

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

Comment thread vite.config.ts
Comment on lines +22 to +53
projects: [
{
extends: true,
test: {
globals: true,
environment: 'jsdom',
setupFiles: './src/test/setup.ts',
include: ['src/**/*.test.{ts,tsx}'],
},
},
{
extends: true,
plugins: [
// The plugin will run tests for the stories defined in your Storybook config
// See options at: https://storybook.js.org/docs/next/writing-tests/integrations/vitest-addon#storybooktest
storybookTest({
configDir: path.join(dirname, '.storybook'),
}),
],
test: {
name: 'storybook',
browser: {
enabled: true,
headless: true,
provider: playwright({}),
instances: [
{
browser: 'chromium',
},
],
},
},

Copilot AI Apr 1, 2026

Copy link

Choose a reason for hiding this comment

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

Enabling the Storybook Vitest project with browser.provider: playwright() means vitest/vitest run will try to execute browser-based story tests by default. This typically requires installing Playwright browsers (e.g. npx playwright install) and will likely fail in CI/local environments that only run unit tests. Consider gating the Storybook project behind an env flag, moving it behind a separate npm script/CI job, or ensuring the test job installs browsers before running Vitest.

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/ci.yml
cache: 'npm'
- run: npm ci
- run: npx playwright install --with-deps
- run: npm run e2e

Copilot AI Apr 1, 2026

Copy link

Choose a reason for hiding this comment

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

This new E2E job will likely fail because Playwright’s webServer config expects port 5173, but Vite is configured to run on port 3000 (vite.config.ts server.port). Align the ports (update Playwright config or Vite server.port) so npm run e2e can actually detect the started dev server.

Suggested change
- run: npm run e2e
- name: Run E2E tests (align dev server port with Playwright)
run: npm run e2e
env:
PORT: 5173

Copilot uses AI. Check for mistakes.
Comment thread package.json
"@playwright/test": "^1.40.0",
"@storybook/builder-vite": "^10.3.3",
"@storybook/react": "^10.3.3",
"@storybook/test": "^8.6.15",

Copilot AI Apr 1, 2026

Copy link

Choose a reason for hiding this comment

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

@storybook/test is pinned to ^8.6.15 while the rest of Storybook is ^10.3.3. The lockfile shows @storybook/test@8.6.15 has a peer dependency on storybook@^8.6.15, so this combination is likely incompatible. Use a @storybook/test version that matches the installed Storybook major, or remove it if you’re using the newer storybook/test entrypoint via core packages.

Suggested change
"@storybook/test": "^8.6.15",
"@storybook/test": "^10.3.3",

Copilot uses AI. Check for mistakes.
Comment thread package.json
Comment on lines +17 to +20
"prepare": "husky",
"e2e": "playwright test",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"

Copilot AI Apr 1, 2026

Copy link

Choose a reason for hiding this comment

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

The PR description focuses on an animated Hero gradient, but this change set also introduces Storybook configuration/assets, new CI E2E workflow steps, skip-link/main landmark changes, and cookie consent wiring. Please either split these into separate PRs or update the PR description/acceptance criteria to reflect the broader scope.

Copilot uses AI. Check for mistakes.
Comment thread src/stories/Configure.mdx
@@ -0,0 +1,388 @@
import { Meta } from "@storybook/addon-docs/blocks";

import Github from "./assets/github.svg";

Copilot AI Apr 1, 2026

Copy link

Choose a reason for hiding this comment

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

Brand spelling: rename Github to GitHub (and update any corresponding alt text) to use the correct capitalization.

Suggested change
import Github from "./assets/github.svg";
import GitHub from "./assets/github.svg";

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,86 @@
import type { Meta, StoryObj } from '@storybook/react';

Copilot AI Apr 1, 2026

Copy link

Choose a reason for hiding this comment

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

These stories import types from @storybook/react, while other stories added in this PR use @storybook/react-vite. Mixing the two can lead to renderer/type mismatches; prefer importing Meta/StoryObj from the same renderer package used by your Storybook framework (@storybook/react-vite) for consistency.

Suggested change
import type { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react-vite';

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,69 @@
import type { Meta, StoryObj } from '@storybook/react';

Copilot AI Apr 1, 2026

Copy link

Choose a reason for hiding this comment

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

These stories import types from @storybook/react, while other stories in this repo/PR use @storybook/react-vite. For consistency with the configured framework (@storybook/react-vite), consider importing Meta/StoryObj from @storybook/react-vite here as well.

Suggested change
import type { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react-vite';

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,42 @@
import type { Meta, StoryObj } from '@storybook/react';

Copilot AI Apr 1, 2026

Copy link

Choose a reason for hiding this comment

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

These stories import types from @storybook/react, while other stories in this repo/PR use @storybook/react-vite. For consistency with the configured framework (@storybook/react-vite), consider importing Meta/StoryObj from @storybook/react-vite here as well.

Suggested change
import type { Meta, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react-vite';

Copilot uses AI. Check for mistakes.
Comment thread src/stories/Configure.mdx
Comment on lines +199 to +201
<img src={Youtube} alt="Youtube logo" className="sb-explore-image"/>
<div>
Watch tutorials, feature previews and interviews.

Copilot AI Apr 1, 2026

Copy link

Choose a reason for hiding this comment

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

Brand spelling: "Youtube" should be capitalized as "YouTube" in this alt text (and consider renaming the imported identifier too for consistency).

Copilot uses AI. Check for mistakes.
Comment thread src/stories/Configure.mdx
</div>
<div className="sb-section-item">
<img src={Tutorials} alt="A book" className="sb-explore-image"/>
<p>Follow guided walkthroughs on for key workflows.</p>

Copilot AI Apr 1, 2026

Copy link

Choose a reason for hiding this comment

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

Grammar: "Follow guided walkthroughs on for key workflows." reads incorrectly (extra "on"). Consider rephrasing (e.g., "Follow guided walkthroughs for key workflows.").

Suggested change
<p>Follow guided walkthroughs on for key workflows.</p>
<p>Follow guided walkthroughs for key workflows.</p>

Copilot uses AI. Check for mistakes.
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.

3 participants