Skip to content

fix: Set default size for GET /extension-requests API#2378

Merged
iamitprakash merged 1 commit intoRealDevSquad:developfrom
AnujChhikara:fix/extension-request-default-size
Feb 19, 2025
Merged

fix: Set default size for GET /extension-requests API#2378
iamitprakash merged 1 commit intoRealDevSquad:developfrom
AnujChhikara:fix/extension-request-default-size

Conversation

@AnujChhikara
Copy link
Contributor

@AnujChhikara AnujChhikara commented Feb 7, 2025

Date: 7 Feb 2025

Developer Name: @AnujChhikara


Issue Ticket Number

Description

  • Added a default size=5 for the /extension-requests API when the size query parameter is not provided.
  • Wrote a test to verify that the API returns exactly 5 extension requests by default.

Documentation Updated?

  • Yes
  • No

Under Feature Flag

  • Yes
  • No

Database Changes

  • Yes
  • No

Breaking Changes

  • Yes
  • No

Development Tested?

  • Yes
  • No

Screenshots

Screenshot 1
  • In the video, you can see that if the size query parameter is not provided, the response returns only five objects.

image

Postman_9k6RGKSYrs.mp4
Screencast.2025-02-12.21.59.04.mp4

Test Coverage

Screenshot 1

image

Additional Notes

@AnujChhikara AnujChhikara self-assigned this Feb 7, 2025
@vikasosmium
Copy link
Contributor

is this video a GIF in screenshots 1?

not able to pause it to see the response.

@AnujChhikara
Copy link
Contributor Author

is this video a GIF in screenshots 1?

not able to pause it to see the response.

It's a gif, changing it with a video

Copy link
Contributor

@shobhan-sundar-goutam shobhan-sundar-goutam left a comment

Choose a reason for hiding this comment

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

  1. Why are we only testing in postman? Why not in actual dashboard site?
  2. Why this is not under feature flag?

@AnujChhikara
Copy link
Contributor Author

  1. Why are we only testing in postman? Why not in actual dashboard site?
  2. Why this is not under feature flag?
  • The issue being discussed is specifically related to the API response, which is why we are testing it in Postman. However, to ensure complete verification, I have also included a video demonstration of the dashboard site. In the video, you can see that when no size query parameter is provided, the API returns only 5 requests by default. As we scroll down, additional requests are fetched dynamically.
  • This change does not require a feature flag because size=5 is already the default behavior on the extension-requests page. You can refer to the relevant code here: Constants.js. The only issue is that the page size is determined from the URL. If we remove size=5 from the URL, the page currently loads all requests at once, which is not the expected behavior. With these changes, even if the size=5 query parameter is removed from the URL, the default behavior remains intact, ensuring limited API requests.

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.

4 participants