From ad1a1429de42483a6e327a22b91eea362753e107 Mon Sep 17 00:00:00 2001 From: Andre Wanlin <67169551+awanlin@users.noreply.github.com> Date: Fri, 14 Apr 2023 11:36:03 -0500 Subject: [PATCH] Improvements to the scaffolder/next buttons UX Signed-off-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com> --- .changeset/rotten-chefs-jog.md | 10 +++ .../src/next/components/Stepper/Stepper.tsx | 3 +- .../src/next/OngoingTask/ContextMenu.tsx | 22 ++++++- .../src/next/OngoingTask/OngoingTask.test.tsx | 37 ++++++++++- .../src/next/OngoingTask/OngoingTask.tsx | 63 +++++++++++++++++-- 5 files changed, 125 insertions(+), 10 deletions(-) create mode 100644 .changeset/rotten-chefs-jog.md diff --git a/.changeset/rotten-chefs-jog.md b/.changeset/rotten-chefs-jog.md new file mode 100644 index 0000000000..120520c087 --- /dev/null +++ b/.changeset/rotten-chefs-jog.md @@ -0,0 +1,10 @@ +--- +'@backstage/plugin-scaffolder-react': patch +'@backstage/plugin-scaffolder': patch +--- + +Improvements to the `scaffolder/next` buttons UX: + +- Added padding around the "Create" button in the `Stepper` component +- Added a button bar that includes the "Cancel" and "Start Over" buttons to the `OngoingTask` component. The state of these buttons match their existing counter parts in the Context Menu +- Added a "Show Button Bar"/"Hide Button Bar" item to the `ContextMenu` component diff --git a/plugins/scaffolder-react/src/next/components/Stepper/Stepper.tsx b/plugins/scaffolder-react/src/next/components/Stepper/Stepper.tsx index 946cc583a3..55b5703ecf 100644 --- a/plugins/scaffolder-react/src/next/components/Stepper/Stepper.tsx +++ b/plugins/scaffolder-react/src/next/components/Stepper/Stepper.tsx @@ -49,11 +49,11 @@ const useStyles = makeStyles(theme => ({ backButton: { marginRight: theme.spacing(1), }, - footer: { display: 'flex', flexDirection: 'row', justifyContent: 'right', + padding: theme.spacing(2), }, formWrapper: { padding: theme.spacing(2), @@ -216,6 +216,7 @@ export const Stepper = (stepperProps: StepperProps) => { + + + + + + ) : null} + {logsVisible ? (