Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

frontend: Adjust workflow layout whitespace #3155

Merged
merged 2 commits into from
Oct 23, 2024

Conversation

septum
Copy link
Contributor

@septum septum commented Oct 22, 2024

Description

  • Modified spacing from Breadcrumbs and WorkflowLayout to provide better whitespace defaults

Screenshots

Before

Screenshot 2024-10-22 at 1 29 56 p m

After

Screenshot 2024-10-22 at 1 29 18 p m

Testing Performed

Manual

@septum septum requested a review from a team as a code owner October 22, 2024 19:35
@septum septum changed the title frotnend: Adjust workflow layout whitespace frontend: Adjust workflow layout whitespace Oct 23, 2024
@@ -74,11 +81,11 @@ const WorkflowLayout = ({
children,
}: React.PropsWithChildren<LayoutProps>) => {
const location = useLocation();
const workflowPaths = workflow.routes.map(({ path }) => `/${workflow.path}/${path}`);
const workflowPaths = workflow?.routes.map(({ path }) => `/${workflow?.path}/${path}`);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It there is no workflow.path what would be rendered?, could it do with a fallback or other handling?

Copy link
Contributor Author

@septum septum Oct 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, because of workflow possibly being undefined.

I think I'm going to change the type signature to reflect that workflow (and the path property) are required.

@@ -74,11 +81,11 @@ const WorkflowLayout = ({
children,
}: React.PropsWithChildren<LayoutProps>) => {
const location = useLocation();
const workflowPaths = workflow.routes.map(({ path }) => `/${workflow.path}/${path}`);
const workflowPaths = workflow?.routes.map(({ path }) => `/${workflow?.path}/${path}`);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this in case of no workflow?.routes so workflowPaths is not left undefined

Suggested change
const workflowPaths = workflow?.routes.map(({ path }) => `/${workflow?.path}/${path}`);
const workflowPaths = workflow?.routes.map(({ path }) => `/${workflow?.path}/${path}`) || [];

@septum septum merged commit 5b7841c into main Oct 23, 2024
8 checks passed
@septum septum deleted the adjust-workflow-layout-whitespace branch October 23, 2024 18:04
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.

2 participants