diff --git a/frontend/packages/core/src/AppLayout/user.tsx b/frontend/packages/core/src/AppLayout/user.tsx index 854710e9b0..1ffa0646a4 100644 --- a/frontend/packages/core/src/AppLayout/user.tsx +++ b/frontend/packages/core/src/AppLayout/user.tsx @@ -90,6 +90,8 @@ const AvatarListItemIcon = styled(ListItemIcon)({ const AvatarListItemText = styled(MuiListItemText)(({ theme }: { theme: Theme }) => ({ paddingLeft: "16px", margin: "0px", + wordBreak: "break-all", + textWrap: "wrap", ".MuiTypography-root": { color: alpha(theme.palette.secondary[900], 0.9), fontSize: "14px", diff --git a/frontend/packages/wizard/src/wizard.tsx b/frontend/packages/wizard/src/wizard.tsx index bf08dbeb31..21d65887e0 100644 --- a/frontend/packages/wizard/src/wizard.tsx +++ b/frontend/packages/wizard/src/wizard.tsx @@ -31,13 +31,21 @@ import type { WizardStepProps } from "./step"; interface WizardProps extends Pick, Pick { - children: React.ReactElement | React.ReactElement[]; + children: + | React.ReactNode + | React.ReactElement + | React.ReactElement[]; dataLayout: ManagerLayout; - heading?: string; + heading?: string | React.ReactElement; } export interface WizardChild { name: string; + showNPS?: boolean; + confirm?: { + startOver: boolean; + startOverText?: string; + }; } interface WizardChildren extends JSX.Element { @@ -145,10 +153,12 @@ const Wizard = ({ displayWarnings: (warnings: string[]) => { setGlobalWarnings(warnings); }, - onBack: (params: { toOrigin: boolean }) => { + onBack: ({ toOrigin, keepSearch = false }: { toOrigin: boolean; keepSearch?: boolean }) => { setGlobalWarnings([]); - setSearchParams({}); - if (params?.toOrigin && origin) { + if (!keepSearch) { + setSearchParams({}); + } + if (toOrigin && origin) { navigate(origin); } else { dispatch(WizardAction.BACK); @@ -166,6 +176,15 @@ const Wizard = ({ const steps = filteredChildren.map((child: WizardChildren) => { const isLoading = wizardStepData[child.type.name]?.isLoading || false; const hasError = wizardStepData[child.type.name]?.hasError; + const { + props: { + showNPS = true, + confirm = { + startOver: true, + startOverText: "Start Over", + }, + }, + } = child; return ( <> @@ -180,15 +199,17 @@ const Wizard = ({ {((state.activeStep === lastStepIndex && !isLoading) || hasError) && ( <> - - - - - - {(isMultistep || hasError) && ( + {showNPS && ( + + + + + + )} + {(isMultistep || hasError) && confirm.startOver && (