window unfocused modal#279
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
LOTaher
requested changes
Apr 8, 2026
| const { isConnected } = useHeartbeat(assessment.token ?? null); | ||
| const isWindowUnfocused = useWindowUnfocused(); | ||
| const [isUnfocusedModalOpen, setIsUnfocusedModalOpen] = useState(false); | ||
| const isExamActive = |
Collaborator
There was a problem hiding this comment.
can you add another condition making sure isConnected is true too? Don't want modals to overlap.
| > | ||
| <div className="space-y-3"> | ||
| <h2 | ||
| id="window-unfocused-title" |
Collaborator
There was a problem hiding this comment.
Any reason why there is an id for this header tag? We can just use tailwind styling?
| </h2> | ||
| <p className="text-sarge-gray-600 text-sm">The admin has been notified.</p> | ||
| </div> | ||
| <Button className="h-9 min-w-28 px-5" type="button" onClick={onAcknowledge}> |
Collaborator
There was a problem hiding this comment.
Is type="button" necessary here?
| return ( | ||
| <div className="fixed inset-0 z-50 flex items-center justify-center bg-white/25 p-4 backdrop-blur-md"> | ||
| <div | ||
| aria-labelledby="window-unfocused-title" |
Collaborator
There was a problem hiding this comment.
I don't think we need these aria fields and role properties on this div?
cherman23
pushed a commit
that referenced
this pull request
Apr 12, 2026
assessment outro update outro update intro make prettier [OA][Fullstack] - OA Websockets (#278) * progress * modal + handling skeleton and stateful code editor * prettier * update tokenschema name [OA][Fullstack] - OA Websockets - follow up (#278) window unfocused modal (#279) * window unfocused modal * PR fixes update button
cherman23
pushed a commit
that referenced
this pull request
Apr 12, 2026
assessment outro update outro update intro make prettier [OA][Fullstack] - OA Websockets (#278) * progress * modal + handling skeleton and stateful code editor * prettier * update tokenschema name [OA][Fullstack] - OA Websockets - follow up (#278) window unfocused modal (#279) * window unfocused modal * PR fixes update button
Anzhuo-W
added a commit
that referenced
this pull request
Apr 12, 2026
assessment outro update outro update intro make prettier [OA][Fullstack] - OA Websockets (#278) * progress * modal + handling skeleton and stateful code editor * prettier * update tokenschema name [OA][Fullstack] - OA Websockets - follow up (#278) window unfocused modal (#279) * window unfocused modal * PR fixes update button
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
window unfocused modal
Changes
WindowUnfocusedModal- modal that comes up when cheating is detected viauseWindowUnfocusedhookScreenshots
Checklist
Please go through all items before requesting reviewers:
Closes
Closes #272