Skip to content

Added confirmation dialog when skipping after entering text#3479

Merged
notmd merged 5 commits into
LAION-AI:mainfrom
MehrJonas:confirm-skipping
Jun 17, 2023
Merged

Added confirmation dialog when skipping after entering text#3479
notmd merged 5 commits into
LAION-AI:mainfrom
MehrJonas:confirm-skipping

Conversation

@MehrJonas

Copy link
Copy Markdown
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

Comment thread website/public/locales/en/common.json Outdated
"sign_in": "Sign In",
"sign_out": "Sign Out",
"skip": "Skip",
"skip_confirmation": "Are you sure you want to skip?",

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
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.

3 participants