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

✨ [#4993] Implement fetching select(boxes) options from Referentielijsten #4996

Conversation

stevenbal
Copy link
Contributor

@stevenbal stevenbal commented Jan 7, 2025

Closes #4993

Changes

  • Implement fetching select(boxes) options from Referentielijsten
  • Add docker-compose file and fixtures for Referentielijsten

Checklist

Check off the items that are completed or not relevant.

  • Impact on features

    • Checked copying a form
    • Checked import/export of a form
    • Config checks in the configuration overview admin page
    • Problem detection in the admin email digest is handled
  • Release management

    • I have labelled the PR as "needs-backport" accordingly
  • I have updated the translations assets (you do NOT need to provide translations)

    • Ran ./bin/makemessages_js.sh
    • Ran ./bin/compilemessages_js.sh
  • Dockerfile/scripts

    • Updated the Dockerfile with the necessary scripts from the ./bin folder
  • Commit hygiene

    • Commit messages refer to the relevant Github issue
    • Commit messages explain the "why" of change, not the how

@stevenbal stevenbal marked this pull request as draft January 7, 2025 14:33
Copy link

codecov bot commented Jan 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.68%. Comparing base (1658eca) to head (4c63012).
Report is 21 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4996   +/-   ##
=======================================
  Coverage   96.67%   96.68%           
=======================================
  Files         765      767    +2     
  Lines       26131    26205   +74     
  Branches     3407     3414    +7     
=======================================
+ Hits        25262    25336   +74     
  Misses        606      606           
  Partials      263      263           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@stevenbal stevenbal force-pushed the feature/4993-referentielijsten-populate-component-choices branch from dbb75e3 to b82f2ab Compare January 7, 2025 15:28
@stevenbal stevenbal force-pushed the feature/4993-referentielijsten-populate-component-choices branch 6 times, most recently from adc42bb to 9881217 Compare January 13, 2025 12:59
@stevenbal stevenbal changed the title 🚧 [#4993] Implement fetching select(boxes) options from Referentielijsten ✨ [#4993] Implement fetching select(boxes) options from Referentielijsten Jan 13, 2025
@stevenbal stevenbal force-pushed the feature/4993-referentielijsten-populate-component-choices branch 4 times, most recently from 45ea58b to 99217fa Compare January 13, 2025 15:18
@stevenbal stevenbal marked this pull request as ready for review January 13, 2025 15:35
@stevenbal stevenbal force-pushed the feature/4993-referentielijsten-populate-component-choices branch from 99217fa to 5b99dc0 Compare January 13, 2025 15:35
@stevenbal stevenbal marked this pull request as draft January 14, 2025 14:34
@stevenbal stevenbal force-pushed the feature/4993-referentielijsten-populate-component-choices branch 3 times, most recently from 0743288 to a8710d5 Compare January 21, 2025 09:48
@stevenbal
Copy link
Contributor Author

stevenbal commented Jan 21, 2025

@sergei-maertens I've changed the code to raise a 503 if the options could not be fetched

image

I do think this needs some changes in the SDK to display the unavailability message Open Forms is currently unavailable, please try again later. instead of a generic Er ging helaas iets fout right?

I've also added a task to raise 503 in case of service fetch failures to the service fetch epic #4965

@stevenbal stevenbal marked this pull request as ready for review January 21, 2025 09:51
@stevenbal stevenbal force-pushed the feature/4993-referentielijsten-populate-component-choices branch from a8710d5 to 30efbb4 Compare January 21, 2025 09:53
@sergei-maertens
Copy link
Member

@sergei-maertens I've changed the code to raise a 503 if the options could not be fetched

image

I do think this needs some changes in the SDK to display the unavailability message Open Forms is currently unavailable, please try again later. instead of a generic Er ging helaas iets fout right?

I've also added a task to raise 503 in case of service fetch failures to the service fetch epic #4965

I recently stumbled on https://github.com/open-formulieren/open-forms-sdk/blob/da9810bef07411f6adb9e13958c2f8aa08195f13/src/components/RequireSubmission.jsx#L32 and I know that https://github.com/open-formulieren/open-forms-sdk/blob/da9810bef07411f6adb9e13958c2f8aa08195f13/src/components/Errors/ErrorBoundary.jsx#L161 also seems to handle a particular case, looks like the code above decides about generic error vs. specific :)

@stevenbal stevenbal force-pushed the feature/4993-referentielijsten-populate-component-choices branch from 30efbb4 to ff370db Compare January 24, 2025 08:41
@stevenbal stevenbal force-pushed the feature/4993-referentielijsten-populate-component-choices branch from ff370db to 6bbde1d Compare January 27, 2025 14:16
…sten

this was previously possible with logic and service fetch, but this functionality provides a shortcut to more easily integrate with Re ferentielijsten API
to be used for unittests with VCR and local development
@stevenbal stevenbal force-pushed the feature/4993-referentielijsten-populate-component-choices branch from 6bbde1d to 2620dc9 Compare January 27, 2025 14:17
@stevenbal stevenbal marked this pull request as draft January 27, 2025 15:00
@stevenbal stevenbal force-pushed the feature/4993-referentielijsten-populate-component-choices branch from 2620dc9 to 7c6ae53 Compare January 27, 2025 15:10
@stevenbal stevenbal marked this pull request as ready for review January 27, 2025 15:10
@stevenbal stevenbal force-pushed the feature/4993-referentielijsten-populate-component-choices branch from 7c6ae53 to 4c63012 Compare January 27, 2025 15:36
@sergei-maertens sergei-maertens merged commit 713dfe2 into master Jan 28, 2025
33 checks passed
@sergei-maertens sergei-maertens deleted the feature/4993-referentielijsten-populate-component-choices branch January 28, 2025 16:07
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.

When loading the formstep perform a service fetch operation to populate the component choices
2 participants