Skip to content

Commit

Permalink
Merge pull request #5243 from flexion/10291-design-debt
Browse files Browse the repository at this point in the history
10291: Remove close link and cancel upload button from FileUploadProgressModal
  • Loading branch information
jimlerza authored Aug 14, 2024
2 parents 98ddfa1 + fe4df9a commit db7b3bb
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 64 deletions.
18 changes: 0 additions & 18 deletions web-client/src/presenter/actions/cancelUploadsAction.test.ts

This file was deleted.

7 changes: 0 additions & 7 deletions web-client/src/presenter/actions/cancelUploadsAction.ts

This file was deleted.

4 changes: 0 additions & 4 deletions web-client/src/presenter/computeds/fileUploadStatusHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ export const fileUploadStatusHelper = (get: Get): any => {
);
const shouldThrottle = !get(state.fileUploadProgress.noThrottle); // results WILL be throttled unless explicitly set to false

const isCancelable = !!(
Number.isFinite(timeRemaining) && percentComplete < 100
);
let statusMessage;

if (percentComplete === 100) {
Expand All @@ -39,7 +36,6 @@ export const fileUploadStatusHelper = (get: Get): any => {
}

return {
isCancelable,
isHavingSystemIssues,
statusMessage: shouldThrottle
? throttledStatus(statusMessage)
Expand Down
2 changes: 0 additions & 2 deletions web-client/src/presenter/presenter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ import { canEditContactInformationSequence } from './sequences/canEditContactInf
import { cancelAddDraftDocumentSequence } from './sequences/cancelAddDraftDocumentSequence';
import { cancelAddStatisticSequence } from './sequences/cancelAddStatisticSequence';
import { cancelAndNavigateToCorrespondenceSequence } from './sequences/cancelAndNavigateToCorrespondenceSequence';
import { cancelFileUploadSequence } from './sequences/cancelFileUploadSequence';
import { cancelRemovePetitionerSequence } from './sequences/cancelRemovePetitionerSequence';
import { caseDetailPrimaryTabChangeSequence } from './sequences/caseDetailPrimaryTabChangeSequence';
import { caseInventoryReportLoadMoreSequence } from './sequences/caseInventoryReportLoadMoreSequence';
Expand Down Expand Up @@ -663,7 +662,6 @@ export const presenterSequences = {
cancelAddStatisticSequence: cancelAddStatisticSequence as unknown as Function,
cancelAndNavigateToCorrespondenceSequence:
cancelAndNavigateToCorrespondenceSequence as unknown as Function,
cancelFileUploadSequence: cancelFileUploadSequence as unknown as Function,
cancelRemovePetitionerSequence:
cancelRemovePetitionerSequence as unknown as Function,
caseDetailPrimaryTabChangeSequence:
Expand Down

This file was deleted.

2 changes: 0 additions & 2 deletions web-client/src/views/DocketEntryQc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { CreateMessageModalDialog } from './Messages/CreateMessageModalDialog';
import { DocumentDisplayIframe } from './DocumentDisplayIframe';
import { ErrorNotification } from './ErrorNotification';
import { FileUploadErrorModal } from './FileUploadErrorModal';
import { FileUploadStatusModal } from './FileUploadStatusModal';
import { FormCancelModalDialog } from './FormCancelModalDialog';
import { Hint } from '../ustc-ui/Hint/Hint';
import { PrimaryDocumentForm } from './EditDocketEntry/PrimaryDocumentForm';
Expand Down Expand Up @@ -125,7 +124,6 @@ export const DocketEntryQc = connect(
onConfirmSequence={completeDocketEntryQCAndSendMessageSequence}
/>
)}
{showModal === 'FileUploadStatusModal' && <FileUploadStatusModal />}
{showModal === 'FileUploadErrorModal' && (
<FileUploadErrorModal
confirmSequence={completeDocketEntryQCSequence}
Expand Down
28 changes: 6 additions & 22 deletions web-client/src/views/FileUploadStatusModal.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
import { Button } from '../ustc-ui/Button/Button';
import { Focus } from '../ustc-ui/Focus/Focus';
import { ModalDialog } from './ModalDialog';
import { ProgressBar } from '../ustc-ui/ProgressBar/ProgressBar';
import { connect } from '@web-client/presenter/shared.cerebral';
import { sequences } from '@web-client/presenter/app.cerebral';
import { state } from '@web-client/presenter/app.cerebral';
import React from 'react';

export const FileUploadStatusModal = connect(
{
cancelUploadSequence: sequences.cancelFileUploadSequence,
helper: state.fileUploadStatusHelper,
percentComplete: state.fileUploadProgress.percentComplete,
},
function FileUploadStatusModal({
cancelUploadSequence,
helper,
percentComplete,
}) {
function FileUploadStatusModal({ helper, percentComplete }) {
return (
<ModalDialog className="file-upload-status-modal" showButtons={false}>
<ModalDialog
className="file-upload-status-modal"
closeLink={false}
showButtons={false}
>
<Focus>
<ProgressBar
aria-labelledby="progress-description"
Expand All @@ -42,19 +39,6 @@ export const FileUploadStatusModal = connect(
/>
</div>
{helper.isHavingSystemIssues && <div>Still processing...</div>}
{helper.isCancelable && (
<div className="cancel">
<Button
link
onClick={e => {
e.stopPropagation();
cancelUploadSequence();
}}
>
Cancel Upload
</Button>
</div>
)}
</div>
</ModalDialog>
);
Expand Down

0 comments on commit db7b3bb

Please sign in to comment.