diff --git a/client/src/App.tsx b/client/src/App.tsx index cb858a36..67af312b 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -3,7 +3,6 @@ import React, { ReactElement } from "react"; // Styling to be applied across the application import "./styles/styles.scss"; - import "@fontsource/roboto"; // Chakra provider component @@ -57,8 +56,8 @@ import ForgotPassword from "@pages/account/ForgotPassword"; import ResetPassword from "@pages/account/ResetPassword"; // Providers -import { WorkspaceProvider } from "./hooks/useWorkspace"; -import { FeaturesProvider } from "./hooks/useFeatures"; +import { WorkspaceProvider } from "@hooks/useWorkspace"; +import { FeaturesProvider } from "@hooks/useFeatures"; // Theme extension import { theme } from "./styles/theme"; diff --git a/client/src/components/Linky/index.tsx b/client/src/components/Linky/index.tsx index f74c5bda..831a84be 100644 --- a/client/src/components/Linky/index.tsx +++ b/client/src/components/Linky/index.tsx @@ -268,7 +268,7 @@ const Linky = (props: LinkyProps) => { rounded={"md"} overflow={"hidden"} cursor={"pointer"} - onClick={() => setShowNavigator(!showNavigator)} + onClick={onClickHandler} flexShrink={0} _hover={{ borderColor: "blue.300", @@ -311,7 +311,7 @@ const Linky = (props: LinkyProps) => { - + diff --git a/client/src/pages/view/Entity.tsx b/client/src/pages/view/Entity.tsx index 5f9df9ea..49b7d8c2 100644 --- a/client/src/pages/view/Entity.tsx +++ b/client/src/pages/view/Entity.tsx @@ -24,8 +24,8 @@ import { EmptyState, Timeline, Collapsible, - Spacer, Textarea, + Breadcrumb, } from "@chakra-ui/react"; import ActorTag from "@components/ActorTag"; import { Content } from "@components/Container"; @@ -1215,44 +1215,59 @@ const Entity = () => { )} - - - - - - {_.truncate(displayEntityData.name, { length: 30 })} - - - - - {displayEntityArchived && ( + {/* Breadcrumbs */} + + + + navigate("/")} + _hover={{ + cursor: "pointer", + textDecoration: "underline", + }} + > + Dashboard + + + navigate("/entities")} + _hover={{ + cursor: "pointer", + textDecoration: "underline", + }} + > + + Entities + + + + + + - - + + - Archived + {_.truncate(displayEntityData.name, { length: 30 })} + {displayEntityArchived && } - )} + {/* Buttons */} @@ -1974,8 +1989,6 @@ const Entity = () => { - - {/* Visibility */} { )} - - - - - {displayProjectData.name} - - - - {displayProjectArchived && ( + {/* Breadcrumbs */} + + + + navigate("/")} + _hover={{ + cursor: "pointer", + textDecoration: "underline", + }} + > + Dashboard + + + navigate("/projects")} + _hover={{ + cursor: "pointer", + textDecoration: "underline", + }} + > + + Projects + + + + + + - - + + - Archived + {_.truncate(displayProjectData.name, { length: 30 })} + {displayProjectArchived && } - )} + {/* Buttons */} diff --git a/client/src/pages/view/Template.tsx b/client/src/pages/view/Template.tsx index 68d2b79b..6556bcf3 100644 --- a/client/src/pages/view/Template.tsx +++ b/client/src/pages/view/Template.tsx @@ -3,6 +3,7 @@ import React, { useEffect, useMemo, useState } from "react"; // Existing and custom components import { + Breadcrumb, Button, CloseButton, Collapsible, @@ -555,41 +556,59 @@ const Template = () => { )} - - - - - {displayTemplateName} - - - - {displayTemplateArchived && ( + {/* Breadcrumbs */} + + + + navigate("/")} + _hover={{ + cursor: "pointer", + textDecoration: "underline", + }} + > + Dashboard + + + navigate("/templates")} + _hover={{ + cursor: "pointer", + textDecoration: "underline", + }} + > + + Templates + + + + + + - - + + - Archived + {_.truncate(displayTemplateName, { length: 30 })} + {displayTemplateArchived && } - )} + {/* Buttons */} diff --git a/client/test/components/Linky.test.tsx b/client/test/components/Linky.test.tsx index de48e33c..78c31ba3 100644 --- a/client/test/components/Linky.test.tsx +++ b/client/test/components/Linky.test.tsx @@ -171,20 +171,6 @@ describe("Linky Component", () => { }); describe("Navigation", () => { - it("opens hover card on click when data is loaded", async () => { - renderLinky(); - - await waitFor(() => { - expect(screen.getAllByText("Test Entity")[0]).toBeTruthy(); - }); - - fireEvent.click(screen.getAllByText("Test Entity")[0]); - - await waitFor(() => { - expect(screen.getByRole("button", { name: /view/i })).toBeTruthy(); - }); - }); - it("does not navigate when deleted", async () => { const deletedMock = { ...mockEntityQuery,