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

Bugfix/7873 time conductor input validation #7886

Merged
merged 9 commits into from
Oct 17, 2024

Conversation

davetsay
Copy link
Contributor

@davetsay davetsay commented Oct 11, 2024

Closes #7873

Describe your changes:

  • Checks validation of inputs on input event
  • Only reports validation of inputs on change event, so user is not punished early
  • Only reports logical validation errors on submit (limit out of bounds, start bounds greater than end bounds, etc.)

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Is this a notable change that will require a special callout in the release notes? For example, will this break compatibility with existing APIs or projects that consume these plugins?

Author Checklist

  • Changes address original issue?
  • Tests included and/or updated with changes?
  • Has this been smoke tested?
  • Have you associated this PR with a type: label? Note: this is not necessarily the same as the original issue.
  • Have you associated a milestone with this PR? Note: leave blank if unsure.
  • Testing instructions included in associated issue OR is this a dependency/testcase change?

Reviewer Checklist

  • Changes appear to address issue?
  • Reviewer has tested changes by following the provided instructions?
  • Changes appear not to be breaking changes?
  • Appropriate automated tests included?
  • Code style and in-line documentation are appropriate?

@davetsay davetsay added type:bug bug:regression It used to work. Now it doesn't :( labels Oct 11, 2024
@davetsay davetsay added this to the Build 9 RC11 milestone Oct 11, 2024
Copy link

codecov bot commented Oct 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 64.91%. Comparing base (890ddca) to head (af5702c).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7886      +/-   ##
==========================================
+ Coverage   57.58%   64.91%   +7.33%     
==========================================
  Files         676      434     -242     
  Lines       27353    13592   -13761     
  Branches     2685        0    -2685     
==========================================
- Hits        15750     8823    -6927     
+ Misses      11267     4769    -6498     
+ Partials      336        0     -336     
Flag Coverage Δ
e2e-ci 62.38% <ø> (-0.07%) ⬇️
e2e-full 41.76% <ø> (-9.68%) ⬇️
unit ?

see 369 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 890ddca...af5702c. Read the comment docs.

@davetsay davetsay marked this pull request as ready for review October 11, 2024 23:46
@davetsay davetsay self-assigned this Oct 12, 2024
@shefalijoshi shefalijoshi self-requested a review October 15, 2024 23:00
Copy link
Contributor

@shefalijoshi shefalijoshi left a comment

Choose a reason for hiding this comment

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

Small change but looks solid

@akhenry
Copy link
Contributor

akhenry commented Oct 15, 2024

Tested this locally and it looks really good, very nice work. I noticed a very minor niggle that could be fixed in a followup. Invalid time bounds result in the submit button being disabled which is great. However an invalid combination of dates leaves the submit button enabled. If you try and click the enabled submit button it shows a validation error but for consistency it would be great if invalid date bounds also disabled the submit button, like invalid times do

eg.

minor.TC.bug.mov

@davetsay
Copy link
Contributor Author

Tested this locally and it looks really good, very nice work. I noticed a very minor niggle that could be fixed in a followup. Invalid time bounds result in the submit button being disabled which is great. However an invalid combination of dates leaves the submit button enabled. If you try and click the enabled submit button it shows a validation error but for consistency it would be great if invalid date bounds also disabled the submit button, like invalid times do

eg.

minor.TC.bug.mov

This is by design. The point is to not punish the user early. Give them a chance to input valid bounds, and if they don't, prevent them from submitting invalid bounds. This comes into play when changing both start and end bounds. The user almost always edits the start bounds first, and then is punished too early if say they are moving the start bounds and end bounds forward in time to a time window that is after the end bounds.

I think this is what the video is showing. If not, we can re-examine.

@davetsay davetsay added pr:e2e:couchdb npm run test:e2e:couchdb and removed pr:e2e:couchdb npm run test:e2e:couchdb labels Oct 16, 2024
@davetsay davetsay requested a review from akhenry October 16, 2024 18:02
@davetsay
Copy link
Contributor Author

@akhenry , @shefalijoshi , addressed your comments in this commit, 8d4d57d. ready for re-review

@akhenry
Copy link
Contributor

akhenry commented Oct 17, 2024

@davetsay Love it, the validation is subtle and brilliant. For all intents and purposes it's art.

@akhenry akhenry merged commit 7c2bb16 into master Oct 17, 2024
26 checks passed
@akhenry akhenry deleted the bugfix/7873-time-conductor-input-validation branch October 17, 2024 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:regression It used to work. Now it doesn't :( type:bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Time Conductor Fixed Time inputs are using "punish early" validation
3 participants