Skip to content

Conversation

@Rtyujklop
Copy link
Contributor

@Rtyujklop Rtyujklop commented Dec 2, 2025

Changes in this PR

  • Added Confirmation modal
    • Made it in 'modal.css'
    • Enabled click off modal to trigger it.
    • Made x's for light and dark mode of confirmation modal
    • Added logic to detect whether a modal contains edited/unsaved data (“dirty state”).
    • Styled the confirmation modal to visually match the existing Semantic UI modals

atparsec and others added 27 commits September 10, 2025 10:28
@github-project-automation github-project-automation bot moved this to Needs Planning in Portal Development Dec 2, 2025
@Rtyujklop Rtyujklop requested a review from llf5185 December 3, 2025 20:10
Copy link

Choose a reason for hiding this comment

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

I noticed that ProjectViewerModal and SubmissionViewerModal have been updated to use the new ModalWrapper library. I think it would be best if the ActionModal is also updated to use this wrapper (for consistency's sake).

}

.custom-confirm-overlay {
z-index: 99999 !important;
Copy link

Choose a reason for hiding this comment

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

I would reconsider having such a high z-index. In the future, people might want to overlay over top this component (as unlikely as it may be) and would need a ridiculously high z-index for it.

top: 50% !important;
left: 50% !important;
transform: translate(-50%, -50%) !important;
z-index: 100000 !important;
Copy link

Choose a reason for hiding this comment

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

similar idea here regarding z-index, my guess is its even higher than the last since it needs to go on top of it.

Copy link

@llf5185 llf5185 left a comment

Choose a reason for hiding this comment

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

Additionally, the modal used in ProposalPage.js has not been updated to match this new standard for modals.

This was what I was able to find so far, but there are likely more issues with this pull request I overlooked.

Leaving a note here that react-confirm-alert must be installed in the ui folder when updating the server to include these new features.


/* Fix for sticky modals like ActionModal */
.ui.modal.sticky {
position: fixed !important;
Copy link

Choose a reason for hiding this comment

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

Be careful about using !important so frequently. If you need to use !important, justify its use with comments.

// const [due, setDue] = useState();
// const [late, setLate] = useState(false);
// const [day, setDay] = useState(0);
const { user } = useContext(UserContext);
Copy link

Choose a reason for hiding this comment

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

Naming this variable user when there is a property called user may be confusing.

Suggested change
const { user } = useContext(UserContext);
const { userContext } = useContext(UserContext);

)}
</div>
}
title={`Time Submission For ${props.user}`}
Copy link

Choose a reason for hiding this comment

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

The value passed from ProjectTIme.js to the IndividualTimeModal component for props.user is a JSX element, thus this text will render as:

Time Submission For [object Object]

<>
<Modal
closeOnDimmerClick={false}
closeOnEscape={false}
Copy link

Choose a reason for hiding this comment

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

To maximize the amount of page interaction that can be done with just the keyboard and for the sake of consistency, all modals should close on escape or have a comment stating why they shouldn't.

Copy link

Choose a reason for hiding this comment

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

The widths of the new modals are based on the amount of content, which causes their widths to be inconsistent with each other and leads to the strange formatting shown in the below image.
image
This example uses the single character 'a' in each required field and thus causes an unexpectedly thin modal.

Copy link

Choose a reason for hiding this comment

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

Confirming the creation of a sponsor note produces an unsaved changes warning.

The screenshot below shows the warning given after pressing submit on a sponsor note.
Screenshot 2025-12-09 144407

Below screenshot shows what happens after you press "Discard Changes".
image

Below screenshot shows what happens after pressing "Keep Editing". In this case, the sponsor note is still created, but after closing the success modal, the sponsor note editor is left open.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs Planning

Development

Successfully merging this pull request may close these issues.

6 participants