feat: add Add Event button to homepage CTA and refine styling#474
feat: add Add Event button to homepage CTA and refine styling#474Kabe-Innovates wants to merge 0 commit intoFOSSUChennai:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a new "Add Event" button to the homepage Call-to-Action section and introduces a comprehensive design system refresh with consistent styling utilities. The changes enable users to directly submit events via a form-based workflow while modernizing the visual appearance across all pages.
Key Changes
- Added
/add-eventpage with a comprehensive event submission form that generates JSON for GitHub PR contributions - Introduced reusable CSS utility classes (
.btn,.surface,.section-title,.badge) inglobals.cssfor design consistency - Refactored component styling to use the new utility classes, improving maintainability and visual consistency
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
src/components/pages/add-event/AddEventForm.tsx |
New component with form validation, JSON generation, and step-by-step submission instructions |
src/app/add-event/page.tsx |
New page route for the event submission form |
src/components/pages/home/calltoaction.tsx |
Added "Add Event" Link button alongside existing CTA buttons |
src/app/globals.css |
Defined new utility classes for buttons, surfaces, badges, and typography |
src/components/shared/header.tsx |
Applied new utility classes and improved layout spacing |
src/components/shared/footer.tsx |
Updated styling with new utility classes and improved link presentation |
src/components/pages/home/hero.tsx |
Refined spacing, typography, and gradient effects |
src/components/pages/home/events.tsx |
Applied badge and surface utility classes for consistency |
src/components/pages/Communities/Community.tsx |
Updated to use new design system utilities |
src/components/pages/Archive/archive.tsx |
Applied new styling utilities and improved filter/sort UI |
src/components/github-button.tsx |
Simplified styling using utility classes |
src/app/page.tsx |
Cleaned up wrapper structure using new container utility |
src/app/not-found.tsx |
Updated color values to match new design tokens |
src/app/layout.tsx |
Updated body classes for improved layout |
src/app/Communities/page.tsx |
Code formatting improvements |
package-lock.json |
Standard npm peer dependency updates |
Comments suppressed due to low confidence (1)
src/components/pages/home/calltoaction.tsx:54
- The "Communities" button uses a Next.js Link component pattern (
<Link>) for the "Add Event" button on line 43-48, but continues to userouter.push()with a regular<button>for the "Communities" button on lines 49-54. For consistency and better Next.js performance benefits (prefetching, faster navigation), both buttons should use the Link component with proper styling rather than mixing Link and router.push patterns.
<button
className='btn bg-white/15 px-6 py-3 text-base text-white hover:bg-white/20 focus-visible:ring-white/30'
onClick={() => router.push('/Communities')}
>
Communities
</button>
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| {logoHostname && logoHostAllowed === false && ( | ||
| <div className='rounded-xl border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-900'> | ||
| The logo host <span className='font-medium'>{logoHostname}</span> might not be allowed | ||
| by Next.js image settings. If the logo doesn’t show up after merge, a maintainer may | ||
| need to add the hostname to <span className='font-medium'>next.config.ts</span>. | ||
| </div> | ||
| )} |
There was a problem hiding this comment.
The logo hostname validation checks against ALLOWED_LOGO_HOSTS, but the warning message suggests this is about Next.js image configuration. However, the check doesn't validate whether the hostname is actually in the Next.js config - it only checks against a hardcoded list. This could lead to false positives (showing warnings for hosts that ARE configured) or false negatives (not warning about hosts that AREN'T configured). Consider either removing this check, or fetching the actual Next.js image config to validate against it.
| {logoHostname && logoHostAllowed === false && ( | |
| <div className='rounded-xl border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-900'> | |
| The logo host <span className='font-medium'>{logoHostname}</span> might not be allowed | |
| by Next.js image settings. If the logo doesn’t show up after merge, a maintainer may | |
| need to add the hostname to <span className='font-medium'>next.config.ts</span>. | |
| </div> | |
| )} |
| <div className='grid h-8 w-8 place-items-center rounded-full bg-green-600 text-sm font-semibold text-white shadow-sm'> | ||
| {number} | ||
| </div> | ||
| {number !== 3 && <div className='mt-2 h-full w-px bg-green-200' />} |
There was a problem hiding this comment.
The Step component hardcodes number !== 3 to determine whether to show the connector line. This creates a tight coupling between the step logic and the specific number of steps in the implementation. If the number of steps changes in the future, this condition would need manual updating. Consider accepting an isLast prop or deriving this from the parent component to make it more maintainable.
| <button | ||
| className='btn btn-primary' | ||
| onClick={() => { | ||
| markAllTouched(); | ||
| if (!isFormValid) return; | ||
| copyJson(); | ||
| }} | ||
| > | ||
| {copyStatus === 'copied' | ||
| ? 'Copied!' | ||
| : copyStatus === 'failed' | ||
| ? 'Copy failed' | ||
| : 'Copy JSON'} | ||
| </button> | ||
|
|
||
| <button | ||
| className='btn btn-secondary' | ||
| onClick={() => { | ||
| markAllTouched(); | ||
| if (!isFormValid) return; | ||
| downloadJson(); | ||
| }} |
There was a problem hiding this comment.
The markAllTouched function is called before checking isFormValid in both button click handlers. This means if users click the buttons with invalid fields, all fields will be marked as touched (showing all errors), but the action won't proceed. While this is functional, it might be better UX to either show a toast/message explaining why the action didn't proceed, or to ensure the validation errors are clearly visible when all fields are marked touched.
| className='btn bg-white/15 px-6 py-3 text-base text-white hover:bg-white/20 focus-visible:ring-white/30' | ||
| > | ||
| Add Event | ||
| </Link> | ||
| <button | ||
| className='rounded-lg border border-white/50 bg-transparent px-6 py-3 text-base font-medium text-white transition-all duration-300 hover:scale-105 hover:bg-white/20 focus:ring focus:ring-white/30 active:scale-95' | ||
| className='btn bg-white/15 px-6 py-3 text-base text-white hover:bg-white/20 focus-visible:ring-white/30' |
There was a problem hiding this comment.
The 'focus-visible' pseudo-class is used in the .btn utility class, but the CallToAction buttons on lines 45 and 50 use 'focus-visible:ring-white/30' which overrides the default green ring. While this is intentional for the specific visual context (white text on green background), it's inconsistent with the base .btn class definition. Consider creating a .btn-inverse or similar variant in globals.css for buttons on colored backgrounds to maintain consistency.
| 'use client'; | ||
| import React from 'react'; | ||
| import Image from 'next/image'; | ||
| import { useRouter } from 'next/navigation'; |
There was a problem hiding this comment.
Since the Link component is already imported and used for the "Add Event" button, the useRouter import on line 4 is now only used for the "Communities" button. This adds unnecessary client-side JavaScript and complexity. Consider replacing the router.push pattern with Link for the Communities button to eliminate the need for useRouter entirely.
src/components/shared/header.tsx
Outdated
| className='btn btn-ghost' | ||
| target='_blank' | ||
| aria-label='Subscribe to RSS feed (opens in a new tab)' | ||
| title='RSS feed' |
There was a problem hiding this comment.
The RSS link has both aria-label and title attributes with similar but not identical content. The aria-label says "Subscribe to RSS feed (opens in a new tab)" while the title says "RSS feed". For better accessibility, these should be consistent. Consider using just the aria-label (which is read by screen readers) or ensure both convey the same complete information, particularly the fact that it opens in a new tab.
| title='RSS feed' | |
| title='Subscribe to RSS feed (opens in a new tab)' |
| onBlur={onBlur('eventDescription')} | ||
| placeholder='Brief description of the event...' | ||
| error={touched.eventDescription ? errors.eventDescription : undefined} | ||
| helper={`${Math.min(form.eventDescription.length, 999)}/200`} |
There was a problem hiding this comment.
The character counter displays up to 999 characters (Math.min(form.eventDescription.length, 999)), but the validation only allows 200 characters. This inconsistency could confuse users. The counter should either cap at 200 to match the validation limit, or use the actual length without capping.
| helper={`${Math.min(form.eventDescription.length, 999)}/200`} | |
| helper={`${Math.min(form.eventDescription.length, 200)}/200`} |
|
@Kabe-Innovates amazing PR. @JustinBenito and @nammahari your views please. |
|
Closing this in favor of PR #479 |


This PR adds a new "Add Event" button to the homepage Call-to-Action section, enabling users to navigate directly to the event submission form. It also refines the component's styling for better consistency and visual appeal.
Changes: