Skip to content

Add highlighting what's undone in form#1167

Open
jaykim1213 wants to merge 10 commits intodevfrom
jk/highlightUndone
Open

Add highlighting what's undone in form#1167
jaykim1213 wants to merge 10 commits intodevfrom
jk/highlightUndone

Conversation

@jaykim1213
Copy link
Copy Markdown
Contributor

@jaykim1213 jaykim1213 commented Mar 25, 2026

Does this PR close any open issues?

Closes #937

Give a longer description of what this PR addresses and why it's needed

Add highlighting for unanswered items in a form

  • Use a highlighted background
  • Show a message for each unanswered question
  • Display the total number of unanswered questions

Provide pictures/videos of the behavior before and after these changes (optional)

Screenshot 2026-03-24 at 7 39 16 PM

Are there any additional TODOs before this PR is ready to go?

TODOs:

  • Update relevant documentation
  • ...

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 25, 2026

A preview of 350b179 is uploaded and can be seen here:

https://revisit.dev/study/PR1167

Changes may take a few minutes to propagate.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an “unanswered required questions” UX to response forms so participants can quickly see what still needs attention before proceeding.

Changes:

  • Introduces showUnanswered flow to display per-question prompts for required-but-empty responses and a total unanswered count message.
  • Adds visual highlighting for required unanswered responses in ResponseSwitcher.
  • Extends NextButton to notify the parent when Next is attempted while disabled (to trigger highlighting).

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/components/response/utils.ts Adds requiredAnswerIsEmpty and extends generateErrorMessage with showUnanswered support.
src/components/response/ResponseBlock.tsx Tracks showUnanswered, computes unanswered count, and shows a summary alert; wires onNextAttempted.
src/components/response/ResponseSwitcher.tsx Computes unanswered-required state and applies highlight styling; threads showUnanswered to inputs.
src/components/NextButton.tsx Adds onNextAttempted and changes click handling to allow “attempt” behavior when disabled.
src/components/response/*Input.tsx Passes showUnanswered through to generateErrorMessage / local required messaging.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/response/utils.ts Outdated
Comment thread src/components/response/utils.ts Outdated
Comment thread src/components/response/utils.ts
Comment thread src/components/NextButton.tsx Outdated
Comment thread src/components/NextButton.tsx Outdated
@jaykim1213 jaykim1213 marked this pull request as ready for review March 25, 2026 23:06
@jaykim1213 jaykim1213 linked an issue Mar 26, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Highlight whats left undone in a form

2 participants