Skip to content

Conversation

@Mudaafi
Copy link
Contributor

@Mudaafi Mudaafi commented Oct 9, 2025

PR Description

The top-level pagination configs and only affects the rendering of the pagination component and not the actual request made to Constructor. This leads to confusion when attempting to adjust the number of results per page, especially since there isn't an instance where we'd want these values to be different from what is returned in the response (See CioPlpGrid.tsx)

However, since this might be breaking for any consumers using the configs, we'll put up a deprecation notice first and deprecate it in a future major version.

Screenshot 2025-10-10 at 5 36 47 AM

Pull Request Checklist

Before you submit a pull request, please make sure you have to following:

  • I have added or updated TypeScript types for my changes, ensuring they are compatible with the existing codebase.
  • I have added JSDoc comments to my TypeScript definitions for improved documentation.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added any necessary documentation (if appropriate).
  • I have made sure my PR is up-to-date with the main branch.

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no API changes)
  • Documentation content changes
  • TypeScript type definitions update
  • Other... Please describe:

@Mudaafi Mudaafi requested a review from a team October 9, 2025 21:43
@Mudaafi Mudaafi requested a review from HHHindawy as a code owner October 9, 2025 21:43
Copilot AI review requested due to automatic review settings October 9, 2025 21:43
Copy link
Contributor

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

Adds deprecation notices to the totalNumResults and resultsPerPage properties in the UsePaginationProps interface. These properties only affect rendering and not actual API requests, causing confusion for developers trying to adjust pagination behavior.

  • Added JSDoc deprecation warnings for totalNumResults and resultsPerPage properties
  • Included migration guidance pointing developers to use staticRequestConfigs instead

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@esezen esezen merged commit 6637c3d into main Oct 24, 2025
10 of 11 checks passed
@esezen esezen deleted the cdx-279-plp-ui-add-the-deprecation-notice-to-totalnumresults-and branch October 24, 2025 13:21
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