Skip to content

Commit 8089041

Browse files
committed
chore(frontend): remove mantine onboarding tour package and related code
1 parent f8744c6 commit 8089041

File tree

5 files changed

+24
-70
lines changed

5 files changed

+24
-70
lines changed

apps/frontend/app/lib/state/general.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import type { OnboardingTourStep } from "@gfazioli/mantine-onboarding-tour";
21
import { atom, useAtom } from "jotai";
32
import { atomWithStorage } from "jotai/utils";
43

@@ -14,7 +13,7 @@ export const tourSteps = [
1413
content:
1514
"Now, click on the movies section to start tracking your favorite movies.",
1615
},
17-
] as OnboardingTourStep[];
16+
];
1817

1918
const onboardingTourAtom = atom<boolean>(false);
2019

apps/frontend/app/root.tsx

+21-35
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
import "@gfazioli/mantine-onboarding-tour/styles.css";
21
import "@mantine/core/styles.css";
32
import "@mantine/code-highlight/styles.css";
43
import "@mantine/charts/styles.css";
54
import "@mantine/carousel/styles.css";
65
import "@mantine/dates/styles.css";
76
import "@mantine/notifications/styles.css";
87
import "mantine-datatable/styles.layer.css";
9-
import { OnboardingTour } from "@gfazioli/mantine-onboarding-tour";
108
import {
119
ActionIcon,
1210
Alert,
@@ -39,7 +37,6 @@ import {
3937
extendResponseHeaders,
4038
getToast,
4139
} from "~/lib/utilities.server";
42-
import { tourSteps, useOnboardingTour } from "./lib/state/general";
4340

4441
const theme = createTheme({
4542
fontFamily: "Poppins",
@@ -108,9 +105,6 @@ export const loader = async ({ request }: LoaderFunctionArgs) => {
108105
export default function App() {
109106
const navigation = useNavigation();
110107
const loaderData = useLoaderData<typeof loader>();
111-
const { isTourStarted, setIsTourStarted } = useOnboardingTour();
112-
113-
const stopTour = () => setIsTourStarted(false);
114108

115109
return (
116110
<html lang="en">
@@ -132,35 +126,27 @@ export default function App() {
132126
classNamesPrefix="mnt"
133127
forceColorScheme={loaderData.defaultColorScheme}
134128
>
135-
<OnboardingTour
136-
maw={400}
137-
tour={tourSteps}
138-
started={isTourStarted}
139-
onOnboardingTourEnd={stopTour}
140-
onOnboardingTourClose={stopTour}
141-
>
142-
<QueryClientProvider client={queryClient}>
143-
<ModalsProvider>
144-
{["loading", "submitting"].includes(navigation.state) ? (
145-
<Loader
146-
top={10}
147-
size="sm"
148-
right={10}
149-
pos="fixed"
150-
color="yellow"
151-
style={{ zIndex: 10 }}
152-
/>
153-
) : null}
154-
<Toaster toast={loaderData.toast} />
155-
<Flex style={{ flexGrow: 1 }} mih="100vh">
156-
<Outlet />
157-
</Flex>
158-
<ScrollRestoration />
159-
<Scripts />
160-
</ModalsProvider>
161-
<ReactQueryDevtools buttonPosition="top-right" />
162-
</QueryClientProvider>
163-
</OnboardingTour>
129+
<QueryClientProvider client={queryClient}>
130+
<ModalsProvider>
131+
{["loading", "submitting"].includes(navigation.state) ? (
132+
<Loader
133+
top={10}
134+
size="sm"
135+
right={10}
136+
pos="fixed"
137+
color="yellow"
138+
style={{ zIndex: 10 }}
139+
/>
140+
) : null}
141+
<Toaster toast={loaderData.toast} />
142+
<Flex style={{ flexGrow: 1 }} mih="100vh">
143+
<Outlet />
144+
</Flex>
145+
<ScrollRestoration />
146+
<Scripts />
147+
</ModalsProvider>
148+
<ReactQueryDevtools buttonPosition="top-right" />
149+
</QueryClientProvider>
164150
</MantineProvider>
165151
</body>
166152
</html>

apps/frontend/app/routes/_dashboard.tsx

+2-18
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { useAutoAnimate } from "@formkit/auto-animate/react";
2-
import { OnboardingTour } from "@gfazioli/mantine-onboarding-tour";
32
import {
43
ActionIcon,
54
Affix,
@@ -825,14 +824,13 @@ const LinksGroup = ({
825824
toggle,
826825
setOpened,
827826
icon: Icon,
828-
tourStepId,
829827
}: LinksGroupProps) => {
830828
const { dir } = useDirection();
831829

832830
const hasLinks = Array.isArray(links);
833831
const ChevronIcon = dir === "ltr" ? IconChevronRight : IconChevronLeft;
834832
const linkItems = (hasLinks ? links || [] : []).map((link) => {
835-
const component = (
833+
return (
836834
<NavLink
837835
to={link.link}
838836
key={link.label}
@@ -846,16 +844,9 @@ const LinksGroup = ({
846844
)}
847845
</NavLink>
848846
);
849-
if (link.tourStepId)
850-
return (
851-
<OnboardingTour.Target id={link.tourStepId}>
852-
{component}
853-
</OnboardingTour.Target>
854-
);
855-
return component;
856847
});
857848

858-
const component = (
849+
return (
859850
<Box>
860851
<UnstyledButton<typeof Link>
861852
className={classes.control}
@@ -895,13 +886,6 @@ const LinksGroup = ({
895886
{hasLinks ? <Collapse in={opened}>{linkItems}</Collapse> : null}
896887
</Box>
897888
);
898-
899-
if (tourStepId)
900-
return (
901-
<OnboardingTour.Target id={tourStepId}>{component}</OnboardingTour.Target>
902-
);
903-
904-
return component;
905889
};
906890

907891
const Footer = () => {

apps/frontend/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"@conform-to/react": "1.2.2",
1111
"@conform-to/zod": "1.2.2",
1212
"@formkit/auto-animate": "0.8.2",
13-
"@gfazioli/mantine-onboarding-tour": "1.0.0",
1413
"@hello-pangea/dnd": "18.0.1",
1514
"@lukemorales/query-key-factory": "1.3.4",
1615
"@mantine/carousel": "7.17.0",

yarn.lock

-14
Original file line numberDiff line numberDiff line change
@@ -3228,19 +3228,6 @@ __metadata:
32283228
languageName: node
32293229
linkType: hard
32303230

3231-
"@gfazioli/mantine-onboarding-tour@npm:1.0.0":
3232-
version: 1.0.0
3233-
resolution: "@gfazioli/mantine-onboarding-tour@npm:1.0.0"
3234-
peerDependencies:
3235-
"@mantine/core": ">=7.0.0"
3236-
"@mantine/hooks": ">=7.0.0"
3237-
"@tabler/icons-react": ^3.30.0
3238-
react: ^18.x || ^19.x
3239-
react-dom: ^18.x || ^19.x
3240-
checksum: 10/94cc1230d1bd0a906fbd1ac6c60f318f3d44d5dff0a7b3042882ff37d7dbf471588e19686454812efb2802a7a1ae20cadf5f98efad9ad6c031e602ee67cc1294
3241-
languageName: node
3242-
linkType: hard
3243-
32443231
"@graphql-codegen/add@npm:^5.0.3":
32453232
version: 5.0.3
32463233
resolution: "@graphql-codegen/add@npm:5.0.3"
@@ -5967,7 +5954,6 @@ __metadata:
59675954
"@conform-to/react": "npm:1.2.2"
59685955
"@conform-to/zod": "npm:1.2.2"
59695956
"@formkit/auto-animate": "npm:0.8.2"
5970-
"@gfazioli/mantine-onboarding-tour": "npm:1.0.0"
59715957
"@hello-pangea/dnd": "npm:18.0.1"
59725958
"@lukemorales/query-key-factory": "npm:1.3.4"
59735959
"@mantine/carousel": "npm:7.17.0"

0 commit comments

Comments
 (0)