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

Showing error messages in variable mapping #5030

Merged
merged 9 commits into from
Mar 5, 2025

Conversation

robinmolen
Copy link
Contributor

@robinmolen robinmolen commented Jan 22, 2025

Closes #4871

Changes

Showing error messages in the variable mapping for Objects API and DMN.

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

Copy link

codecov bot commented Jan 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.75%. Comparing base (069f6d5) to head (653eca2).
Report is 13 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5030   +/-   ##
=======================================
  Coverage   96.75%   96.75%           
=======================================
  Files         777      778    +1     
  Lines       26724    26741   +17     
  Branches     3474     3474           
=======================================
+ Hits        25856    25873   +17     
  Misses        606      606           
  Partials      262      262           

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

@robinmolen robinmolen force-pushed the feature/4871-error-messages-for-variable-mapping branch 2 times, most recently from 481cf6b to cd4ae7f Compare January 23, 2025 11:50
@robinmolen robinmolen marked this pull request as ready for review January 23, 2025 11:51
@joeribekker joeribekker mentioned this pull request Jan 23, 2025
8 tasks
@sergei-maertens sergei-maertens self-requested a review January 27, 2025 08:17
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.

I don't think this is the most elegant code but it would be hypocritical to expect that, given how we work with validation errors in this codebase. A thorough cleanup/rewrite is in order for some time - when we build a dedicated admin interface instead of lumping everything in the django admin.

@robinmolen robinmolen force-pushed the feature/4871-error-messages-for-variable-mapping branch 3 times, most recently from 78dd068 to a6173e8 Compare January 29, 2025 13:51
Because the inputs in the variable mapping don't have inline labels, the errorlist placement doesn't have to be compensated.
Normally, when the formRow or a child component receives errors, the 'errors' classname is added. This in turn adds basic "error" styling to the underlying inputs.

In situations where multiple inputs are placed in 1 FormRow, and 1 input receives an error, this results in all inputs showing error styling.
Ensure that the error messages for the DMN configuration are placed above the inputs
@robinmolen robinmolen force-pushed the feature/4871-error-messages-for-variable-mapping branch from a6173e8 to 653eca2 Compare March 5, 2025 11:27
@robinmolen robinmolen merged commit 4657f86 into master Mar 5, 2025
48 of 50 checks passed
@robinmolen robinmolen deleted the feature/4871-error-messages-for-variable-mapping branch March 5, 2025 12:51
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.

Display error messages for VariablesMapping (DMN/Objects API prefill)
2 participants