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

Morecast: Empty Cell validation #3957

Merged
merged 19 commits into from
Sep 26, 2024
Merged

Conversation

conbrad
Copy link
Collaborator

@conbrad conbrad commented Sep 23, 2024

Separate error into error and invalid states, where error is a superset of invalid but includes an empty check. Forecast cells (except for grass curing and wind direction) include both error and invalid state checks.

SaveForecastButton will set isRequiredInputSet redux flag to false if any rowsToSave have empty fields that are required. Forecast cell subscribes to the state and checks it's own value for emptiness and renders itself accordingly.

Note:

  • put WindDirectionForecastCell in it's own component otherwise it renders the cell very wide. If anyone can spot why we could remove it. It should be able to rendered the same way as ValidatedGrassCureForecastCell.
  • unable to get react-testing-library to recognize the error border color in cells when they are in error or invalid states

Closes #3954

Test Links:

Landing Page
MoreCast
Percentile Calculator
C-Haines
FireBat
FireBat bookmark
Auto Spatial Advisory (ASA)
HFI Calculator

Copy link

codecov bot commented Sep 24, 2024

Codecov Report

Attention: Patch coverage is 94.11765% with 3 lines in your changes missing coverage. Please review.

Project coverage is 80.02%. Comparing base (5771b27) to head (c344ec0).
Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
...c/features/moreCast2/components/TabbedDataGrid.tsx 40.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3957      +/-   ##
==========================================
+ Coverage   79.92%   80.02%   +0.10%     
==========================================
  Files         298      302       +4     
  Lines       11430    11472      +42     
  Branches      541      549       +8     
==========================================
+ Hits         9135     9181      +46     
+ Misses       2109     2106       -3     
+ Partials      186      185       -1     

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

@conbrad conbrad marked this pull request as ready for review September 24, 2024 21:10
@conbrad conbrad requested review from brettedw and dgboss September 24, 2024 21:11
@conbrad conbrad requested a review from brettedw September 24, 2024 23:07
Copy link
Collaborator

@brettedw brettedw left a comment

Choose a reason for hiding this comment

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

Nice work, functions great!

@dgboss
Copy link
Collaborator

dgboss commented Sep 25, 2024

I'm seeing a warning in the console the first time I enter a value out of range.
image

Copy link
Collaborator

@dgboss dgboss left a comment

Choose a reason for hiding this comment

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

Looks great!

Copy link

@conbrad conbrad temporarily deployed to production September 26, 2024 21:58 Inactive
@conbrad conbrad merged commit 6d58aff into main Sep 26, 2024
25 checks passed
@conbrad conbrad deleted the task/empty-cell-validation-morecast branch September 26, 2024 22:15
conbrad added a commit that referenced this pull request Oct 1, 2024
@conbrad conbrad restored the task/empty-cell-validation-morecast branch October 1, 2024 20:19
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.

Morecast: Empty input validation
3 participants