Skip to content

Conversation

fgrgic
Copy link
Contributor

@fgrgic fgrgic commented Aug 8, 2025

Description

Changes:

  • Removed: throttleWithTrailingInvocation utility (no longer used)
  • Replaced: Throttled scroll handler with direct event listener
  • Updated: All animations to use transform scale instead of size/font changes
  • Added: will-change-transform: tells the browser to create a separate GPU layer for an element, so CSS transforms run smoothly without expensive layout recalculations.

Contributor Checklist

Make sure to do the following steps if they are applicable to your PR:

@fgrgic fgrgic marked this pull request as ready for review August 8, 2025 16:36
@infomiho infomiho requested a review from FranjoMindek August 14, 2025 16:30
Copy link
Contributor

@FranjoMindek FranjoMindek left a comment

Choose a reason for hiding this comment

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

Removing throttleWithTrailingInvocation is not what we want:

Screen.Recording.2025-08-18.at.11.30.50.mov

We called the event ~500 times in 6 seconds.
This is not okay.

<header className={cn('sticky top-0 z-50 transition-all duration-300', isScrolled && 'top-4')}>
<header
className={cn(
'sticky top-0 z-50 transition-transform duration-300 ease-out will-change-transform',
Copy link
Contributor

@FranjoMindek FranjoMindek Aug 18, 2025

Choose a reason for hiding this comment

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

will-change-transform should be used for performance reasons.
Our animations are really simple in nature.

I don't think our scroll problems are due to performance problems.
I don't think we need this.

You are free to discuss this.

Copy link
Contributor

Choose a reason for hiding this comment

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

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