Skip to content

Save maps to database#116

Merged
emi420 merged 36 commits intohotosm:developfrom
categulario:feat/map-saving
Mar 23, 2026
Merged

Save maps to database#116
emi420 merged 36 commits intohotosm:developfrom
categulario:feat/map-saving

Conversation

@categulario
Copy link
Copy Markdown
Collaborator

@categulario categulario commented Mar 8, 2026

A few things happen here. All surrounding the idea of saving a map.

  • a migration that removes the uniqueness of the user_id from maps table is created.
  • pydantic schemas are separated from models for clarity.
  • two endpoints are created (GET /map and POST /map) and an old one is renamed (GET /map/new). The rename allows for a more restful interface.
  • deprecated dependency react-router-dom is replaced by react-router.
  • two icons are added.
  • SaveButton is renamed DownloadButton and a new SaveButton is created.
  • translations for new messages are added.
  • the Header component is refactored to receive buttons as children, thus simplifying its logic a lot.
  • a MapList page is created containing the table of maps that the user has created.

@categulario categulario requested a review from emi420 March 8, 2026 06:35
@emi420
Copy link
Copy Markdown
Contributor

emi420 commented Mar 8, 2026

@categulario I see that there are unfinished things here, because it's WIP, let's finish all features before creating the PR to develop.

You can also cherry pick some finished changes and create a PR with that if you want, like changes in the router dependency or in the database/models, as long as the existing functionality keeps working.

@categulario categulario changed the title WIP: Save maps do database Save maps do database Mar 10, 2026
@categulario categulario marked this pull request as ready for review March 10, 2026 03:54
@categulario categulario changed the title Save maps do database Save maps to database Mar 10, 2026
Copy link
Copy Markdown
Contributor

@emi420 emi420 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @categulario !! There are just a few things to be fixed before approving the PR.

  • Live compatibility with new code. This feature is now broken because the map can't be created after changes on endpoints.
  • Bug with tags
  • Track media files ownership
  • Small naming issue and missing translation

Comment thread chatmap-ui/src/components/Map/utils.jsx
Comment thread chatmap-ui/src/components/SaveDialog/index.jsx Outdated
Comment thread chatmap-api/main.py Outdated
Comment thread chatmap-api/main.py Outdated
Comment thread chatmap-api/main.py
Comment thread chatmap-api/main.py
Comment thread chatmap-ui/src/context/MapDataContext.jsx
@categulario
Copy link
Copy Markdown
Collaborator Author

All things have been reviewed and addresed

@emi420 emi420 merged commit c20bfb2 into hotosm:develop Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants