Change course create form to asynchronous validation. - #643
Conversation
There was a problem hiding this comment.
I understand why you removed this reference class, but is there a way we could keep the animation and de-couple it from the base .tip-error styling? My recommendation would be to have a class of is-showing (with the @extend .anim-fadeIn associated with it) and a class of is-hiding (@extend .anim-fadeOut associated similarly).
Would you mind adding the management of those two classes to your JS logic and trying it out to preserve the animation in the UI?
|
@peter-fogg, looks very good - nice logic and handling of all of the conditions. I did leave one in-line code comment about trying to keep the animating in/out of the error messages if possible. Let me know what you think. Other than that, 👍 |
There was a problem hiding this comment.
Personally, I'd move all these validate functions into addNewCourse so they are local variables instead of globally defined functions (they are only used within the scope of addNewCourse).
|
Found a bug--
|
|
Update https://edx-wiki.atlassian.net/wiki/display/STU/Course+Creation+BDD for any changes in behavior (make sure to capture the bug I found above). |
|
@talbs Made that change; error messages fade in/out now without stuttering on every keystroke. @cahrens I changed the feedback for a non-unique course just a bit, to make it consistent with the 80-character limit validation. Now the message shows up on top of the form, but individual fields aren't highlighted, and the error disappears once any edit is made. |
|
When I press Cancel and then "New Course" again (without refreshing the page), I am surprised to see that my previous field submissions (that I Canceled) are still there. I would expect the form to come up empty. Related to this, there's some strange behavior when the thing I canceled conflicted with an existing course:
In fact, I get the error message about a previous course conflicting even if the last error message I was viewing was about the total length being > 80 chars. Something funky is going on. |
|
@peter-fogg, thanks - the animation aspect of things look good. I appreciate the extra spin around designville. |
|
👍 Make sure the BDD (manual) script contains a case for Cancel (fields empty when you press "New Course" after a Cancel). |
Change course create form to asynchronous validation.
…lder-hash-2 Update custom.txt
…namese-translations Update Vietnamese static js i18n file
@cahrens @talbs, review?