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

[#4418] Add addressNl specific mappings to Objects API registration (variables tab) #4751

Conversation

vaszig
Copy link
Contributor

@vaszig vaszig commented Oct 11, 2024

Closes #4418

Changes

This PR handles the frontend part of the task

  • Added specific addressNL fields/mappings to the Objects API registration (backend-frontend)
  • Added stories

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
  • Commit hygiene

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

@vaszig vaszig marked this pull request as draft October 11, 2024 14:19
Copy link

codecov bot commented Oct 11, 2024

Codecov Report

Attention: Patch coverage is 97.61905% with 1 line in your changes missing coverage. Please review.

Project coverage is 96.60%. Comparing base (d985471) to head (8371e62).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
...ons/contrib/objects_api/submission_registration.py 94.44% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4751   +/-   ##
=======================================
  Coverage   96.60%   96.60%           
=======================================
  Files         749      749           
  Lines       25540    25575   +35     
  Branches     3377     3384    +7     
=======================================
+ Hits        24674    24708   +34     
  Misses        604      604           
- Partials      262      263    +1     

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


🚨 Try these New Features:

@vaszig vaszig force-pushed the task/4418-transform-mechanism-for-addressnl-in-objectsAPI branch 2 times, most recently from 243a9ca to 284877f Compare November 5, 2024 10:09
@vaszig vaszig marked this pull request as ready for review November 5, 2024 10:20
@vaszig vaszig requested a review from stevenbal November 5, 2024 10:20
@vaszig vaszig force-pushed the task/4418-transform-mechanism-for-addressnl-in-objectsAPI branch 2 times, most recently from 31fba07 to 0f5fff7 Compare November 6, 2024 14:50
@vaszig vaszig removed the request for review from stevenbal November 7, 2024 08:58
@vaszig vaszig force-pushed the task/4418-transform-mechanism-for-addressnl-in-objectsAPI branch from 0f5fff7 to 0a47362 Compare November 7, 2024 11:38
@sergei-maertens sergei-maertens marked this pull request as draft November 15, 2024 21:27
@vaszig vaszig force-pushed the task/4418-transform-mechanism-for-addressnl-in-objectsAPI branch 4 times, most recently from 041b38d to 44a63cd Compare November 18, 2024 08:22
@vaszig vaszig marked this pull request as ready for review November 18, 2024 09:31
@vaszig
Copy link
Contributor Author

vaszig commented Nov 18, 2024

FYI, we have to take into consideration the old forms that they already may have addressNL variable_mappings configured. We may need a data migration for this.

@sergei-maertens sergei-maertens force-pushed the task/4418-transform-mechanism-for-addressnl-in-objectsAPI branch from 44a63cd to 2e11645 Compare November 19, 2024 08:45
Copy link
Member

@sergei-maertens sergei-maertens left a comment

Choose a reason for hiding this comment

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

Functional remarks:

  • Is it possible to disable/remove the "map to geometry field" row/option when configuring an AddressNL component?

  • The checkbox looks a bit odd because the label is specified before the checkbox itself:
    image

    Standard Django form styling puts this in a different order:

    image

    If we change this (please do), then I think the "map geometry field" needs the same treatment :)

  • The "show json schema" component doesn't seem to make a lot of sense when mapping specific sub-components

    image

    "Normally" this shows the json schema of the selected property from the object type when selecting a target path. This isn't relevant when mapping in more detail, unless you use this component for each nested target path, which will probably clutter too much, so I'd just not display it at all when mapping the sub components.

@vaszig vaszig force-pushed the task/4418-transform-mechanism-for-addressnl-in-objectsAPI branch from 2e11645 to 2d8f125 Compare November 22, 2024 07:35
@sergei-maertens sergei-maertens force-pushed the task/4418-transform-mechanism-for-addressnl-in-objectsAPI branch from 2d8f125 to 8371e62 Compare November 22, 2024 14:11
@vaszig
Copy link
Contributor Author

vaszig commented Nov 22, 2024

Just a reminder for the translations and for #4751 (comment)

@sergei-maertens
Copy link
Member

Just a reminder for the translations and for #4751 (comment)

I will do translations separately and I'll take a look at the data migration remark.

@sergei-maertens sergei-maertens merged commit a5b4a23 into master Nov 22, 2024
34 checks passed
@sergei-maertens sergei-maertens deleted the task/4418-transform-mechanism-for-addressnl-in-objectsAPI branch November 22, 2024 14:32
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.

Figure out a "transform" mechanism for (AddressNL) component(s) when registering them in the Objects API
3 participants