From 7be57a56580c17c46fd4220318d7b9c9ab13442a Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Sat, 4 Jan 2025 15:24:40 +0000 Subject: [PATCH 01/21] init gallery component --- package-lock.json | 21 +++++++++++++---- package.json | 3 ++- .../Profile/Subcomponents/GalleryView.tsx | 23 +++++++++++++++++++ 3 files changed, 42 insertions(+), 5 deletions(-) create mode 100644 src/Components/Profile/Subcomponents/GalleryView.tsx diff --git a/package-lock.json b/package-lock.json index eeeffbbc..aed2d654 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,7 +27,8 @@ "react-toastify": "^9.1.3", "remark-breaks": "^4.0.0", "tributejs": "^5.1.3", - "tw-elements": "^1.0.0" + "tw-elements": "^1.0.0", + "yet-another-react-lightbox": "^3.21.7" }, "devDependencies": { "@eslint-community/eslint-plugin-eslint-comments": "^4.4.1", @@ -1170,9 +1171,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001617", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001617.tgz", - "integrity": "sha512-mLyjzNI9I+Pix8zwcrpxEbGlfqOkF9kM3ptzmKNw5tizSyYwMe+nGLTqMK9cO+0E+Bh6TsBxNAaHWEM8xwSsmA==", + "version": "1.0.30001686", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001686.tgz", + "integrity": "sha512-Y7deg0Aergpa24M3qLC5xjNklnKnhsmSyR/V89dLZ1n0ucJIFNs7PgR2Yfa/Zf6W79SbBicgtGxZr2juHkEUIA==", "dev": true, "funding": [ { @@ -7531,6 +7532,18 @@ "node": ">= 14" } }, + "node_modules/yet-another-react-lightbox": { + "version": "3.21.7", + "resolved": "https://registry.npmjs.org/yet-another-react-lightbox/-/yet-another-react-lightbox-3.21.7.tgz", + "integrity": "sha512-dcdokNuCIl92f0Vl+uzeKULnQhztIGpoZFUMvtVNUPmtwsQWpqWufeieDPeg9JtFyVCcbj4vYw3V00DS0QNoWA==", + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "react": ">=16.8.0", + "react-dom": ">=16.8.0" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/package.json b/package.json index 2a350d55..1af11483 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,8 @@ "react-toastify": "^9.1.3", "remark-breaks": "^4.0.0", "tributejs": "^5.1.3", - "tw-elements": "^1.0.0" + "tw-elements": "^1.0.0", + "yet-another-react-lightbox": "^3.21.7" }, "imports": { "#components/*": "./src/Components/*", diff --git a/src/Components/Profile/Subcomponents/GalleryView.tsx b/src/Components/Profile/Subcomponents/GalleryView.tsx new file mode 100644 index 00000000..81888c89 --- /dev/null +++ b/src/Components/Profile/Subcomponents/GalleryView.tsx @@ -0,0 +1,23 @@ +import { useState } from 'react' +import Lightbox from 'yet-another-react-lightbox/*' + +import type { Item } from '#types/Item' + +export const GalleryView = ({ item }: { item: Item }) => { + const [open, setOpen] = useState(false) + // eslint-disable-next-line no-console + console.log(item) + return ( + <> + + + setOpen(false)} + slides={[{ src: '/image1.jpg' }, { src: '/image2.jpg' }, { src: '/image3.jpg' }]} + /> + + ) +} From bb2025456adebbefc2b2216f428644590c1bfbe2 Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Tue, 7 Jan 2025 12:53:59 +0000 Subject: [PATCH 02/21] fixed vulnerability --- package-lock.json | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index aed2d654..7d6fb594 100644 --- a/package-lock.json +++ b/package-lock.json @@ -406,11 +406,10 @@ } }, "node_modules/@types/geojson": { - "version": "7946.0.14", - "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.14.tgz", - "integrity": "sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg==", - "dev": true, - "license": "MIT" + "version": "7946.0.15", + "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.15.tgz", + "integrity": "sha512-9oSxFzDCT2Rj6DfcHF8G++jxBKS7mBqXl5xrRW+Kbvjry6Uduya2iiwqHPhVXpasAVMBYKkEPGgKhd3+/HZ6xA==", + "dev": true }, "node_modules/@types/hast": { "version": "3.0.3", @@ -4788,9 +4787,9 @@ } }, "node_modules/nanoid": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", - "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", "funding": [ { "type": "github", From 5ffe44de2ccf7519876d3c07194602b8532d0dc8 Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Wed, 8 Jan 2025 00:31:58 +0000 Subject: [PATCH 03/21] implemented gallery widget --- package-lock.json | 18 ++++++++ package.json | 1 + src/Components/AppShell/NavBar.tsx | 2 +- .../Profile/Subcomponents/GalleryView.tsx | 46 +++++++++++++------ src/Components/Profile/Templates/FlexView.tsx | 2 + 5 files changed, 54 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index 18d24220..13388b1e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,6 +22,7 @@ "react-leaflet": "^4.2.1", "react-leaflet-cluster": "^2.1.0", "react-markdown": "^9.0.1", + "react-photo-album": "^3.0.2", "react-router-dom": "^6.16.0", "react-string-replace": "^1.1.1", "react-toastify": "^9.1.3", @@ -6043,6 +6044,23 @@ "react": ">=18" } }, + "node_modules/react-photo-album": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/react-photo-album/-/react-photo-album-3.0.2.tgz", + "integrity": "sha512-w3+8i6aj9l1jRfcubgVbAlBGSdtiXcqWdcwZcH4/Bavc+v7X7h+S3TkQ723pvDABjhaaxS168g9ECEBP6xnKrQ==", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/react": ">=18", + "react": ">=18" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/react-router": { "version": "6.16.0", "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.16.0.tgz", diff --git a/package.json b/package.json index ed9294b7..948a9548 100644 --- a/package.json +++ b/package.json @@ -68,6 +68,7 @@ "react-leaflet": "^4.2.1", "react-leaflet-cluster": "^2.1.0", "react-markdown": "^9.0.1", + "react-photo-album": "^3.0.2", "react-router-dom": "^6.16.0", "react-string-replace": "^1.1.1", "react-toastify": "^9.1.3", diff --git a/src/Components/AppShell/NavBar.tsx b/src/Components/AppShell/NavBar.tsx index 0e627c1f..08971877 100644 --- a/src/Components/AppShell/NavBar.tsx +++ b/src/Components/AppShell/NavBar.tsx @@ -62,7 +62,7 @@ export default function NavBar({ appName, userType }: { appName: string; userTyp if (showNav) { return ( <> -
+
- - setOpen(false)} - slides={[{ src: '/image1.jpg' }, { src: '/image2.jpg' }, { src: '/image3.jpg' }]} +
+ setIndex(current)} /> - + + = 0} close={() => setIndex(-1)} /> +
) } diff --git a/src/Components/Profile/Templates/FlexView.tsx b/src/Components/Profile/Templates/FlexView.tsx index 1dea72d6..608b0fdf 100644 --- a/src/Components/Profile/Templates/FlexView.tsx +++ b/src/Components/Profile/Templates/FlexView.tsx @@ -3,6 +3,7 @@ /* eslint-disable @typescript-eslint/no-unsafe-call */ import { ContactInfoView } from '#components/Profile/Subcomponents/ContactInfoView' +import { GalleryView } from '#components/Profile/Subcomponents/GalleryView' import { GroupSubHeaderView } from '#components/Profile/Subcomponents/GroupSubHeaderView' import { ProfileStartEndView } from '#components/Profile/Subcomponents/ProfileStartEndView' import { ProfileTextView } from '#components/Profile/Subcomponents/ProfileTextView' @@ -14,6 +15,7 @@ const componentMap = { texts: ProfileTextView, contactInfos: ContactInfoView, startEnd: ProfileStartEndView, + gallery: GalleryView, // weitere Komponenten hier } From 6501ef40084b9c81704169671bcda5a2972b3922 Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Wed, 8 Jan 2025 00:32:03 +0000 Subject: [PATCH 04/21] 3.0.35 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 13388b1e..ce032247 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "utopia-ui", - "version": "3.0.34", + "version": "3.0.35", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "utopia-ui", - "version": "3.0.34", + "version": "3.0.35", "license": "GPL-3.0-only", "dependencies": { "@heroicons/react": "^2.0.17", diff --git a/package.json b/package.json index 948a9548..8feee9aa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "utopia-ui", - "version": "3.0.34", + "version": "3.0.35", "description": "Reuseable React Components to build mapping apps for real life communities and networks", "repository": "https://github.com/utopia-os/utopia-ui", "homepage:": "https://utopia-os.org/", From 9f409e36f40a995bc6715dee004664e281afeb20 Mon Sep 17 00:00:00 2001 From: antontranelis <31516529+antontranelis@users.noreply.github.com> Date: Thu, 30 Jan 2025 15:18:25 +0000 Subject: [PATCH 05/21] Update test.build.yml --- .github/workflows/test.build.yml | 37 ++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.build.yml b/.github/workflows/test.build.yml index bbf8422c..810765fa 100644 --- a/.github/workflows/test.build.yml +++ b/.github/workflows/test.build.yml @@ -28,6 +28,39 @@ jobs: - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.0.3 with: node-version-file: './.tool-versions' - - name: Build - run: npm install && npm run build + - name: Install Dependencies & Build Library + run: | + npm install + npm run build + npm link working-directory: ./ + + test-examples: + if: needs.files-changed.outputs.build == 'true' + name: Test Example Apps + needs: build + runs-on: ubuntu-latest + strategy: + matrix: + app: [examples/1-basic-map, examples/2-static-layers] # Aktualisierte Pfade der Beispiel-Apps + + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Set Up Node.js + uses: actions/setup-node@v3 + with: + node-version: 18 + + - name: Link Utopia-UI in Example App + run: | + cd ${{ matrix.app }} + npm install + npm link utopia-ui + npm run build + + - name: Run Tests + run: | + cd ${{ matrix.app }} + npm test From 4a685c001ed42e474688bace66e9ea62c560550b Mon Sep 17 00:00:00 2001 From: antontranelis <31516529+antontranelis@users.noreply.github.com> Date: Thu, 30 Jan 2025 15:26:56 +0000 Subject: [PATCH 06/21] Update test.build.yml --- .github/workflows/test.build.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/test.build.yml b/.github/workflows/test.build.yml index 810765fa..90622d6a 100644 --- a/.github/workflows/test.build.yml +++ b/.github/workflows/test.build.yml @@ -35,7 +35,7 @@ jobs: npm link working-directory: ./ - test-examples: + build-examples: if: needs.files-changed.outputs.build == 'true' name: Test Example Apps needs: build @@ -59,8 +59,3 @@ jobs: npm install npm link utopia-ui npm run build - - - name: Run Tests - run: | - cd ${{ matrix.app }} - npm test From b9991d6041426552a7a8b550f15ad0c94877859e Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Fri, 31 Jan 2025 07:58:30 +0100 Subject: [PATCH 07/21] lint examples have a workflow for each example to lint according to local lint rules --- .github/workflows/test.lint.examples.yml | 75 ++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 .github/workflows/test.lint.examples.yml diff --git a/.github/workflows/test.lint.examples.yml b/.github/workflows/test.lint.examples.yml new file mode 100644 index 00000000..4583bb77 --- /dev/null +++ b/.github/workflows/test.lint.examples.yml @@ -0,0 +1,75 @@ +name: test:lint + +on: push + +jobs: + files-changed: + name: Detect File Changes - lint + runs-on: ubuntu-latest + outputs: + lint: ${{ steps.filter.outputs.lint }} + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.1.7 + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + id: filter + with: + filters: | + lint: + - '.github/workflows/**/*' + - '**/*' + +# build: +# if: needs.files-changed.outputs.frontend == 'true' +# name: Build - Frontend +# needs: files-changed +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.1.7 +# - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.0.3 +# with: +# node-version-file: './.tool-versions' +# - name: Frontend | Build +# run: npm install && npm run build +# working-directory: ./frontend + + lint-example-1-basic-map: + if: needs.files-changed.outputs.lint == 'true' + name: Lint Example 1 - Basic Map + needs: files-changed + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.1.7 + - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.0.3 + with: + node-version-file: './.tool-versions' + - name: Lint + run: npm install && npm run lint + working-directory: ./examples/1-basic-map + + lint-example-2-static-layers: + if: needs.files-changed.outputs.lint == 'true' + name: Lint Example 2 - Static Layers + needs: files-changed + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.1.7 + - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.0.3 + with: + node-version-file: './.tool-versions' + - name: Lint + run: npm install && npm run lint + working-directory: ./examples/2-static-layers + +# unit: +# if: needs.files-changed.outputs.frontend == 'true' +# name: Unit - Frontend +# needs: files-changed +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.1.7 +# - uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.0.3 +# with: +# node-version-file: './.tool-versions' +# - name: Frontend | Unit +# run: npm install && npm run test:unit +# working-directory: ./frontend From 4d4b0049743f0042029d770bda9ebed9ebe2aa11 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Fri, 31 Jan 2025 08:12:29 +0100 Subject: [PATCH 08/21] implement update command for package updates --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index dbf275f5..caea2868 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "scripts": { "build": "rollup -c", "start": "rollup -c -w", - "test:lint:eslint": "eslint --ext .ts,.tsx,.js,.jsx,.cjs,.mjs,.json,.yml,.yaml --max-warnings 0 ." + "test:lint:eslint": "eslint --ext .ts,.tsx,.js,.jsx,.cjs,.mjs,.json,.yml,.yaml --max-warnings 0 .", + "update": "npx npm-check-updates" }, "files": [ "dist" From aaf1dfd31e31ba9e54b4e6bf20e6791db7a9de93 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Fri, 31 Jan 2025 08:15:51 +0100 Subject: [PATCH 09/21] update typescript --- package-lock.json | 11 ++++++----- package.json | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 35cd232d..78c79a80 100644 --- a/package-lock.json +++ b/package-lock.json @@ -60,7 +60,7 @@ "rollup-plugin-postcss": "^4.0.2", "rollup-plugin-typescript2": "^0.32.1", "tailwindcss": "^3.3.1", - "typescript": "^4.7.4" + "typescript": "^5.7.3" }, "peerDependencies": { "react": "^18.2.0", @@ -7178,16 +7178,17 @@ } }, "node_modules/typescript": { - "version": "4.7.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", - "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", + "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", "dev": true, + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" } }, "node_modules/unbox-primitive": { diff --git a/package.json b/package.json index dbf275f5..ad141534 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "rollup-plugin-postcss": "^4.0.2", "rollup-plugin-typescript2": "^0.32.1", "tailwindcss": "^3.3.1", - "typescript": "^4.7.4" + "typescript": "^5.7.3" }, "peerDependencies": { "react": "^18.2.0", From 27d8a9d7e239623083203c8f240fb2194ecc3efd Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Fri, 31 Jan 2025 09:02:04 +0100 Subject: [PATCH 10/21] rename workflow --- .github/workflows/test.lint.examples.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.lint.examples.yml b/.github/workflows/test.lint.examples.yml index 4583bb77..7b8b1a07 100644 --- a/.github/workflows/test.lint.examples.yml +++ b/.github/workflows/test.lint.examples.yml @@ -1,4 +1,4 @@ -name: test:lint +name: test::examples on: push From f836e57c182acad84ed50dfa1fd0c0606710e6a1 Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Sun, 2 Feb 2025 17:58:48 +0000 Subject: [PATCH 11/21] added more marker icons --- src/Components/Map/UtopiaMap.css | 21 +++++++++++++++++++++ src/Utils/MarkerIconFactory.ts | 8 ++++++++ 2 files changed, 29 insertions(+) diff --git a/src/Components/Map/UtopiaMap.css b/src/Components/Map/UtopiaMap.css index 5ab6dc05..a1f1a014 100644 --- a/src/Components/Map/UtopiaMap.css +++ b/src/Components/Map/UtopiaMap.css @@ -134,6 +134,27 @@ left: 4px; width: 24px; } + + .shop-icon { + position: relative; + top: -34px; + left: 4px; + width: 24px; + } + + .plant-icon { + position: relative; + top: -34px; + left: 4px; + width: 24px; + } + + .circle-dot-icon { + position: relative; + top: -36px; + left: 4px; + width: 24px; + } .leaflet-popup-scrolled { overflow-x: hidden; diff --git a/src/Utils/MarkerIconFactory.ts b/src/Utils/MarkerIconFactory.ts index 6de46870..9769dd5f 100644 --- a/src/Utils/MarkerIconFactory.ts +++ b/src/Utils/MarkerIconFactory.ts @@ -61,6 +61,14 @@ const addIcon = (icon: string) => { return '' case 'network': return '' + case 'crosshair': + return '' + case 'shop': + return '' + case 'plant': + return '' + case 'circle-dot': + return '' default: return '' } From 0e6959331a5ae5f6e9eaf82a487718a57ff56fdf Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Sun, 2 Feb 2025 19:24:13 +0000 Subject: [PATCH 12/21] fixed some linting --- src/Components/Profile/Subcomponents/GalleryView.tsx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/Components/Profile/Subcomponents/GalleryView.tsx b/src/Components/Profile/Subcomponents/GalleryView.tsx index 76cfa0fc..7cf2bc37 100644 --- a/src/Components/Profile/Subcomponents/GalleryView.tsx +++ b/src/Components/Profile/Subcomponents/GalleryView.tsx @@ -1,15 +1,11 @@ -/* eslint-disable import/no-unassigned-import */ -/* eslint-disable import/order */ -/* eslint-disable import/no-extraneous-dependencies */ /* eslint-disable @typescript-eslint/no-unsafe-assignment */ /* eslint-disable @typescript-eslint/restrict-template-expressions */ /* eslint-disable @typescript-eslint/no-unsafe-call */ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ import { useState } from 'react' -// eslint-disable-next-line import/no-named-as-default -import Lightbox from 'yet-another-react-lightbox' -import 'yet-another-react-lightbox/styles.css' import { RowsPhotoAlbum } from 'react-photo-album' +import ReactLightbox from 'yet-another-react-lightbox' +import 'yet-another-react-lightbox/styles.css' import 'react-photo-album/rows.css' import { useAppState } from '#components/AppShell/hooks/useAppState' @@ -35,7 +31,7 @@ export const GalleryView = ({ item }: { item: Item }) => { onClick={({ index: current }) => setIndex(current)} /> - = 0} close={() => setIndex(-1)} /> + = 0} close={() => setIndex(-1)} />
) } From 573b4294ee96340bcca9c663c0c950301f058667 Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Sun, 2 Feb 2025 21:29:37 +0000 Subject: [PATCH 13/21] disabled no-unassigned-import for css --- .eslintrc.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index 2e51807a..134730c8 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -108,7 +108,12 @@ module.exports = { 'import/no-duplicates': 'error', 'import/no-named-default': 'error', 'import/no-namespace': 'error', - 'import/no-unassigned-import': 'error', + 'import/no-unassigned-import': [ + 'error', + { + allow: ['**/*.css'], + }, + ], 'import/order': [ 'error', { From 04e806cbdc9e91d357b40e0b926d724fac9e5bb9 Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Sun, 2 Feb 2025 21:37:39 +0000 Subject: [PATCH 14/21] fix linting --- src/Components/Map/Subcomponents/Controls/LocateControl.tsx | 1 - src/Components/Map/UtopiaMap.tsx | 2 -- src/Components/Map/UtopiaMapInner.tsx | 3 --- src/Components/Profile/Subcomponents/AvatarWidget.tsx | 1 - src/Components/Profile/Subcomponents/ColorPicker.tsx | 1 - src/index.tsx | 1 - 6 files changed, 9 deletions(-) diff --git a/src/Components/Map/Subcomponents/Controls/LocateControl.tsx b/src/Components/Map/Subcomponents/Controls/LocateControl.tsx index d0eeec4a..6bd649ec 100644 --- a/src/Components/Map/Subcomponents/Controls/LocateControl.tsx +++ b/src/Components/Map/Subcomponents/Controls/LocateControl.tsx @@ -9,7 +9,6 @@ import { useEffect, useRef, useState } from 'react' import { useMap, useMapEvents } from 'react-leaflet' // eslint-disable-next-line import/no-unassigned-import import 'leaflet.locatecontrol' -// eslint-disable-next-line import/no-unassigned-import import 'leaflet.locatecontrol/dist/L.Control.Locate.css' // Converts leaflet.locatecontrol to a React Component diff --git a/src/Components/Map/UtopiaMap.tsx b/src/Components/Map/UtopiaMap.tsx index 5d5afb9f..5fcb292d 100644 --- a/src/Components/Map/UtopiaMap.tsx +++ b/src/Components/Map/UtopiaMap.tsx @@ -6,8 +6,6 @@ import { ContextWrapper } from '#components/AppShell/ContextWrapper' import { UtopiaMapInner } from './UtopiaMapInner' import type { UtopiaMapProps } from '#types/UtopiaMapProps' - -// eslint-disable-next-line import/no-unassigned-import import 'react-toastify/dist/ReactToastify.css' function UtopiaMap({ diff --git a/src/Components/Map/UtopiaMapInner.tsx b/src/Components/Map/UtopiaMapInner.tsx index fc325098..5e28be9b 100644 --- a/src/Components/Map/UtopiaMapInner.tsx +++ b/src/Components/Map/UtopiaMapInner.tsx @@ -8,13 +8,10 @@ /* eslint-disable @typescript-eslint/no-unsafe-argument */ import { Children, cloneElement, isValidElement, useEffect, useRef, useState } from 'react' import { TileLayer, useMapEvents, GeoJSON, useMap } from 'react-leaflet' -// eslint-disable-next-line import/no-unassigned-import import 'leaflet/dist/leaflet.css' import MarkerClusterGroup from 'react-leaflet-cluster' import { Outlet, useLocation } from 'react-router-dom' import { toast } from 'react-toastify' - -// eslint-disable-next-line import/no-unassigned-import import './UtopiaMap.css' import { containsUUID } from '#utils/ContainsUUID' diff --git a/src/Components/Profile/Subcomponents/AvatarWidget.tsx b/src/Components/Profile/Subcomponents/AvatarWidget.tsx index ab4be26d..b67c2c52 100644 --- a/src/Components/Profile/Subcomponents/AvatarWidget.tsx +++ b/src/Components/Profile/Subcomponents/AvatarWidget.tsx @@ -6,7 +6,6 @@ import { useState, useCallback, useRef } from 'react' import { ReactCrop, centerCrop, makeAspectCrop } from 'react-image-crop' import { useAppState } from '#components/AppShell/hooks/useAppState' -// eslint-disable-next-line import/no-unassigned-import import 'react-image-crop/dist/ReactCrop.css' import DialogModal from '#components/Templates/DialogModal' diff --git a/src/Components/Profile/Subcomponents/ColorPicker.tsx b/src/Components/Profile/Subcomponents/ColorPicker.tsx index abe199f7..84160fc0 100644 --- a/src/Components/Profile/Subcomponents/ColorPicker.tsx +++ b/src/Components/Profile/Subcomponents/ColorPicker.tsx @@ -5,7 +5,6 @@ import { useCallback, useEffect, useRef, useState } from 'react' import { HexColorPicker } from 'react-colorful' -// eslint-disable-next-line import/no-unassigned-import import './ColorPicker.css' import useClickOutside from '#components/Profile/hooks/useClickOutside' diff --git a/src/index.tsx b/src/index.tsx index 5cacee86..145d1719 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,4 +1,3 @@ -// eslint-disable-next-line import/no-unassigned-import import './index.css' export { From db8f7ff753095e5a093ee61bb573b3608c725617 Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Sun, 2 Feb 2025 21:54:44 +0000 Subject: [PATCH 15/21] 3.0.36 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index ce032247..16c95147 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "utopia-ui", - "version": "3.0.35", + "version": "3.0.36", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "utopia-ui", - "version": "3.0.35", + "version": "3.0.36", "license": "GPL-3.0-only", "dependencies": { "@heroicons/react": "^2.0.17", diff --git a/package.json b/package.json index 32e46ec0..066022a1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "utopia-ui", - "version": "3.0.35", + "version": "3.0.36", "description": "Reuseable React Components to build mapping apps for real life communities and networks", "repository": "https://github.com/utopia-os/utopia-ui", "homepage:": "https://utopia-os.org/", From 45f17194d0bd611d0c9bf049044b6d7c9f71a0d3 Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Mon, 3 Feb 2025 08:25:27 +0000 Subject: [PATCH 16/21] 3.0.37 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 16c95147..ba5a667e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "utopia-ui", - "version": "3.0.36", + "version": "3.0.37", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "utopia-ui", - "version": "3.0.36", + "version": "3.0.37", "license": "GPL-3.0-only", "dependencies": { "@heroicons/react": "^2.0.17", diff --git a/package.json b/package.json index 066022a1..9a3c21a3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "utopia-ui", - "version": "3.0.36", + "version": "3.0.37", "description": "Reuseable React Components to build mapping apps for real life communities and networks", "repository": "https://github.com/utopia-os/utopia-ui", "homepage:": "https://utopia-os.org/", From c934621ff217785071d4ba64ca8997bdd9807f84 Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Mon, 3 Feb 2025 08:55:42 +0000 Subject: [PATCH 17/21] cannabis icon --- src/Utils/MarkerIconFactory.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Utils/MarkerIconFactory.ts b/src/Utils/MarkerIconFactory.ts index 9769dd5f..e6229fcd 100644 --- a/src/Utils/MarkerIconFactory.ts +++ b/src/Utils/MarkerIconFactory.ts @@ -69,6 +69,8 @@ const addIcon = (icon: string) => { return '' case 'circle-dot': return '' + case 'cannabis': + return '' default: return '' } From 7a1b90e70bf8db4ba68a24308ca8aadc179ec611 Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Mon, 3 Feb 2025 09:00:27 +0000 Subject: [PATCH 18/21] 3.0.38 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index ab432895..10a54a2d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "utopia-ui", - "version": "3.0.37", + "version": "3.0.38", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "utopia-ui", - "version": "3.0.37", + "version": "3.0.38", "license": "GPL-3.0-only", "dependencies": { "@heroicons/react": "^2.0.17", diff --git a/package.json b/package.json index 27aa43e0..67b77dd0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "utopia-ui", - "version": "3.0.37", + "version": "3.0.38", "description": "Reuseable React Components to build mapping apps for real life communities and networks", "repository": "https://github.com/utopia-os/utopia-ui", "homepage:": "https://utopia-os.org/", From eb02d376df0f99f6d88923803685214361f19650 Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Mon, 3 Feb 2025 10:16:53 +0000 Subject: [PATCH 19/21] fix custom marker icon in Layer component --- src/Components/Map/Layer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Components/Map/Layer.tsx b/src/Components/Map/Layer.tsx index c15987ef..0ce40aef 100644 --- a/src/Components/Map/Layer.tsx +++ b/src/Components/Map/Layer.tsx @@ -40,7 +40,7 @@ export const Layer = ({ menuIcon = 'MapPinIcon', menuText = 'add new place', menuColor = '#2E7D32', - markerIcon = 'circle-solid', + markerIcon = 'point', markerShape = 'circle', markerDefaultColor = '#777', markerDefaultColor2 = 'RGBA(35, 31, 32, 0.2)', From b7fbbd4d898388f00bcea14ba71893c7e83d4568 Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Mon, 3 Feb 2025 10:20:04 +0000 Subject: [PATCH 20/21] set infotext timer to 10s --- src/Components/Map/UtopiaMapInner.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Components/Map/UtopiaMapInner.tsx b/src/Components/Map/UtopiaMapInner.tsx index 5e28be9b..0f399fdd 100644 --- a/src/Components/Map/UtopiaMapInner.tsx +++ b/src/Components/Map/UtopiaMapInner.tsx @@ -73,7 +73,7 @@ export function UtopiaMapInner({ infoText && setTimeout(() => { toast(, { autoClose: false }) - }, 4000) + }, 10000) init.current = true } // eslint-disable-next-line react-hooks/exhaustive-deps From 2bd9fd20d24e4b2795b8a14b04aa0a13e168098d Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Mon, 3 Feb 2025 10:38:16 +0000 Subject: [PATCH 21/21] changed wording in player profiles --- src/Components/Profile/Templates/TabsForm.tsx | 2 +- src/Components/Profile/Templates/TabsView.tsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Components/Profile/Templates/TabsForm.tsx b/src/Components/Profile/Templates/TabsForm.tsx index add01201..6235b221 100644 --- a/src/Components/Profile/Templates/TabsForm.tsx +++ b/src/Components/Profile/Templates/TabsForm.tsx @@ -172,7 +172,7 @@ export const TabsForm = ({ name='my_tabs_2' role='tab' className='tw-tab [--tab-border-color:var(--fallback-bc,oklch(var(--bc)/0.2))]' - aria-label='Relations' + aria-label='Links' checked={activeTab === 7 && true} onChange={() => updateActiveTab(7)} /> diff --git a/src/Components/Profile/Templates/TabsView.tsx b/src/Components/Profile/Templates/TabsView.tsx index d23d0c7b..d7554b94 100644 --- a/src/Components/Profile/Templates/TabsView.tsx +++ b/src/Components/Profile/Templates/TabsView.tsx @@ -121,7 +121,7 @@ export const TabsView = ({ className={ 'tw-tab tw-font-bold !tw-ps-2 !tw-pe-2 [--tab-border-color:var(--fallback-bc,oklch(var(--bc)/0.2))]' } - aria-label={`${item.layer.itemType.icon_as_labels && activeTab !== 2 ? '❤️' : '❤️\u00A0Credibility'}`} + aria-label={`${item.layer.itemType.icon_as_labels && activeTab !== 2 ? '❤️' : '❤️\u00A0Trust'}`} checked={activeTab === 2 && true} onChange={() => updateActiveTab(2)} /> @@ -161,7 +161,7 @@ export const TabsView = ({ appState.assetsApi.url + getUserProfile(a.user_created.id)?.image } - alt='Avatar Tailwind CSS Component' + alt='Avatar' />
@@ -243,7 +243,7 @@ export const TabsView = ({ name='my_tabs_2' role='tab' className='tw-tab tw-font-bold !tw-ps-2 !tw-pe-2 [--tab-border-color:var(--fallback-bc,oklch(var(--bc)/0.2))]' - aria-label={`${item.layer.itemType.icon_as_labels && activeTab !== 7 ? '🔗' : '🔗\u00A0Relations'}`} + aria-label={`${item.layer.itemType.icon_as_labels && activeTab !== 7 ? '🔗' : '🔗\u00A0Links'}`} checked={activeTab === 7 && true} onChange={() => updateActiveTab(7)} />