Skip to content

Events carousel#12

Open
JohnVarghese007 wants to merge 11 commits intomain-devfrom
alternate-events-carousel
Open

Events carousel#12
JohnVarghese007 wants to merge 11 commits intomain-devfrom
alternate-events-carousel

Conversation

@JohnVarghese007
Copy link
Copy Markdown

EventCard and EventCarousel components

Copy link
Copy Markdown
Contributor

@GauravKano GauravKano left a comment

Choose a reason for hiding this comment

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

Overall, the changes seem great, however, there are a few fixes that need to be made before it can be approved.

Comment thread src/styles/global.css Outdated
Comment thread src/styles/global.css
Comment thread src/components/EventCard.tsx Outdated
days: 0,
hours: 0,
mins: 0,
secs: 0,
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.

We shouldn't be keeping track of the seconds and updating the state every second since the seconds don't need to be displayed

Comment thread src/components/EventCard.tsx Outdated
</h2>

<p className="font-montserrat text-2xl sm:text-2xl lg:text-3xl pt-5 opacity-90">
{event.time}
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.

Instead of event.time, we should be displaying event.date in the format of "Day, Month Date" (ex: "Friday, October 18th")

Comment thread src/components/EventCard.tsx Outdated
};

updateCountdown();
const timer = setInterval(updateCountdown, 1000);
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.

We should change this since we do not want to be updating seconds.

On render, we should run the updateCountdown function (which already happens). Then we should run it the second time when the next minute hits (60000 - (Date.now() % 60000)). This can be done with a setTimeout that should also be cleaned up inside the return statement. Then we should run it similar to how we currently have, but with a 60 second interval.

);
}

const animationClass = isAnimating
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.

Could we possibly add different animations for going left and then going right in the carousel?

Not too important, but would be a great change

Comment thread src/components/EventCarousel.tsx Outdated
onTouchEnd={onTouchEnd}
>
{/* Desktop */}
<div className="hidden w-full items-center justify-center gap-3 sm:flex">
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.

We should most likely change from desktop to mobile at breakpoint md rather than sm

Comment thread src/components/EventCarousel.tsx Outdated
return (
<section className="w-full py-6">
<div
className="mx-auto flex w-full max-w-6xl flex-col items-center gap-4 px-3 sm:px-4"
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.

max-w-6xl seems to be too large, I would recommend changing it to be max-w-5xl

Comment thread src/components/EventCard.tsx Outdated
<span className="font-bungee text-2xl sm:text-3xl lg:text-4xl leading-none">
{String(unit.value).padStart(2, "0")}
</span>
<span className="font-inria mt-1 sm:mt-2 lg:mt-2 text-xs sm:text-base lg:text-xl opacity-85 tracking-wide">
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.

I would recommend using gap in the div on line 104, rather than using margin top in this span.

The current spacing causes the elements in the countdown space to be off center vertically

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.

The sizing of the fonts and spacing seems great for the desktop (larger screens), however, it seems to stay too large as the screen size shrinks. I would recommend tweaking that a little. Could possibly use breakpoints in tailwind or css clamp

@JohnVarghese007
Copy link
Copy Markdown
Author

I believe I have made the necessary changes now
lmk if anything needs additional changes/is broken

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