Skip to content

Fix/gradient background full height#138

Merged
SatyamPandey-07 merged 2 commits into
niharika-mente:mainfrom
MEHWISH310:fix/gradient-background-full-height
Jul 10, 2026
Merged

Fix/gradient background full height#138
SatyamPandey-07 merged 2 commits into
niharika-mente:mainfrom
MEHWISH310:fix/gradient-background-full-height

Conversation

@MEHWISH310

@MEHWISH310 MEHWISH310 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Description

This PR fixes the animated gradient background so it extends across the entire scrollable height of the page, instead of cutting off after the first viewport and showing plain white background on scroll (e.g. on the Create Event page, past the "Basic Info" section).

Root cause: In app/layout.tsx, the gradient wrapper div uses absolute inset-0, but no ancestor (html/body) had position: relative. This made the div position itself relative to the viewport-sized initial containing block instead of the full document, so it was locked to exactly one screen height.

Fix: Added relative to the body rule in app/globals.css, so the gradient wrapper's containing block becomes body (whose height is driven by the actual page content), letting the gradient stretch to the full page height. No changes were needed in components/LightRays.tsx — it already resizes its canvas via ResizeObserver on its container.

Fixes #135


Note on second commit: While setting up the project locally to test this fix, I ran into a few pre-existing issues in main that were unrelated to #135 but blocked starting at all:

  • A dynamic route naming conflict between app/api/events/[id] and app/api/events/[slug] (Next.js requires the same param name at a given route level)
  • A duplicate export default in app/page.tsx, plus dead/leftover code (const events declared twice, referencing an undefined resolvedParams)

I fixed these in a separate commit so they're easy to review or drop independently — they aren't part of the #135 scope. Happy to split them into their own issue/PR instead if you'd prefer to keep this PR focused only on the gradient fix — just let me know and I'll rebase.

Type of Change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update (non-code modifications)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.

  • Manual testing (describe steps and browser tested in)
    Ran the app locally, navigated to the Create Event page, and scrolled down to the "Event Details" section. Confirmed the gradient background now continues across the full page instead of cutting off to plain white. Also spot-checked /events and /my-bookings since this is a global layout-level fix, not page-specific.
  • Browser tested: Chrome (Windows)
  • Automated tests added/run (if applicable)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly
  • My changes generate no new warnings or console errors
  • Any dependent changes have been merged and published in downstream modules

Summary by CodeRabbit

  • New Features

    • Updated event registration handling so event links now work with the current event URL format.
  • Bug Fixes

    • Improved the home page event loading flow to reliably show featured events or an empty state.
    • Added a layout update to keep the page styling consistent across the app.
  • Chores

    • Pinned several development tool versions for more predictable builds and installs.

@vercel

vercel Bot commented Jul 8, 2026

Copy link
Copy Markdown

@MEHWISH310 is attempting to deploy a commit to the niharika-mente's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR renames a dynamic route parameter from id to slug in the event registration API, simplifies the homepage's event fetching by removing query/mode/tag filters, removes a redundant export statement, adds a CSS positioning utility, and pins several devDependency versions.

Changes

Route, Page, and Config Updates

Layer / File(s) Summary
Register API route param rename
app/api/events/[slug]/register/route.ts
RouteParams now resolves { slug: string } instead of { id: string }, and the POST handler destructures slug into eventId for downstream validation and lookups.
Homepage event fetch simplification
app/page.tsx
Page now calls getAllEvents() without query/mode/tag filters instead of passing resolvedParams, and a redundant trailing export default Page; statement is removed.
CSS utility and dependency pinning
app/globals.css, package.json, tsconfig.json
Adds relative to the body's @apply utilities, pins @types/node, @types/react, and typescript to exact versions, and adjusts the tsconfig.json end-of-file closing brace.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested labels: Medium

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and matches the main change: fixing the full-height gradient background.
Description check ✅ Passed The description includes the required summary, issue number, change type, testing, and checklist sections.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@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: 2

🧹 Nitpick comments (1)
package.json (1)

36-38: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Align @types/react-dom pinning strategy with @types/react.

@types/react is exact-pinned to 19.2.17 while its companion @types/react-dom uses a caret range ^19. These packages are tightly coupled — a mismatched update could introduce type inconsistencies. Consider pinning @types/react-dom to an exact version as well.

♻️ Suggested alignment
-    "`@types/react-dom`": "^19",
+    "`@types/react-dom`": "19.2.5",
🤖 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 `@package.json` around lines 36 - 38, `@types/react-dom` is using a caret range
while `@types/react` is exact-pinned, which can let the companion types drift
apart. Update the dependency entry in package.json so `@types/react-dom` follows
the same exact pinning strategy as `@types/react`, keeping the two React type
packages aligned.
🤖 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 `@app/api/events/`[slug]/register/route.ts:
- Line 15: The route param name is misleading because `slug` in `register` is
actually treated as a MongoDB ObjectId, not the Event model’s real slug. Update
the handler in `route.ts` to use a clearer identifier for the destructured param
in the `register` route (the one currently assigned to `eventId`) and keep
`event.slug` reserved for the actual event slug used by `revalidatePath`. If you
don’t rename the param yet, add a clarifying comment near the destructuring and
validation so consumers and maintainers don’t confuse the two meanings.
- Around line 7-15: The POST handler in POST and RouteParams is placed under
app/api/ even though only GET /api/events/[slug] is allowed there. Move this
registration endpoint out of the app/api/**/route.ts structure into the
appropriate non-API location, and update any imports or callers so the POST
logic still works after relocating the route.

---

Nitpick comments:
In `@package.json`:
- Around line 36-38: `@types/react-dom` is using a caret range while
`@types/react` is exact-pinned, which can let the companion types drift apart.
Update the dependency entry in package.json so `@types/react-dom` follows the
same exact pinning strategy as `@types/react`, keeping the two React type
packages aligned.
🪄 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: CHILL

Plan: Pro

Run ID: 0897ddfe-a6c2-4c4c-82f1-54f95aa24926

📥 Commits

Reviewing files that changed from the base of the PR and between 41cc0c1 and 2a65581.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json, !package-lock.json
📒 Files selected for processing (5)
  • app/api/events/[slug]/register/route.ts
  • app/globals.css
  • app/page.tsx
  • package.json
  • tsconfig.json

Comment thread app/api/events/[slug]/register/route.ts
Comment thread app/api/events/[slug]/register/route.ts
@SatyamPandey-07 SatyamPandey-07 merged commit 2a6d499 into niharika-mente:main Jul 10, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Medium SSoC26 TO CONTRIBUTE

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Background gradient doesn't extend for full page height on Create Event page

2 participants