Commit graph

2493 commits

Author SHA1 Message Date
Yohan Boniface
375ef69b1b fix: only use location bias in search for close zoom
And add a lower location bias
2024-03-14 14:45:39 +01:00
David Larlet
95ce3467ce
Merge pull request #1689 from umap-project/cors-headers
Set CORS-related header for oEmbed and map views
2024-03-13 14:12:15 -04:00
David Larlet
d050a70017
Set CORS-related header for oEmbed and map views 2024-03-13 14:02:34 -04:00
Yohan Boniface
8cc6d58752
Merge pull request #1688 from umap-project/fix-oembed-i18n
fix: deal with i18n in oembed URLs
2024-03-13 18:36:14 +01:00
Yohan Boniface
409c79415f fix: deal with i18n in oembed URLs 2024-03-13 18:03:20 +01:00
Yohan Boniface
d431acd4e3
Merge pull request #1669 from umap-project/make-remodata-async
fix: make sure we wait for remote data before sending "dataloaded" event
2024-03-12 09:15:12 +01:00
dependabot[bot]
0e142eddc2
chore: bump mkdocs-material from 9.5.12 to 9.5.13
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.5.12 to 9.5.13.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.5.12...9.5.13)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-11 17:51:40 +00:00
dependabot[bot]
3998a47919
chore: bump ruff from 0.3.0 to 0.3.2
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.3.0 to 0.3.2.
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/v0.3.0...v0.3.2)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-11 17:51:22 +00:00
dependabot[bot]
e0ef2473a4
chore: bump pytest from 8.0.2 to 8.1.1
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.0.2 to 8.1.1.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/8.0.2...8.1.1)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-11 17:50:54 +00:00
dependabot[bot]
cdbaab2d20 chore: bump pytest from 6.2.5 to 8.0.2
Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.2.5 to 8.0.2.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/6.2.5...8.0.2)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-11 10:44:50 +01:00
Alexis Métaireau
29992e10e6 fix: Replace Last-Modified with custom headers.
`X-Datalayer-Version` and `X-Datalayer-Reference` are now used instead
of the `Last-Modified` and `If-Unmodified-Since` headers.

`Last-Modified` is granular to the second, which led to problems with
the versionning. The new system uses timestamps instead.

This commit also changes the way versions were created. Previously,
the associated version was coming from two different places:
the last modified time from the filesystem and a `time.time()` call
done when saving the model, which could result in the two getting
out of sync.
2024-03-08 22:34:54 +01:00
Alexis Métaireau
9071d92986 chore: ensure merge + assigning ids are rejected
The current code already ensures that items
changed in the reference weren't also changed
in the latest changes, so we are covered.
2024-03-08 18:01:58 +01:00
Yohan Boniface
6396ee5e58
Merge pull request #1661 from umap-project/schema-i18n
Add minimal schema module
2024-03-05 17:57:40 +01:00
Yohan Boniface
6ed5ebc9fb
Merge pull request #1630 from umap-project/datalayer-uuids
chore: replace datalayer ids with uuids
2024-03-05 17:26:50 +01:00
Yohan Boniface
bfcdfdcfc1 chore: bump ruff 2024-03-05 17:23:49 +01:00
Alexis Métaireau
b0c1f56979 chore: factorize json.dumps in an util function.
In order to use the Django JSON Encoder by default.
2024-03-05 11:25:37 +01:00
Alexis Métaireau
1b41ff0ddc chore: Rename datalayer id to old_id 2024-03-05 11:23:12 +01:00
Yohan Boniface
6542dd34ec
Merge pull request #1671 from umap-project/dependabot/pip/django-5.0.3
chore: bump django from 5.0.2 to 5.0.3
2024-03-04 18:47:44 +01:00
dependabot[bot]
bf44079b09
chore: bump django from 5.0.2 to 5.0.3
Bumps [django](https://github.com/django/django) from 5.0.2 to 5.0.3.
- [Commits](https://github.com/django/django/compare/5.0.2...5.0.3)

---
updated-dependencies:
- dependency-name: django
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-04 17:43:35 +00:00
Yohan Boniface
005ef2505a
Merge pull request #1673 from umap-project/dependabot/pip/mkdocs-material-9.5.12
chore: bump mkdocs-material from 9.5.11 to 9.5.12
2024-03-04 18:43:10 +01:00
Yohan Boniface
f4785e5188 chore: partially upgrade tests deps
- pytest 8.x makes tests ~ 20% slower, so I've stopped at 7.x for now
- factory-boy have an anoying DeprecationWarning that I do not understand,
  so I've skipped upgrading it for now
2024-03-04 18:40:43 +01:00
dependabot[bot]
a08cc251cf
chore: bump mkdocs-material from 9.5.11 to 9.5.12
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.5.11 to 9.5.12.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.5.11...9.5.12)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-04 17:16:00 +00:00
Yohan Boniface
e7bd94a099 wip: do not expose UMAP_SCHEMA for now 2024-03-04 17:43:40 +01:00
Yohan Boniface
24e46847b7 chore: use &rcub; for consistency 2024-03-04 17:43:40 +01:00
David Larlet
908750b42b chore: escape help messages with curly brackets 2024-03-04 17:43:40 +01:00
David Larlet
ba41ae4000 fix: wait for agnocomplete in test 2024-03-04 17:43:40 +01:00
David Larlet
5295e931a5 wip(forms): remove defaultOptions from builder 2024-03-04 17:43:40 +01:00
Yohan Boniface
4cdf682706 wip(forms): Try to be smart and use MultiChoice only for short labels 2024-03-04 17:43:40 +01:00
Yohan Boniface
a7a854dd74 wip: move default options to schema
This commit also introduce a new settings UMAP_SCHEMA, that could
be used to easily override schema default, like the default color, the
default path weigth and so on. I'm not documenting yet, because I'm
not yet totally sure we want this.
2024-03-04 17:43:40 +01:00
Yohan Boniface
da945cf733 wip: remove Leaflet.i18n from frontend and expose L._
But we keep Leaflet.i18n for now, as we use its script to collect
strings (this script to be tweaked to support also `translate`).
2024-03-04 17:43:40 +01:00
Yohan Boniface
fcf22195cb chore: move defaultOptions from forms to schema 2024-03-04 17:43:38 +01:00
David Larlet
68f3a9686a chore: Extract a schema module from Map 2024-03-04 17:43:15 +01:00
David Larlet
a6a1959c09 chore: Integrate i18n changes from Leaflet PR
See https://github.com/Leaflet/Leaflet/pull/9281
2024-03-04 17:42:23 +01:00
Yohan Boniface
fa0208519e
Merge pull request #1649 from umap-project/add-features-ids
chore: add ids on features
2024-03-04 11:18:39 +01:00
Yohan Boniface
17120537e3 fix: make sure we wait for remote data before sending "dataloaded" event 2024-03-01 18:39:59 +01:00
Yohan Boniface
c658b28f6e 2.0.4 2024-03-01 18:18:07 +01:00
Yohan Boniface
2a2e237c0e changelog 2024-03-01 18:01:37 +01:00
Yohan Boniface
3e651956f1 2.0.3 2024-03-01 17:55:05 +01:00
Yohan Boniface
a67ee1d1c0 i18n 2024-03-01 17:54:18 +01:00
Yohan Boniface
aa25867517 chore: fix js tests 2024-03-01 17:52:00 +01:00
Yohan Boniface
40d0095b3c
Merge pull request #1658 from umap-project/catch-mail-error
fix: catch SMTPException when sending secret edit link
2024-03-01 17:45:18 +01:00
Yohan Boniface
bb002dffba
Merge pull request #1668 from umap-project/fix-osmid-popup
fix: read id and @id as osm id in osm template
2024-03-01 17:02:20 +01:00
Yohan Boniface
42129a3a45
Merge pull request #1667 from umap-project/fix-querystring-feature
fix: make sure to reset feature query string parameter
2024-03-01 17:02:03 +01:00
Yohan Boniface
103893def2 fix: read id and @id as osm id in osm template
cf #1663
2024-03-01 16:05:41 +01:00
Yohan Boniface
dee6073428 chore: add test to cover opening feature on load 2024-03-01 15:49:27 +01:00
Yohan Boniface
2a084466df fix: make sure to reset feature query string parameter
fix #1662
2024-03-01 15:45:07 +01:00
Alexis Métaireau
d0738e93e7 fix: allow empty datalayers reference on merges.
Previously, an error was thrown when the reference datalayer
had no `features`defined.

When looking for features, it now defaults to an empty list if the key
doesn't exist.
2024-02-29 22:41:20 +01:00
Alexis Métaireau
b0334a027d feat: Ensure features ids match the requested format 2024-02-29 11:38:18 +01:00
Yohan Boniface
24acd5c42d i18n 2024-02-27 23:08:31 +01:00
David Larlet
337c75151c
Merge pull request #1589 from umap-project/css-vars
chore: Use CSS variables
2024-02-27 08:57:04 -05:00