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

ui/isopicker: Add soft limits for min and max, apply to override and temp sched. #3474

Merged
merged 6 commits into from
Nov 21, 2023

Conversation

mastercactapus
Copy link
Member

@mastercactapus mastercactapus commented Nov 20, 2023

Description:
This PR adds soft min and max limits to the ISO Pickers to allow validation errors while keeping the "always valid" intervals.

Which issue(s) this PR fixes:

Out of Scope:

Screenshots:
image

Describe any introduced user-facing changes:

  • Fixes an issue where keyboard input on fields was buggy
  • Start and End times no longer change each other

Describe any introduced API changes:
N/A

Additional Info:

  • FormContainer now exposes setValidationError as a way to set validation errors up-front without waiting for submit
  • FormField has softMin and softMax props added (and softMinLabel + softMaxLabel)
  • ScheduleOverrideForm has softMax and softMin set on start and end times, respectively
  • TempSchedDialog has softMax and softMin set on start and end times, respectively
  • ISO Pickers will now store values outside of the soft limits in state (similar to other invalid input) before firing onChange. The onChange event will only fire for valid values. Furthermore, if the soft limits are updated, onChange will retro-actively fire to behave correctly in date-range scenarios.
  • Recharts had to be reverted to 2.8.0, as 2.9.3 breaks tooltips and was causing tests to fail

tony-tvu
tony-tvu previously approved these changes Nov 20, 2023
tony-tvu
tony-tvu previously approved these changes Nov 20, 2023
ethan-haynes
ethan-haynes previously approved these changes Nov 21, 2023
KatieMSB
KatieMSB previously approved these changes Nov 21, 2023
@tony-tvu tony-tvu merged commit f799baa into master Nov 21, 2023
7 checks passed
@tony-tvu tony-tvu deleted the isopicker-soft-validation branch November 21, 2023 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants