Skip to content

Commit c3e35c4

Browse files
committed
docs(changeset): fix: hideMousetrail option resetting when focus is lost.
1 parent 52ac2c0 commit c3e35c4

File tree

5 files changed

+17
-9
lines changed

5 files changed

+17
-9
lines changed

.changeset/selfish-boxes-speak.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"trello-kanban-task-board": patch
3+
---
4+
5+
fix: hideMousetrail option resetting when focus is lost.

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"build:all": "npm run build && npm run build:extension",
1010
"test": "vitest run --coverage",
1111
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
12-
"preview": "vite preview",
12+
"preview": "vite preview --port 3000",
13+
"start": "npm run preview",
1314
"build:extension": "tsc -p tsconfig.extension.json && node createPackageJSON.js",
1415
"deploy": "npm run build:all && cd dist && vsce publish"
1516
},

src/App.tsx

-8
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import { GlobalContext } from "utils/context";
77
import { ToastContainer } from "react-toastify";
88
import "react-toastify/dist/ReactToastify.css";
99
import { ThemeSwitcher } from "nextjs-themes";
10-
import { MouseTrail } from "react-webgl-trails";
11-
import { Particles } from "webgl-generative-particles/react";
1210

1311
function App() {
1412
const [state, _setState] = useState<BoardType>(defaultBoard);
@@ -26,12 +24,6 @@ function App() {
2624
<ThemeSwitcher storage="localStorage" themeTransition="all .3s" />
2725
<Board />
2826
<ToastContainer position="bottom-right" />
29-
{!state.hideTrails && (
30-
<>
31-
<MouseTrail />
32-
<Particles fullScreenOverlay />
33-
</>
34-
)}
3527
</GlobalContext.Provider>
3628
);
3729
}

src/components/board.tsx

+9
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import { useState } from "react";
99
import Drawer from "./drawer";
1010
import { handleDragEnd } from "utils/drag";
1111
import { ColorSwitch } from "nextjs-themes";
12+
import { MouseTrail } from "react-webgl-trails";
13+
import { Particles } from "webgl-generative-particles/react";
1214

1315
export default function Board() {
1416
const { state, setState } = useGlobalState();
@@ -32,6 +34,13 @@ export default function Board() {
3234
</main>
3335
{state.scope === "Browser" && <BrowserOnlyUI />}
3436
</div>
37+
38+
{!state.hideTrails && (
39+
<>
40+
<MouseTrail />
41+
<Particles fullScreenOverlay />
42+
</>
43+
)}
3544
</DragDropContext>
3645
);
3746
}

src/utils/data.ts

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { nanoid } from "nanoid";
44
export const taskId = "task-" + nanoid();
55
export const defaultBoard: BoardType = {
66
scope: "",
7+
hideTrails: true,
78
tasks: {
89
[taskId]: {
910
id: taskId,

0 commit comments

Comments
 (0)