Skip to content

Conversation

@adamrefaey
Copy link
Collaborator

Change

This pull request introduces a new UploadModal component to the ReportDetailPage in the frontend application. The changes include integrating the modal into the page, managing its state, and updating the user flow for uploading new reports.

Integration of UploadModal:

  • Component Import: Added the UploadModal component import to the ReportDetailPage file. ([frontend/src/pages/Reports/ReportDetailPage.tsxR18](https://github.com/ModusCreateOrg/app-med-ai-gen/pull/139/files#diff-41d2e46246c1fcacef4f2cb888d10ce2e4087ed69ec7ab0bf5142ec5fe4c3364R18))
  • State Management: Introduced a new state variable isUploadModalOpen and a handler function handleUploadComplete to manage the modal's visibility and behavior after upload completion. ([frontend/src/pages/Reports/ReportDetailPage.tsxR40-R45](https://github.com/ModusCreateOrg/app-med-ai-gen/pull/139/files#diff-41d2e46246c1fcacef4f2cb888d10ce2e4087ed69ec7ab0bf5142ec5fe4c3364R40-R45))
  • User Flow Update: Replaced the navigation to the upload page with the opening of the UploadModal upon report deletion. ([frontend/src/pages/Reports/ReportDetailPage.tsxL125-R132](https://github.com/ModusCreateOrg/app-med-ai-gen/pull/139/files#diff-41d2e46246c1fcacef4f2cb888d10ce2e4087ed69ec7ab0bf5142ec5fe4c3364L125-R132))
  • Component Integration: Added the UploadModal component to the JSX structure, passing props for its visibility, close action, and upload completion handler. ([frontend/src/pages/Reports/ReportDetailPage.tsxR168-R173](https://github.com/ModusCreateOrg/app-med-ai-gen/pull/139/files#diff-41d2e46246c1fcacef4f2cb888d10ce2e4087ed69ec7ab0bf5142ec5fe4c3364R168-R173))

Does this PR introduce a breaking change?

{...}

What needs to be documented once your changes are merged?

{...}

Additional Comments

{...}

@adamrefaey adamrefaey requested review from GuidoBR and Copilot May 1, 2025 15:40
@adamrefaey adamrefaey self-assigned this May 1, 2025
Copy link
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

This PR introduces a new UploadModal component into the ReportDetailPage, improving the user flow for handling report uploads by replacing navigation to the upload page with an in-page modal.

  • Imported and integrated the UploadModal component.
  • Added state management for modal visibility and a unified handler to close the modal and navigate post-upload.
  • Updated the delete action flow to trigger the modal instead of navigating to a separate upload page.
Comments suppressed due to low confidence (2)

frontend/src/pages/Reports/ReportDetailPage.tsx:42

  • [nitpick] Evaluate whether 'handleUploadComplete' clearly reflects its dual role of closing the modal and navigating to a new page; a more descriptive name might improve code clarity.
const handleUploadComplete = () => {

frontend/src/pages/Reports/ReportDetailPage.tsx:132

  • [nitpick] The deletion flow now opens the UploadModal instead of navigating to a dedicated upload page; please confirm that this UX change aligns with design expectations to avoid user confusion.
setIsUploadModalOpen(true);

@GuidoBR GuidoBR merged commit 4da8112 into main May 1, 2025
1 check passed
@adamrefaey adamrefaey deleted the ADE-216 branch May 1, 2025 16:00
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.

3 participants