From 0e6921e25586c772bc1d2903d6a417f3948f2eda Mon Sep 17 00:00:00 2001 From: ikno-the-box-guy Date: Mon, 23 Mar 2026 21:23:49 +0100 Subject: [PATCH 1/7] Fixed line wrap on item cards in recipe modal --- .../editor/components/modals/RecipeModal.tsx | 6 +- .../components/modals/RecipeModal.tsx.css | 137 +----------------- 2 files changed, 11 insertions(+), 132 deletions(-) diff --git a/frontend/src/editor/components/modals/RecipeModal.tsx b/frontend/src/editor/components/modals/RecipeModal.tsx index e6cae6a..224618d 100644 --- a/frontend/src/editor/components/modals/RecipeModal.tsx +++ b/frontend/src/editor/components/modals/RecipeModal.tsx @@ -120,11 +120,11 @@ function RecipeModal({ show, onModalSubmit, RequiredInput, RequiredOutput }: Rec return ( -
- Items +
+ Items {!RequiredOutput && ( + onChange={handleSearch} className="form-control w-50"/> )}
diff --git a/frontend/src/editor/components/modals/RecipeModal.tsx.css b/frontend/src/editor/components/modals/RecipeModal.tsx.css index c83573d..1cf13f7 100644 --- a/frontend/src/editor/components/modals/RecipeModal.tsx.css +++ b/frontend/src/editor/components/modals/RecipeModal.tsx.css @@ -43,71 +43,21 @@ } .itemCard { - width: 120px; /* Smaller on mobile */ -} - -@media (min-width: 768px) { - .itemCard { - width: 140px; - } -} - -@media (min-width: 992px) { - .itemCard { - width: 160px; - } + width: 160px; } .recipeCard { max-height: 200px; - flex: 1 1 100%; /* Mobile: 1 card per row */ - min-width: 200px; -} - -/* Tablet: 2 cards per row */ -@media (min-width: 768px) { - .recipeCard { - flex: 1 1 calc(50% - 0.75rem); - max-width: calc(50% - 0.75rem); - } -} - -/* Desktop: 3 cards per row */ -@media (min-width: 992px) { - .recipeCard { - flex: 1 1 calc(33.333% - 0.75rem); - max-width: calc(33.333% - 0.75rem); - } -} - -/* Wide monitors: 4 cards per row */ -@media (min-width: 1400px) { - .recipeCard { - flex: 1 1 calc(25% - 0.75rem); - max-width: calc(25% - 0.75rem); - } } .recipeBigIcon{ - width: 36px; /* Smaller on mobile */ -} - -@media (min-width: 768px) { - .recipeBigIcon { - width: 42px; - } -} - -@media (min-width: 992px) { - .recipeBigIcon { - width: 48px; - } + width: 48px; } .recipeSmallIcon{ - width: 24px; - bottom: -12px; - left: -16px; + width: 30px; + bottom: -15px; + left: -20px; display: inline-block; position: relative; @@ -116,39 +66,9 @@ background: #212529; } -@media (min-width: 768px) { - .recipeSmallIcon { - width: 27px; - bottom: -14px; - left: -18px; - } -} - -@media (min-width: 992px) { - .recipeSmallIcon { - width: 30px; - bottom: -15px; - left: -20px; - } -} - .recipeTinyIcon{ - width: 20px; - margin-right: 3px; -} - -@media (min-width: 768px) { - .recipeTinyIcon { - width: 22px; - margin-right: 4px; - } -} - -@media (min-width: 992px) { - .recipeTinyIcon { - width: 25px; - margin-right: 5px; - } + width: 25px; + margin-right: 5px; } .recipeContainer { @@ -159,19 +79,7 @@ } .left-col{ - width: 60px; /* Smaller on mobile */ -} - -@media (min-width: 768px) { - .left-col { - width: 70px; - } -} - -@media (min-width: 992px) { - .left-col { - width: 80px; - } + width: 80px; } .selected-card { @@ -206,33 +114,4 @@ .recipe-dialog .modal-body { overflow-y: auto; /* scroll INSIDE modal */ -} - -/* Mobile font adjustments */ -.recipeCard .fs-8 { - font-size: 0.75rem; -} - -.recipeCard .fs-7 { - font-size: 0.85rem; -} - -@media (min-width: 768px) { - .recipeCard .fs-8 { - font-size: 0.8rem; - } - - .recipeCard .fs-7 { - font-size: 0.9rem; - } -} - -@media (min-width: 992px) { - .recipeCard .fs-8 { - font-size: 0.875rem; - } - - .recipeCard .fs-7 { - font-size: 1rem; - } } \ No newline at end of file From e77f80eec5d12a2653f9ff1f8512ac3ff8caaa85 Mon Sep 17 00:00:00 2001 From: ikno-the-box-guy Date: Mon, 23 Mar 2026 21:32:18 +0100 Subject: [PATCH 2/7] Fixed stripping computed fields on reactFlow setNodes --- frontend/src/editor/hooks/useNodeSpawner.ts | 2 +- frontend/src/editor/hooks/useYjsMutation.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/editor/hooks/useNodeSpawner.ts b/frontend/src/editor/hooks/useNodeSpawner.ts index 0bab732..f3da7e8 100644 --- a/frontend/src/editor/hooks/useNodeSpawner.ts +++ b/frontend/src/editor/hooks/useNodeSpawner.ts @@ -69,7 +69,7 @@ export function useNodeSpawner(ydocRef: React.RefObject) { doc.transact(() => { nodeMap.set(nodeId, stripComputedFields(newNode!)); - reactFlow.setNodes((nodes) => [...nodes, stripComputedFields(newNode!)]); + reactFlow.setNodes((nodes) => [...nodes, newNode!]); if (!pendingConnection) return; diff --git a/frontend/src/editor/hooks/useYjsMutation.ts b/frontend/src/editor/hooks/useYjsMutation.ts index 21c5b69..76d8a96 100644 --- a/frontend/src/editor/hooks/useYjsMutation.ts +++ b/frontend/src/editor/hooks/useYjsMutation.ts @@ -27,7 +27,7 @@ export function useYjsMutation() { if (node) { reactflow.setNodes((nds) => nds.map((n) => - n.id === nodeId ? stripComputedFields({ ...n, data: { ...n.data, ...patch } }) : n, + n.id === nodeId ? { ...n, data: { ...n.data, ...patch } } : n, ), ); From 51fcd4f7fd897daf848763f95e62eec9cae20674 Mon Sep 17 00:00:00 2001 From: Ikno Date: Tue, 31 Mar 2026 10:40:16 +0200 Subject: [PATCH 3/7] Added plausible --- backend/package.json | 1 + frontend/src/main.tsx | 7 +++++++ package-lock.json | 7 +++++++ 3 files changed, 15 insertions(+) diff --git a/backend/package.json b/backend/package.json index f0d16eb..25e9411 100644 --- a/backend/package.json +++ b/backend/package.json @@ -7,6 +7,7 @@ "type": "module", "private": true, "dependencies": { + "@plausible-analytics/tracker": "^0.4.4", "@types/cors": "^2.8.19", "@types/express": "^5.0.6", "@types/multer": "^2.0.0", diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx index 8d1f4a1..0bca06e 100644 --- a/frontend/src/main.tsx +++ b/frontend/src/main.tsx @@ -4,6 +4,13 @@ import './index.css' import {Auth0Wrapper} from "./auth/auth0.tsx"; import App from "./App.tsx"; import {ClientSettingsProvider} from "./context/ClientSettingsContext.tsx"; +import { init } from "@plausible-analytics/tracker"; + +// TODO: Move domain name to env +init({ + domain: 'ficsit-together.com', + fileDownloads: true, +}) createRoot(document.getElementById('root')!).render( diff --git a/package-lock.json b/package-lock.json index 04a7f7f..986131f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,6 +16,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { + "@plausible-analytics/tracker": "^0.4.4", "@types/cors": "^2.8.19", "@types/express": "^5.0.6", "@types/multer": "^2.0.0", @@ -1938,6 +1939,12 @@ "node": ">=10" } }, + "node_modules/@plausible-analytics/tracker": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/@plausible-analytics/tracker/-/tracker-0.4.4.tgz", + "integrity": "sha512-fz0NOYUEYXtg1TBaPEEvtcBq3FfmLFuTe1VZw4M8sTWX129br5dguu3M15+plOQnc181ShYe67RfwhKgK89VnA==", + "license": "MIT" + }, "node_modules/@popperjs/core": { "version": "2.11.8", "license": "MIT", From 01fe06707b86fad003240f427e8e855cccb9e5b2 Mon Sep 17 00:00:00 2001 From: Ikno Date: Tue, 31 Mar 2026 10:53:15 +0200 Subject: [PATCH 4/7] Added endpoint to plausible --- frontend/src/main.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx index 0bca06e..7d6b5aa 100644 --- a/frontend/src/main.tsx +++ b/frontend/src/main.tsx @@ -9,6 +9,7 @@ import { init } from "@plausible-analytics/tracker"; // TODO: Move domain name to env init({ domain: 'ficsit-together.com', + endpoint: 'https://plausible.ficsit-together.com', fileDownloads: true, }) From 361852fbac7ab5f7b32c1fae8c4dfb60bc0a58cd Mon Sep 17 00:00:00 2001 From: Ikno Date: Tue, 31 Mar 2026 11:00:31 +0200 Subject: [PATCH 5/7] Added endpoint to plausible --- frontend/src/main.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx index 7d6b5aa..504a116 100644 --- a/frontend/src/main.tsx +++ b/frontend/src/main.tsx @@ -9,7 +9,7 @@ import { init } from "@plausible-analytics/tracker"; // TODO: Move domain name to env init({ domain: 'ficsit-together.com', - endpoint: 'https://plausible.ficsit-together.com', + endpoint: 'https://plausible.ficsit-together.com/api/event', fileDownloads: true, }) From 2a088023f77827488b04e53d5dc340f3aa2963e3 Mon Sep 17 00:00:00 2001 From: Ikno Date: Tue, 31 Mar 2026 11:26:15 +0200 Subject: [PATCH 6/7] Moved plausible variables to env --- .github/workflows/deploy.yml | 4 +++- frontend/src/main.tsx | 12 +++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index dca4e7d..fa32ad0 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -46,4 +46,6 @@ jobs: VITE_WS_URL=${{ secrets.VITE_WS_URL }} VITE_AUTH0_DOMAIN=${{ secrets.VITE_AUTH0_DOMAIN }} VITE_AUTH0_CLIENT_ID=${{ secrets.VITE_AUTH0_CLIENT_ID }} - VITE_AUTH0_AUDIENCE=${{ secrets.VITE_AUTH0_AUDIENCE }} \ No newline at end of file + VITE_AUTH0_AUDIENCE=${{ secrets.VITE_AUTH0_AUDIENCE }} + VITE_PLAUSIBLE_DOMAIN=${{ secrets.VITE_PLAUSIBLE_DOMAIN }} + VITE_PLAUSIBLE_ENDPOINT=${{ secrets.VITE_PLAUSIBLE_ENDPOINT }} \ No newline at end of file diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx index 504a116..18875e5 100644 --- a/frontend/src/main.tsx +++ b/frontend/src/main.tsx @@ -7,11 +7,13 @@ import {ClientSettingsProvider} from "./context/ClientSettingsContext.tsx"; import { init } from "@plausible-analytics/tracker"; // TODO: Move domain name to env -init({ - domain: 'ficsit-together.com', - endpoint: 'https://plausible.ficsit-together.com/api/event', - fileDownloads: true, -}) +if (import.meta.env.VITE_PLAUSIBLE_DOMAIN && import.meta.env.VITE_PLAUSIBLE_ENDPOINT) { + init({ + domain: import.meta.env.VITE_PLAUSIBLE_DOMAIN, + endpoint: import.meta.env.VITE_PLAUSIBLE_ENDPOINT, + fileDownloads: true, + }) +} createRoot(document.getElementById('root')!).render( From 3801eff91d398abb10ec45427537ed3c8c9b7557 Mon Sep 17 00:00:00 2001 From: Ikno Date: Tue, 31 Mar 2026 11:55:28 +0200 Subject: [PATCH 7/7] Updated dockerfile to include plausible --- frontend/Dockerfile | 6 +++++- frontend/src/main.tsx | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/Dockerfile b/frontend/Dockerfile index e72a777..65ec12d 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -33,11 +33,15 @@ ARG VITE_WS_URL ARG VITE_AUTH0_DOMAIN ARG VITE_AUTH0_CLIENT_ID ARG VITE_AUTH0_AUDIENCE +ARG VITE_PLAUSIBLE_DOMAIN +ARG VITE_PLAUSIBLE_ENDPOINT ENV VITE_API_URL=$VITE_API_URL \ VITE_WS_URL=$VITE_WS_URL \ VITE_AUTH0_DOMAIN=$VITE_AUTH0_DOMAIN \ VITE_AUTH0_CLIENT_ID=$VITE_AUTH0_CLIENT_ID \ - VITE_AUTH0_AUDIENCE=$VITE_AUTH0_AUDIENCE + VITE_AUTH0_AUDIENCE=$VITE_AUTH0_AUDIENCE \ + VITE_PLAUSIBLE_DOMAIN=$VITE_PLAUSIBLE_DOMAIN \ + VITE_PLAUSIBLE_ENDPOINT=$VITE_PLAUSIBLE_ENDPOINT RUN npm run build --workspace frontend diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx index 18875e5..868a310 100644 --- a/frontend/src/main.tsx +++ b/frontend/src/main.tsx @@ -6,7 +6,6 @@ import App from "./App.tsx"; import {ClientSettingsProvider} from "./context/ClientSettingsContext.tsx"; import { init } from "@plausible-analytics/tracker"; -// TODO: Move domain name to env if (import.meta.env.VITE_PLAUSIBLE_DOMAIN && import.meta.env.VITE_PLAUSIBLE_ENDPOINT) { init({ domain: import.meta.env.VITE_PLAUSIBLE_DOMAIN,