Skip to content

Conversation

@AmarTrebinjac
Copy link
Contributor

@AmarTrebinjac AmarTrebinjac commented Dec 14, 2025

Changes

Make chats a little bit more interesting and fun :)

Screen.Recording.2025-12-16.at.12.44.21.mov

Events

Did you introduce any new tracking events?

Experiment

Did you introduce any new experiments?

Manual Testing

Caution

Please make sure existing components are not breaking/affected by this PR

Preview domain

https://gif-integration.preview.app.daily.dev

@vercel
Copy link

vercel bot commented Dec 14, 2025

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

Project Deployment Review Updated (UTC)
daily-webapp Ready Ready Preview Dec 18, 2025 6:00am
1 Skipped Deployment
Project Deployment Review Updated (UTC)
storybook Ignored Ignored Dec 18, 2025 6:00am

limit: '20',
favoritesEnabled: open,
});
const [debounceNextPage] = useDebounceFn<void>(() => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Needed to debounce this because Tenor has a 1RPS rate limit, and without this, whenever we re-fetched after a scroll, it resulted in two calls. In production this could result in hitting rate limits.

});
const [open, setOpen] = useState(false);
const [query, setQuery] = useState('');
const [savedSelection, setSavedSelection] = React.useState<[number, number]>([
Copy link
Contributor

Choose a reason for hiding this comment

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

What does this mean the number, number?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Its the cursor / selection the user has made in the input area, where the selected gif will be inserted :)

side="top"
align="start"
avoidCollisions
className="flex h-[25rem] w-screen flex-col rounded-16 border border-border-subtlest-tertiary bg-background-popover p-4 data-[side=bottom]:mt-1 data-[side=top]:mb-1 tablet:w-[31.25rem]"
Copy link
Contributor

Choose a reason for hiding this comment

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

Have you checked this one on mobile as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, works well on mobile :)

Screen.Recording.2025-12-18.at.12.03.01.mov

return lastPage.next || undefined;
},
initialPageParam: undefined,
enabled: !!query,
Copy link
Contributor

Choose a reason for hiding this comment

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

We can also do some throttling here? maybe it's safer (over the debounce)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What exactly are you thinking of?
The debounce seems to work quite well

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add some staleTime as I don't think they'll likely change much and the query key includes query already.

return lastPage.next || undefined;
},
initialPageParam: undefined,
enabled: !!query,
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add some staleTime as I don't think they'll likely change much and the query key includes query already.

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