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

Added confirmation dialog when skipping after entering text #3479

Merged
merged 5 commits into from Jun 17, 2023

Conversation

MehrJonas
Copy link
Contributor

Adds a dialog asking the user to confirm whether they want to skip a question after they have already entered text to prevent accidentally losing an answer by clicking the wrong button as requested in #2778

@@ -48,6 +48,7 @@
"sign_in": "Sign In",
"sign_out": "Sign Out",
"skip": "Skip",
"skip_confirmation": "Are you sure you want to skip?",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you move this to task.json file?


const onClick = () => {
if (props.confirmSkip) {
showModal();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Also can you only show the modal when the input is not empty?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm already doing that... that's what the confirmSkip flag is for. I'm setting that to true if taskstatus.replyValidity === "VALID" (see TaskControls.tsx), which corresponds to a non-empty reply field.

Copy link
Collaborator

Choose a reason for hiding this comment

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

ah thanks

@MehrJonas MehrJonas requested a review from notmd June 17, 2023 09:25
@notmd notmd merged commit d1abbde into LAION-AI:main Jun 17, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants