Skip to content

Commit

Permalink
👻 Remove shared app filter and unused menuActions (#1402)
Browse files Browse the repository at this point in the history
- Removes some old code I noticed after the dropdown update & analysis
table PRs were merged
- Menu actions are no longer used in the page header component and have
been moved to the toolbar
- Removes old shared app filter hook that is no longer in use

Signed-off-by: ibolton336 <[email protected]>
  • Loading branch information
ibolton336 authored Sep 27, 2023
1 parent 9cf7840 commit e269b74
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 535 deletions.
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

0 comments on commit e269b74

Please sign in to comment.