forked from konveyor/tackle2-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 Convert assessment wizard to modal (konveyor#1486)
- https://issues.redhat.com/browse/MTA-1437 - https://issues.redhat.com/browse/MTA-1467 Resolves loading state for slow connections & moves the assessment wizard to a modal to simplify code & improve UX. This was approved by Justin from UXD. --------- Signed-off-by: ibolton336 <[email protected]>
- Loading branch information
1 parent
4624f4d
commit 6179d70
Showing
8 changed files
with
157 additions
and
214 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
36 changes: 36 additions & 0 deletions
36
client/src/app/pages/assessment/components/assessment-wizard/assessment-wizard-modal.tsx
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { Modal, ModalVariant } from "@patternfly/react-core"; | ||
import React, { FunctionComponent } from "react"; | ||
import { AssessmentWizard } from "./assessment-wizard"; | ||
import { Assessment } from "@app/api/models"; | ||
|
||
interface AssessmentModalProps { | ||
isOpen: boolean; | ||
onRequestClose: () => void; | ||
assessment: Assessment | null; | ||
} | ||
|
||
const AssessmentModal: FunctionComponent<AssessmentModalProps> = ({ | ||
isOpen, | ||
onRequestClose, | ||
assessment, | ||
}) => { | ||
return ( | ||
<> | ||
{isOpen && assessment && ( | ||
<Modal | ||
isOpen={isOpen} | ||
onClose={onRequestClose} | ||
showClose={false} | ||
aria-label="Application assessment wizard modal" | ||
hasNoBodyWrapper | ||
onEscapePress={onRequestClose} | ||
variant={ModalVariant.large} | ||
> | ||
<AssessmentWizard assessment={assessment} onClose={onRequestClose} /> | ||
</Modal> | ||
)} | ||
</> | ||
); | ||
}; | ||
|
||
export default AssessmentModal; |
Oops, something went wrong.