Skip to content

Conversation

@giannif
Copy link
Collaborator

@giannif giannif commented Jun 30, 2025

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Jun 30, 2025

🦋 Changeset detected

Latest commit: 3e2f5ab

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@giphy/js-fetch-api Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@giannif giannif force-pushed the visibility-service-issues-2 branch from 2194f72 to 67b16e8 Compare June 30, 2025 17:25
@giannif giannif force-pushed the visibility-service-issues-2 branch from 67b16e8 to f66e999 Compare June 30, 2025 17:36
@giannif giannif requested a review from Copilot June 30, 2025 17:37

This comment was marked as outdated.

@giannif giannif requested a review from jakeycodez June 30, 2025 17:43
@giannif giannif requested a review from Copilot June 30, 2025 18:08

This comment was marked as outdated.

@giannif giannif requested a review from Copilot June 30, 2025 20:18

This comment was marked as outdated.

@giannif giannif requested a review from Copilot June 30, 2025 20:38
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the gif paginator to correctly calculate the next offset from pagination.offset, switch to a hidden-GIFs flag for continuation logic, and use pagination.total_count to determine completion.

  • Replaces the old skipCountCheck approach with a pagination.hasMoreGifs flag.
  • Computes offset as pagination.offset + pagination.count and sets isDoneFetching based on pagination.total_count.
  • Adds a changeset entry documenting the hidden-GIFs workaround.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/fetch-api/src/paginator.ts Revise pagination offset logic, hidden GIFs flag usage, and fetch completion check
.changeset/rotten-cups-hear.md Document patch for hidden GIFs workaround
Comments suppressed due to low confidence (2)

packages/fetch-api/src/paginator.ts:43

  • [nitpick] The variable name g is ambiguous; consider renaming it to something more descriptive like paginatedGifs or currentGifs.
        const g = [...gifs]

packages/fetch-api/src/paginator.ts:27

  • [nitpick] The comment here could be more precise—e.g. Set offset to pagination.offset + pagination.count for the next fetch call—to better explain the logic.
        // on the next request, this will be the offset

@giannif giannif merged commit bba502b into master Jul 1, 2025
1 check passed
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.

1 participant