Anton Tranelis d3e7b7a9bb fix(tags): restore automatic hashtag creation for unknown tags
Two issues were preventing hashtags from being automatically added to the database:

1. **useTags.tsx - Stale closure bug**: The `addTag` function was using
   `tags` and `api` from the closure scope, which were stale when called.
   Fixed by using `useRef` for both `apiRef` and `tagsRef`, ensuring the
   function always accesses current values.

2. **PopupView.tsx - Tag creation in render**: New tags were detected
   inside the render `.map()` function with side effects - an anti-pattern.
   Moved tag processing to a dedicated `processItemsTags` function in
   useTags hook, called via useEffect when items are loaded.

Changes:
- Added `processItemsTags(items: Item[])` function to useTags hook
- Added `useProcessItemsTags` export hook
- Cleaned up PopupView.tsx to use the new hook via useEffect
- Removed side effects from render function

Now when items are loaded, any hashtags that don't exist in the database
are automatically created with a random color.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 06:39:53 +01:00
..
2025-06-12 10:46:01 +02:00
2025-06-12 10:46:01 +02:00
2025-06-12 10:46:01 +02:00

Utopia UI npm version Build Status Test Coverage Docs Coverage License

UI Framework for Real-Life-Networking-Apps

Real change happens in real life when we meet in person and connect as local communities manifesting their ideas with the earth. When we help each other to step out of our bubbles at home and start building common infrastructure to meet human needs in harmony with Mother Earth.

That is why Utopia UI exists. It is a UI kit for minimalist, fast, intuitive and mobile-first map apps, as a tool for local connection and decentralised networking. We believe in maps as the perfect link between digital tools and real life action

It can work with any backend or p2p database and any kind of data structure.

Mission

Utopia UIs mission is to provide open source building blocks to create beautiful applications with a focus on real life impact, local communities and gamification.

The building blocks are designed to allow different networks and communities to assemble their map and app for their specific needs and purpose.

It is the base of Utopia Map and Utopia Game.

Features

  • Interactive Component Map with customizable Layers (like Projects, Event, People)
  • Flexible API-Interface to make it work with every backend or p2p database
  • Create, Update, Delete Items
  • User authentification API-Interface
  • Customizable Profiles for users and other items
  • App shell with navigation bar and sidebar

Getting Started

  1. If you want to use Utopia UI in your project, check out /examples to see how to use its components.

  2. If you need more information you can explore the docs

  3. If you like to contribute to our library, see the Contribution Guide to see how to setup a development environment on your local machine.

Components

Utopia UI Components

Map Component

The map shows various Layers (like places, events, profiles ...) of Items at their respective position whith nice and informative Popup and Profiles.

Tags, colors and clusters help to retain the overview.

Map Options

Option Type Default Required Description
height string '400px' No height of the map
width string '100vw' No width of the map
center LatLng [50.6, 9.5] No initial map position
zoom number 10 No initial zoom level

Layer Options

Option Type Default Required Description
...

Join the community

This Library is in alpha stage. You are very welcome to participate in the development

We are looking for Web Developer, UX Designer, Community Manager, Visionaries, Artists, etc. who like to support this Vision.

https://t.me/UtopiaMap

Support us


This project is tested with BrowserStack