Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Datahub][API form] Fix OGC API default limit #813

Merged
merged 4 commits into from
Mar 6, 2024
Merged

Conversation

cmoinier
Copy link
Collaborator

@cmoinier cmoinier commented Mar 5, 2024

Description

This PR fixes an unwanted behavior on the OGC API form.
As specified in the OGC API features, the limit parameter has a default value of 10.

screenshot-1

Despite being an optional parameter, it appears that it still limits the returned items to 10 if no limit is specified, see for instance : https://mel.integration.apps.gs-fr-prod.camptocamp.com/data/ogcapi/collections/pav_etat_parc/items?f=json

This PR sets a default limit to -1 to ensure all items are returned if no limit is set.
/!\ The limit input does not display -1 to avoid confusion for the user.

Quality Assurance Checklist

  • Commit history is devoid of any merge commits and readable to facilitate reviews
  • If new logic ⚙️ is introduced: unit tests were added
  • If new user stories 🤏 are introduced: E2E tests were added
  • If new UI components 🕹️ are introduced: corresponding stories in Storybook were created
  • If breaking changes 🪚 are introduced: add the breaking change label
  • If bugs 🐞 are fixed: add the backport <release branch> label
  • The documentation website 📚 has received the love it deserves

@cmoinier cmoinier changed the title [Datahub][API form] [Datahub][API form] Fix OGC API default limit Mar 5, 2024
Copy link
Contributor

github-actions bot commented Mar 5, 2024

Affected libs: ui-elements, feature-catalog, feature-record, feature-router, feature-search, feature-map, feature-dataviz, ui-catalog, ui-search,
Affected apps: metadata-editor, datahub, demo, webcomponents, map-viewer, search,

  • 🚀 Build and deploy storybook and demo on GitHub Pages
  • 📦 Build and push affected docker images

Copy link
Collaborator

@Angi-Kinas Angi-Kinas left a comment

Choose a reason for hiding this comment

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

Thanks for the fix @cmoinier!
When you removed the 'only' in the e2e-test, it's good to go 👍

Co-authored-by: Angi-Kinas <133115263+Angi-Kinas@users.noreply.github.com>
@cmoinier cmoinier merged commit 4db0b59 into main Mar 6, 2024
9 checks passed
@cmoinier cmoinier deleted the fix/ogc-request-limit branch March 6, 2024 09:05
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