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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

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.71%. Comparing base (934bb7a) to head (a6173e8).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5030   +/-   ##
=======================================
  Coverage   96.71%   96.71%           
=======================================
  Files         770      770           
  Lines       26489    26489           
  Branches     3453     3453           
=======================================
  Hits        25618    25618           
  Misses        607      607           
  Partials      264      264           

☔ 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 from cd4ae7f to d1ed227 Compare January 28, 2025 17:10
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.
@robinmolen robinmolen force-pushed the feature/4871-error-messages-for-variable-mapping branch from d1ed227 to 78dd068 Compare January 29, 2025 13:02
@robinmolen robinmolen force-pushed the feature/4871-error-messages-for-variable-mapping branch from 78dd068 to a6173e8 Compare January 29, 2025 13: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