-
Notifications
You must be signed in to change notification settings - Fork 807
EQM: Validation improvements #12281
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
EQM: Validation improvements #12281
Conversation
Build Artifacts
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all makes sense from a code perspective - I have not tested though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I adding a few admittedly nit-picky (and non-blocking) suggestions, but the validation improvements, which are the most critical thing, are working as expected. 🎉
@@ -63,6 +65,7 @@ export default function useQuizCreation() { | |||
* @throws {TypeError} if section is not a valid QuizSection | |||
**/ | |||
function updateSection({ section_id, ...updates }) { | |||
set(quizHasChanged, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it ever possible for updateSection
to be called when there are not actually any changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think probably the more likely case is for someone to change something, then change it back - in which case this would be set to true, and there not actually be any changes. I think that edge case is worth having for the sake of simplicity (rather than deep diff checking).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes - that makes sense!
@@ -53,6 +53,19 @@ | |||
|
|||
</KPageContainer> | |||
|
|||
<KModal | |||
v-if="goingTo" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is absolutely a nit but could you change this to something that makes it a bit clearer about what this is just from reading the variable name? i.e. a route object, a boolean, etc.
@@ -318,6 +317,9 @@ | |||
handleSubmitTitleFailure() { | |||
this.formIsSubmitted = false; | |||
this.showTitleError = true; | |||
this.$refs.titleField.focus(); | |||
// Scroll to the title field in case focus() didn't do that immediately | |||
this.$refs.titleField.$el.scrollIntoView({ behavior: 'smooth' }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
non-blocking: my only suggestion for here is that maybe we just scroll to the top of the page, since the app bar is covering the field with the default scroll behavior?
scroll-into-view.mp4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ty @nucleogenesis ! looks great
e1b86a6
to
934b947
Compare
this is reminder basically that we should always use displaySectionTitle -- could possibly be improved by making a computed activeSectionTitle computed property in usequizcreation?
934b947
to
9c36032
Compare
Summary
trim()
section_title all about so we're always testing "is this unique" correctlyI think that "fix the snackbars" can be done in a follow-up -- there is no change to strings, but just a need to use
displaySectionTitle
throughout.References
Closes #12262
Reviewer guidance