Skip to content

Ensure form presenter is applied on create/update actions#8238

Merged
javierjulio merged 2 commits into
masterfrom
fix-form-page-presenter-on-submit
Jan 16, 2024
Merged

Ensure form presenter is applied on create/update actions#8238
javierjulio merged 2 commits into
masterfrom
fix-form-page-presenter-on-submit

Conversation

@javierjulio

@javierjulio javierjulio commented Jan 16, 2024

Copy link
Copy Markdown
Member

This fixes a bug when submitting a form that contains validation errors, the form page presenter wasn't being applied so the default was used. I realized during testing that the f.semantic_errors display wasn't having any effect when it should have. With this fix, it now does. This is the same fix as we did for the page title on form submission in #8210 specifically this commit 783992e.

This also fixes some styling issues with the form errors list which is what we were testing. If the list only contains a single item then the bottom margin makes the alignment look off. We now use the space-y-* utility to dynamically control the spacing between child elements from the parent.

If the form is invalid, the form page presenter wasn't being applied. Same fix as we did for the page title on form submission in #8210 specifically this commit: 783992e
Now that these are visible on submission when form is invalid, we can update them. If the list only contains a single item them the bottom margin makes it look off. We now use the space-y-* utility to dynamically control the spacing between child elements from the parent. Also adjust the bottom margin on the list to be larger and smaller rounded borders to match.
@codecov

codecov Bot commented Jan 16, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (714b61c) 99.10% compared to head (bf1aa4d) 99.10%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8238   +/-   ##
=======================================
  Coverage   99.10%   99.10%           
=======================================
  Files         140      140           
  Lines        4018     4018           
=======================================
  Hits         3982     3982           
  Misses         36       36           

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

@javierjulio javierjulio changed the title Apply form presenter on submit for invalid case Ensure form presenter is applied on create/update actions Jan 16, 2024
@javierjulio javierjulio merged commit 85d2fb9 into master Jan 16, 2024
@javierjulio javierjulio deleted the fix-form-page-presenter-on-submit branch January 16, 2024 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant