Skip to content

Commit

Permalink
docs(changeset): fix: hideMousetrail option resetting when focus is l…
Browse files Browse the repository at this point in the history
…ost.
  • Loading branch information
mayank1513 committed Jul 22, 2024
1 parent 52ac2c0 commit c3e35c4
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/selfish-boxes-speak.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"trello-kanban-task-board": patch
---

fix: hideMousetrail option resetting when focus is lost.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"build:all": "npm run build && npm run build:extension",
"test": "vitest run --coverage",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
"preview": "vite preview --port 3000",
"start": "npm run preview",
"build:extension": "tsc -p tsconfig.extension.json && node createPackageJSON.js",
"deploy": "npm run build:all && cd dist && vsce publish"
},
Expand Down
8 changes: 0 additions & 8 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import { GlobalContext } from "utils/context";
import { ToastContainer } from "react-toastify";
import "react-toastify/dist/ReactToastify.css";
import { ThemeSwitcher } from "nextjs-themes";
import { MouseTrail } from "react-webgl-trails";
import { Particles } from "webgl-generative-particles/react";

function App() {
const [state, _setState] = useState<BoardType>(defaultBoard);
Expand All @@ -26,12 +24,6 @@ function App() {
<ThemeSwitcher storage="localStorage" themeTransition="all .3s" />
<Board />
<ToastContainer position="bottom-right" />
{!state.hideTrails && (
<>
<MouseTrail />
<Particles fullScreenOverlay />
</>
)}
</GlobalContext.Provider>
);
}
Expand Down
9 changes: 9 additions & 0 deletions src/components/board.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import { useState } from "react";
import Drawer from "./drawer";
import { handleDragEnd } from "utils/drag";
import { ColorSwitch } from "nextjs-themes";
import { MouseTrail } from "react-webgl-trails";
import { Particles } from "webgl-generative-particles/react";

export default function Board() {
const { state, setState } = useGlobalState();
Expand All @@ -32,6 +34,13 @@ export default function Board() {
</main>
{state.scope === "Browser" && <BrowserOnlyUI />}
</div>

{!state.hideTrails && (
<>
<MouseTrail />
<Particles fullScreenOverlay />
</>
)}
</DragDropContext>
);
}
Expand Down
1 change: 1 addition & 0 deletions src/utils/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { nanoid } from "nanoid";
export const taskId = "task-" + nanoid();
export const defaultBoard: BoardType = {
scope: "",
hideTrails: true,
tasks: {
[taskId]: {
id: taskId,
Expand Down

0 comments on commit c3e35c4

Please sign in to comment.