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

👻 Remove shared app filter and unused menuActions #1402

Merged
merged 4 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 0 additions & 42 deletions client/src/app/components/MenuActions.tsx

This file was deleted.

8 changes: 0 additions & 8 deletions client/src/app/components/PageHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@ import {
Text,
} from "@patternfly/react-core";
import { BreadCrumbPath } from "./BreadCrumbPath";
import { MenuActions } from "./MenuActions";
import { HorizontalNav } from "./HorizontalNav";

export interface PageHeaderProps {
title: string;
description?: React.ReactNode;
breadcrumbs: { title: string; path: string | (() => void) }[];
btnActions?: React.ReactNode;
menuActions: { label: string; callback: () => void }[];
navItems?: { title: string; path: string }[];
}

Expand All @@ -25,7 +23,6 @@ export const PageHeader: React.FC<PageHeaderProps> = ({
description,
breadcrumbs,
btnActions,
menuActions,
navItems,
}) => {
return (
Expand All @@ -42,11 +39,6 @@ export const PageHeader: React.FC<PageHeaderProps> = ({
</TextContent>
</SplitItem>
{btnActions && <SplitItem>{btnActions}</SplitItem>}
{menuActions.length > 0 && (
<SplitItem>
<MenuActions actions={menuActions} />
</SplitItem>
)}
</Split>
</StackItem>
{navItems && (
Expand Down
45 changes: 0 additions & 45 deletions client/src/app/components/tests/MenuActions.test.tsx

This file was deleted.

10 changes: 0 additions & 10 deletions client/src/app/components/tests/PageHeader.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,6 @@ describe("PageHeader", () => {
},
]}
btnActions={<Button>send email</Button>}
menuActions={[
{
label: "Edit",
callback: jest.fn(),
},
{
label: "Delete",
callback: jest.fn(),
},
]}
navItems={[
{
title: "Overview",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -94,42 +94,6 @@ exports[`PageHeader Renders without crashing 1`] = `
send email
</button>
</div>
<div
class="pf-v5-l-split__item"
>
<button
aria-expanded="false"
class="pf-v5-c-menu-toggle"
type="button"
>
<span
class="pf-v5-c-menu-toggle__text"
>
Actions
</span>
<span
class="pf-v5-c-menu-toggle__controls"
>
<span
class="pf-v5-c-menu-toggle__toggle-icon"
>
<svg
aria-hidden="true"
class="pf-v5-svg"
fill="currentColor"
height="1em"
role="img"
viewBox="0 0 320 512"
width="1em"
>
<path
d="M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
</div>
<div
Expand Down Expand Up @@ -291,42 +255,6 @@ exports[`PageHeader Renders without crashing 1`] = `
send email
</button>
</div>
<div
class="pf-v5-l-split__item"
>
<button
aria-expanded="false"
class="pf-v5-c-menu-toggle"
type="button"
>
<span
class="pf-v5-c-menu-toggle__text"
>
Actions
</span>
<span
class="pf-v5-c-menu-toggle__controls"
>
<span
class="pf-v5-c-menu-toggle__toggle-icon"
>
<svg
aria-hidden="true"
class="pf-v5-svg"
fill="currentColor"
height="1em"
role="img"
viewBox="0 0 320 512"
width="1em"
>
<path
d="M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
</div>
<div
Expand Down
Loading
Loading