diff --git a/src/components/AppBar/UserGuideButton.tsx b/src/components/AppBar/UserGuideButton.tsx index 1e6cb45919..b77bfabb37 100644 --- a/src/components/AppBar/UserGuideButton.tsx +++ b/src/components/AppBar/UserGuideButton.tsx @@ -15,7 +15,7 @@ export default function UserGuideButton(): ReactElement { diff --git a/src/components/Login/Login.tsx b/src/components/Login/Login.tsx index f498f08f84..db975e3b84 100644 --- a/src/components/Login/Login.tsx +++ b/src/components/Login/Login.tsx @@ -161,7 +161,10 @@ export default function Login(): ReactElement { {/* User Guide, Sign Up, and Log In buttons */} - diff --git a/src/goals/MergeDuplicates/MergeDupsStep/MergeDragDrop/SidebarDrop.tsx b/src/goals/MergeDuplicates/MergeDupsStep/MergeDragDrop/SidebarDrop.tsx index c67a2ec81a..a2bc919650 100644 --- a/src/goals/MergeDuplicates/MergeDupsStep/MergeDragDrop/SidebarDrop.tsx +++ b/src/goals/MergeDuplicates/MergeDupsStep/MergeDragDrop/SidebarDrop.tsx @@ -1,5 +1,5 @@ -import { ArrowForwardIos } from "@mui/icons-material"; -import { IconButton, Typography } from "@mui/material"; +import { ArrowForwardIos, Help, HelpOutline } from "@mui/icons-material"; +import { Button, Grid, IconButton, Typography } from "@mui/material"; import { ReactElement } from "react"; import { Droppable } from "react-beautiful-dnd"; @@ -8,6 +8,7 @@ import { MergeTreeSense } from "goals/MergeDuplicates/MergeDupsTreeTypes"; import { setSidebar } from "goals/MergeDuplicates/Redux/MergeDupsActions"; import { StoreState } from "types"; import { useAppDispatch, useAppSelector } from "types/hooks"; +import { openUserGuide } from "utilities/pathUtilities"; export default function SidebarDrop(): ReactElement { const dispatch = useAppDispatch(); @@ -30,13 +31,21 @@ export default function SidebarDrop(): ReactElement { {...providedDroppable.droppableProps} style={{ backgroundColor: "lightblue", height: "100%", padding: 20 }} > - dispatch(setSidebar())} - id="sidebar-close" - size="large" - > - - + + dispatch(setSidebar())} + id="sidebar-close" + size="large" + > + + + + {vernacular} {sidebar.mergeSenses.map((ms: MergeTreeSense, i: number) => ( diff --git a/src/utilities/pathUtilities.ts b/src/utilities/pathUtilities.ts index 977e2d9d46..08a5856be6 100644 --- a/src/utilities/pathUtilities.ts +++ b/src/utilities/pathUtilities.ts @@ -22,10 +22,10 @@ function getWindowOrigin(): string { /** Open the user guide in a new tab. * Leads to a 404 in development. - */ -export function openUserGuide(): void { + * Optional `page` could be, e.g., "account.html#log-in". */ +export function openUserGuide(page = ""): void { const origin = getWindowOrigin(); - window.open(`${origin}/docs/`); + window.open(`${origin}/docs/${page}`); } /**