-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[#10397] Add frontend validation for feedback submission #10398
[#10397] Add frontend validation for feedback submission #10398
Conversation
d555416
to
bf402dd
Compare
c5aa08b
to
5b82e10
Compare
src/web/app/pages-session/session-submission-page/session-submission-page.component.ts
Outdated
Show resolved
Hide resolved
...mponents/question-types/question-constraint/rank-recipients-question-constraint.component.ts
Outdated
Show resolved
Hide resolved
src/web/app/components/question-types/question-constraint/question-constraint.component.ts
Outdated
Show resolved
Hide resolved
src/web/app/components/question-types/question-constraint/question-constraint.component.ts
Outdated
Show resolved
Hide resolved
...mponents/question-types/question-constraint/rank-recipients-question-constraint.component.ts
Outdated
Show resolved
Hide resolved
...mponents/question-types/question-constraint/rank-recipients-question-constraint.component.ts
Outdated
Show resolved
Hide resolved
src/web/app/components/question-types/question-constraint/question-constraint.component.ts
Outdated
Show resolved
Hide resolved
...ents/question-types/question-constraint/constsum-recipients-question-constraint.component.ts
Outdated
Show resolved
Hide resolved
src/web/app/components/question-submission-form/question-submission-form.component.ts
Outdated
Show resolved
Hide resolved
@xpdavid The idea I had was that once a constraint component was initialised in a question component, it would emit an This design approach was my answer to "when should the constraint component emit the validity boolean?" because the constraint component doesn't have access to the parent question component's |
You can make I think we are also facing a new issue here: There are constraints targeted to a group of responses and also a single response.
|
Yes this is what I'm already doing, just that I'm using a single observable emit so the responsibility then becomes on the question component to poll the value whenever necessary, rather than the constraint component constantly emitting at some arbitrary benchmark.
|
You don't need use In addition, your end goal is to update
I think this is not closed for modification. I think we can ask ourselves, how many lines of code shall we change if we want the logic (e.g., disable the submission button or pop up the status message when any response is invalid) for single response also? |
When should the constraint component emit the value then? It doesn't have access to the parent
Okay noted on this, I will think it through and see how I can make this work for both grouped responses and individual responses |
src/web/app/components/question-submission-form/question-submission-form.component.ts
Outdated
Show resolved
Hide resolved
...mponents/question-types/question-constraint/rank-recipients-question-constraint.component.ts
Outdated
Show resolved
Hide resolved
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.
Almost there :)
src/web/app/components/question-submission-form/question-submission-form.component.ts
Outdated
Show resolved
Hide resolved
src/web/app/components/question-submission-form/question-submission-form.component.ts
Outdated
Show resolved
Hide resolved
src/web/app/components/question-submission-form/question-submission-form.component.ts
Outdated
Show resolved
Hide resolved
306e1c7
to
2e9ed3a
Compare
# Conflicts: # src/web/app/pages-session/session-submission-page/session-submission-page.component.ts
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.
💯
Fixes #10397