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

FI-3318: Fix erroneous submit disabling for checkbox inputs #548

Merged
merged 3 commits into from
Oct 25, 2024

Conversation

AlyssaWang
Copy link
Collaborator

Summary

This bug was caused by some checkbox inputs getting improperly processed as JSON strings when they were actually arrays of strings. Adding a case to handle this particular typing prevents the error. This PR also refactors some of the InputModal logic to simplify the component logic and provide more consistent reactive handling of required inputs.

Testing Guidance

To reproduce: try to run Demo Group 1 in the Demonstration Suite; the Submit button should be disabled even though all required inputs have values.

After these changes, this should no longer occur -- all inputs should behave according to required input status. Also test JSON and YAML inputs to ensure those features still work as expected.

Copy link

codecov bot commented Oct 23, 2024

Codecov Report

Attention: Patch coverage is 37.12575% with 105 lines in your changes missing coverage. Please review.

Project coverage is 84.06%. Comparing base (1b13c9b) to head (73f1e38).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
client/src/components/InputsModal/InputHelpers.ts 29.32% 94 Missing ⚠️
client/src/components/InputsModal/InputsModal.tsx 66.66% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #548      +/-   ##
==========================================
- Coverage   84.08%   84.06%   -0.03%     
==========================================
  Files         261      262       +1     
  Lines       11392    11409      +17     
  Branches     1252     1254       +2     
==========================================
+ Hits         9579     9591      +12     
- Misses       1803     1808       +5     
  Partials       10       10              
Flag Coverage Δ
backend 92.18% <ø> (ø)
frontend 79.33% <37.12%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@AlyssaWang AlyssaWang merged commit 7f1431a into main Oct 25, 2024
9 of 10 checks passed
@AlyssaWang AlyssaWang deleted the FI-3318-disable-submit branch October 25, 2024 14:10
@Shaumik-Ashraf Shaumik-Ashraf mentioned this pull request Oct 29, 2024
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.

2 participants