Repository navigation
Shreevaths: add confirmation modal - #5761
Open
shree-vaths wants to merge 1 commit into
Open
shree-vaths wants to merge 1 commit into
shree-vaths wants to merge 1 commit into
Conversation
✅ Deploy Preview for highestgoodnetwork-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
vidiyala99
approved these changes
Nov 3, 2026
vidiyala99
left a comment
Contributor
There was a problem hiding this comment.
Tested f2fcd7d on /jobformbuilder in light and dark mode at 1400 px, with the backend on development. My test account doesn't have Manage Job Forms, so I added manageJobForms to the logged-in user in the browser's Redux state only. Every write request was intercepted in the browser and answered with a mock 200, so nothing was deleted on dev.
Works as described:
- Confirmation (screenshot 1): clicking × on question 3 opens "Delete question?" and shows the question text ("Phone / WhatsApp"). No DELETE request is sent while the modal is open.
- Cancel and Escape: both close the modal, and all 15 questions stay in the same order. I used a real Escape key press, not a synthetic event.
- Confirm: "Delete question" removes only that question (15 to 14, and question 1 "Full Name" stays first). It sends exactly one
DELETE /api/jobforms/<id>/questions/2. - Double-click: I double-clicked "Delete question" with real mouse input. It still sent only one DELETE and removed only the selected question.
- Dark mode (screenshot 2): white text and a white × on
#1b2a41, readable. - Lint, tests and SonarCloud pass.
Non-blocking:
- #5763 conflicts with this PR. #5763 (same author) edits the same parts of
JobFormbuilder.jsx(the state block,deleteField, and the end of the JSX) and makes deletes local until Save Form. Whichever merges second needs a rebase. After #5763, the modal's "This change is saved immediately." would be wrong, and this PR's test that expectsaxios.deletewould fail. #5764 also rewritesdeleteField. - If the server DELETE fails, the question has already disappeared from the list and the only feedback is a
console.error. That's howdevelopmentbehaves too, but the new "saved immediately" text makes it more misleading.
Approving.
This was referenced Nov 3, 2026
This branch has not been deployed
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.



Description
https://docs.google.com/document/d/1zifX1otZPl-VJLQk0sZqZbQFginRytlQ2vKHeQAh_Lo/edit?tab=t.0#bookmark=id.pgmlhzb20e7t
Main changes explained:
How to test:
npm installand...to run this PR locallyScreenshots or videos of changes: