43 Commits

Author SHA1 Message Date
Anton Tranelis
15fbd3e6ce
fix(lib): improved item header (#383)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-13 13:15:06 +02:00
Anton Tranelis
2411017c33
feat(lib): maplibre (#425) 2025-10-13 13:10:38 +02:00
Anton Tranelis
d10f924fa0
fix(lib): update tiptap to v3 (#422)
Co-authored-by: mahula <lenzmath@posteo.de>
2025-10-10 18:14:59 +02:00
mahula
78a8c68800
feat(other): initial end-to-end tests working in github ci and locally (#402)
Co-authored-by: Ulf Gebhardt <ulf.gebhardt@webcraft-media.de>
2025-10-09 21:59:06 +02:00
Anton Tranelis
e261d68534
feat(lib): blanked out maps support (#416)
Co-authored-by: mahula <lenzmath@posteo.de>
Co-authored-by: Ulf Gebhardt <ulf.gebhardt@webcraft-media.de>
2025-10-09 15:50:32 +02:00
mahula
d95afca304
refactor(other): set nodejs version to current lts version application-wide (#414) 2025-10-07 18:04:11 +02:00
Anton Tranelis
27ebc26a41
fix(lib): lists style in info modal (#412) 2025-10-06 13:23:17 +02:00
Copilot
b25ded083f
feat(lib): add Fullscreen Control to UtopiaMap Component (#408)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: antontranelis <31516529+antontranelis@users.noreply.github.com>
Co-authored-by: Anton Tranelis <mail@antontranelis.de>
2025-10-04 08:04:20 +02:00
Anton Tranelis
c5232093dc
feat(lib): relation component (#387)
* Fix relations view

* extended relation component

* added backend fields

* bidirectional direction

* fix linting
2025-09-15 11:32:19 +02:00
Anton Tranelis
298876a269
fix(lib): fix user_created reset when updating other users profile marker (#380)
* fix user_created new set when updating other users profile marker

* fix same issue on different places

* fix linting

* fix tests
2025-09-12 21:50:33 +02:00
Anton Tranelis
a49590243a
adjust UserControl for external profiles and small item edits (#363) 2025-09-07 13:47:50 +02:00
Anton Tranelis
659efc0d5e
fix(lib): adjust index page for external profiles (#361)
* don't open internal profile, if item has external profile url

* refactor(backend): simplified icon config (#359)

* simplified icon config

* fixed linting

* fixed linting

* fix linting and searchControl

* adjust useSelectPosition

* adjust useSelectPosition

* fixed presets

* removed menuIcon artefacts

* fix example

* adjust icon size in addButton

* item index page is now not opening internal profile if external profile exist

* fix imports

* reset layer

* fix behaviour

* set map position to popup form
2025-09-07 13:42:29 +02:00
Anton Tranelis
879dbf1631
refactor(backend): simplified icon config (#359)
* simplified icon config

* fixed linting

* fixed linting

* fix linting and searchControl

* adjust useSelectPosition

* adjust useSelectPosition

* fixed presets

* removed menuIcon artefacts

* fix example

* adjust icon size in addButton
2025-09-05 22:26:26 +02:00
Anton Tranelis
02e5598266
fix(lib): login info box (#345)
* login info box

* fixed linting

* fix linting

---------

Co-authored-by: Ulf Gebhardt <ulf.gebhardt@webcraft-media.de>
2025-09-02 09:56:15 +00:00
Anton Tranelis
1aaabebc99
reinsert uuid to fix notifiations in backend (#342) 2025-08-27 13:20:46 +02:00
Anton Tranelis
94ec2e5576
fix popup button (#339) 2025-08-27 13:17:20 +02:00
Anton Tranelis
1b0b51e91a
fix behaviour of modal (#340) 2025-08-27 10:05:42 +02:00
Anton Tranelis
7e059d8deb
feat(app): added external profile url (#328)
* added external profile url

* switch port back to 5174

* fix linting

* chaneged target to _parent
2025-08-26 14:56:55 +02:00
Anton Tranelis
cb6737d370
feat(app): popup customizing (#333)
* small form edits

* fix linting

* custom button label

* more popup customizing

* reset dev port
2025-08-26 14:55:15 +02:00
Anton Tranelis
a599eddca6
feat(lib): add optional request password button to login page (#334)
* add optional request password button to login page

* fix linting

* fix linting

* added field to backend config
2025-08-26 14:43:31 +02:00
Anton Tranelis
1ef562cf3c
feat(lib): hide signup option (#329)
* hide signup option

* directus pull
2025-08-26 14:22:26 +02:00
Anton Tranelis
fbe1eb9e0f
avatar-widget showing external image (#330) 2025-08-25 11:03:59 +02:00
2baabe7940 disable close on click outside in location update dialog 2025-08-20 19:02:08 +02:00
6fcdef0433 fix(lib): ensure user_created is preserved in all item operations
- Add user_created field to all item update operations to maintain proper user association
- Update useMyProfile hook to use direct computation instead of useMemo to avoid React hook queue issues
- Refactor UserControl to use useMyProfile hook for consistency
- Fix user_created handling in LocateControl, ItemFormPopup, useSelectPosition, and itemFunctions
- Add user parameter to linkItem, unlinkItem, and related functions with proper TypeScript signatures
- Update all function calls and tests to include user parameter
- Ensure proper null safety with user ?? undefined pattern

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-20 18:55:02 +02:00
Anton Tranelis
db423b26f3
fix(lib): fix tests for locateControl (#324)
* improved locate control

* fix(lib): clean up setTimeout and fix Chrome modal layout issue

- Add proper cleanup for setTimeout in LocateControl to prevent memory leaks
- Replace modal-open class with direct overflow style to fix Chrome scrollbar issue
- Add timeout reference tracking for better component unmount handling

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix linting

* set distance rule

* optimized locatecontrol

* working for new users without profile now

* test(lib): add comprehensive tests for LocateControl component

- Add 9 comprehensive unit tests covering all LocateControl functionality
- Test modal display logic for new and existing users
- Test profile creation and position updates
- Test navigation after successful operations
- Test error handling with proper toast notifications
- Mock all external dependencies (React Router, Leaflet, APIs)
- Verify dialog behavior prevents re-appearance after decline
- Include snapshot tests for UI consistency
- All tests pass with proper TypeScript typing

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* removed unused code, add 1s delay

* updated tests

* fixed tests

* fix test for LocateControl

* fix linting

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-20 16:53:08 +02:00
Anton Tranelis
f7f758bb00
feat(lib): enhanced LocateControl (#308)
* improved locate control

* fix(lib): clean up setTimeout and fix Chrome modal layout issue

- Add proper cleanup for setTimeout in LocateControl to prevent memory leaks
- Replace modal-open class with direct overflow style to fix Chrome scrollbar issue
- Add timeout reference tracking for better component unmount handling

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix linting

* set distance rule

* optimized locatecontrol

* working for new users without profile now

* test(lib): add comprehensive tests for LocateControl component

- Add 9 comprehensive unit tests covering all LocateControl functionality
- Test modal display logic for new and existing users
- Test profile creation and position updates
- Test navigation after successful operations
- Test error handling with proper toast notifications
- Mock all external dependencies (React Router, Leaflet, APIs)
- Verify dialog behavior prevents re-appearance after decline
- Include snapshot tests for UI consistency
- All tests pass with proper TypeScript typing

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* removed unused code, add 1s delay

* updated tests

* fixed tests

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-20 16:39:19 +02:00
Anton Tranelis
649efe551d
refactor(lib): implement server-response-first pattern (#322)
* use server response for local state updates

* fix formatting

* refactor: comprehensive server-response-first pattern implementation

## Major Changes

### LayerProps ID Required
- Made `LayerProps.id` required (was optional)
- All layers now guaranteed to have server-provided UUID
- Enables reliable layer ID mapping from server responses

### useSelectPosition Hook Refactored
- Added reusable `handleApiOperation` helper function
- Refactored `itemUpdatePosition`, `itemUpdateParent`, `linkItem`
- All functions now use server response + layer ID mapping
- Consistent error handling and toast management

### itemFunctions.ts Complete Refactor
- **submitNewItem**: Server response with layer mapping
- **linkItem**: Server response preserves layer object
- **unlinkItem**: Same pattern as linkItem
- **handleDelete**: Simplified error handling
- **onUpdateItem**: Complex function refactored for both update/create branches

### Benefits
-  Eliminates race conditions from manual state construction
-  Server response as single source of truth for all updates
-  Consistent error handling across all API operations
-  Items no longer disappear from map after updates
-  Type-safe layer ID mapping

### Testing
- Updated ItemFunctions.spec.tsx with new toast patterns
- Added required layer IDs to test objects
- All 19 tests passing (3 skipped)
- ESLint clean

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix linting

* fix: resolve TypeScript undefined data errors

- Add non-null assertions for result.data in conditional blocks
- TypeScript now properly recognizes data is defined after success check
- All linting and TypeScript errors resolved

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fixed examples

* remove unneccessary uuid generation

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-20 15:03:30 +02:00
Anton Tranelis
94fa6321ba
fix(lib): adjust UserControl and HeaderView (#293)
* fix(lib): resolve TypeScript unsafe assignment errors in UserControl and HeaderView

- Add ESLint disable for @typescript-eslint/no-unsafe-assignment in UserControl to align with other components
- Refactor avatar logic in UserControl to use explicit typing and conditional assignment
- Add alt attribute to avatar image in UserControl for better accessibility
- Fix image priority order in HeaderView to prioritize internal images over external ones
- Support both internal and external images with proper fallback in both components

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: remove unused ESLint disable and fix CI lint check

The explicit typing approach resolved the TypeScript unsafe assignment
errors without needing the ESLint disable rule.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* removed unused linting exception

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Ulf Gebhardt <ulf.gebhardt@webcraft-media.de>
2025-08-14 11:27:11 +02:00
5a2d1ea856
changes on package-lock.json when running npm install (#301) 2025-08-13 20:58:11 +00:00
Anton Tranelis
4e6fb57042
fix(lib): critical vulnerability (#290)
* fix critical vulnerability

* fix same in app
2025-08-06 13:07:18 +00:00
Anton Tranelis
945e5b066a
feat(lib): add support for external images in items (#291)
* feat: add support for external images in items

Add image_external field to Item type and update HeaderView to prefer external images over internal ones when available.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: prettier formatting for external image feature

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-06 15:04:52 +02:00
Max
1e7320b895
feat(app): qR invites (#267)
* Add component to show invite link (WIP)

* Show invite link with copy functionality and QR-Code, add tests

* Query secrets

* Update directus collections

* Add config and invite api

* Let vite resolve paths using tsconfig

* Redeem invite link when logged in or after logging in

* Redirect to inviting profile when redeeming

* Fix some logic with login and redeeming

* Use correct redeem flow

* Hide missing form error

* Add basic relations view

* Pass profile to redeem Api and adapt to changed redeem flow

* Remove unnecessary aliases in vite config

* Remove dead import

* gitignore mac specific file

* Remove lazy loading

* Fix linting

* add InviteApi import

* Change case of file name (tbd)

* Don't toast error if user profile was not loaded yet

* Fix casing

* avoid app crash when profile of a new item is opened

---------

Co-authored-by: Anton Tranelis <mail@antontranelis.de>
2025-07-11 13:37:05 +02:00
Anton Tranelis
855ef3de29
fix(lib): base layer config (#276)
* add close button to custom info modal

* added attribution

* fix build examples workflow

* fix pending tests

* Revert "add close button to custom info modal"

This reverts commit 835c661009abbdc5c095a6bc86bbd6890e080e5f.
2025-07-04 08:39:13 +02:00
Anton Tranelis
12aba6a67e
fix(lib): fix labels (#278)
* fix labels

* more lables

* and the rest of the lables

* updated snapshots

* fix linting
2025-07-04 08:36:11 +02:00
Anton Tranelis
045ec726eb
fix(lib): auto close update position toast (#277)
* add close button to custom info modal

* auto close update position toat

* Revert "add close button to custom info modal"

This reverts commit cf5b9a407effe0772ed622ce2369cf16e0b82175.

* fix: reset position for new items without text
2025-07-03 13:18:10 +02:00
Anton Tranelis
712aa98ac2
refactor(other): repo setup (#271)
* direct library import

* running dev environment

* fix linting

* strickt null checks

* fix linting

* chunks

* fix jumping button

* don't exclude rollup-config from typechecks
2025-06-27 20:03:16 +02:00
Anton Tranelis
76d899dba2
fix(lib): fixed profile crash on browser translation (#270)
* fixed profile crash on browser translation

* fix linting
2025-06-26 20:36:16 +02:00
Max
13612c56aa
fix(frontend): lazy load components at top level, not inside another component (#265)
* Lazy load components at top level, not inside another component

* version

---------

Co-authored-by: Anton Tranelis <mail@antontranelis.de>
2025-06-23 07:08:49 +00:00
Anton Tranelis
1828f29cfb
fix(frontend): fixed gallery object on item update (#261)
* fixed gallery object on item update

* version
2025-06-18 13:19:01 +02:00
Anton Tranelis
d73e4886e8
fix(other): fixed lib README badges, moved map README, unpublished map changes, f… (#259)
* fixed lib README badges, moved map README, unpublished map changes, fixed vulnurability

* limit scope of rollups commonjs plugin
2025-06-15 10:29:39 +02:00
a723d4d3cf
move text files to the root directory where applicable (#258) 2025-06-13 09:48:41 +02:00
da634ba8c9
fixed related to mono-repo
issue templates

workflow: lint frontend

workflow: test lib

workflow - unit tests frontend

lib instead of frontend

missing name

workflow: lint examples

workflow: build lib

LICENSE

rename workflow build lib

docs lib

deploy docs

fix build example flow
2025-06-12 11:29:22 +02:00
d32be08be8
move utopia-ui into subfolder lib 2025-06-12 10:46:01 +02:00