Commit graph

3536 commits

Author SHA1 Message Date
Yohan Boniface
bcea419bfd 2.7.1 2024-10-25 15:44:52 +02:00
Yohan Boniface
a16f6d409c
fix: always unset editedFeature on editPanel close (#2237)
And only this panel.

This was creating a weird bug, steps to reproduce:

- create a marker
- shift-click on the marker to edit the layer (so without explicitly
closing the panel)
- try to type the layer name: the panel would close

This is also because currently the schema and render() are too dump, and
when any `name` is changed then the `data` reflow is called, while it
should not when editing the datalayer name.

We want to:
- have more targeted schema
- have more specific reflow in render

But that's for other PRs!
2024-10-25 15:40:47 +02:00
Yohan Boniface
b36c03a203 fix: prevent feature.edit to be called twice on polygon/line end edit
When finishing drawing a polygon/line, Leaflet.Editable will send
both `editable:drawing:end` and `editable:drawing:commit`. In normal
flow, we only need to listen to the later, and we only need to
listen for the former in the case of pressing escape while drawing.
2024-10-24 21:07:58 +02:00
Yohan Boniface
71b55e7759 fix: always unset editedFeature on editPanel close
And only this panel.

This was creating a weird bug, steps to reproduce:

- create a marker
- shift-click on the marker to edit the layer (so without explicitly
  closing the panel)
- try to type the layer name: the panel would close

This is also because currently the schema and render() are too
dump, and when any `name` is changed then the `data` reflow is
called, while it should not when editing the datalayer name.

We want to:
- have more targeted schema
- have more specific reflow in render

But that's for other PRs!
2024-10-24 19:22:46 +02:00
Yohan Boniface
023f48ee94
chore: use shutil.move instead of Path.rename to move to purgatory (#2236)
Otherwise it will fail if src and dest are not on the same FS.
2024-10-24 19:18:21 +02:00
Yohan Boniface
928ce8232c chore: better document UMAP_PURGATORY_ROOT 2024-10-24 18:28:44 +02:00
Yohan Boniface
bdf0bee156 2.7.0 2024-10-24 18:03:11 +02:00
Yohan Boniface
9fe96a98d1 i18n 2024-10-24 17:51:20 +02:00
Yohan Boniface
bda1984f44
chore: explicitely add geojson extension when downloading a layer (#2228)
This was added by the browser I think, but let's be explicit, just in
case.

cf
https://github.com/umap-project/umap/pull/2224#pullrequestreview-2382243375
2024-10-24 17:47:11 +02:00
Yohan Boniface
2dcd61a96d
Allow to run umap with asgi (#2209)
Follow up of #1701 

cf #2174
2024-10-24 17:46:33 +02:00
Yohan Boniface
455ddd455d
fix: do not try to create legend for non loaded classified layer (#2234)
fix #2232

A classified layer needs to have compiled the data to known its
classes/categories.

This commit review the way we build the legend: instead of creating with
the whole caption panel, we just set a container and we populate it
later. This opens the door for live changing the legend when editing the
layer.

But we have to clarify that "reactive" pattern at some point, as we have
some concurrent pattern laying around: the `render()`, which coupled
with the schema and this is nice, but for now it's a bit rough (changing
the whole UI each time); the `propagate` way, which is more specific,
but not coupled to the schema; the `dataChanged`; and the `onDataLoaded`
now, which is a bit different, as it's about the data being loaded, not
changed/modified, but for the DOM it may at the end be the same. Well,
food for thoughts…
2024-10-24 17:39:12 +02:00
Yohan Boniface
200e12e0d9 chore: apply Biome hints
Co-authored-by: Alexis Métaireau <alexis@notmyidea.org>
2024-10-24 12:39:22 +02:00
Yohan Boniface
3477be99b8 fix: do not try to create legend for non loaded classified layer
fix #2232

A classified layer needs to have compiled the data to known its
classes/categories.

This commit review the way we build the legend: instead of creating
with the whole caption panel, we just set a container and we populate
it later. This opens the door for live changing the legend when
editing the layer.

But we have to clarify that "reactive" pattern at some point, as we
have some concurrent pattern laying around: the `render()`, which
coupled with the schema and this is nice, but for now it's a bit rough
(changing the whole UI each time); the `propagate` way, which is
more specific, but not coupled to the schema; the `dataChanged`; and
the `onDataLoaded` now, which is a bit different, as it's about the
data being loaded, not changed/modified, but for the DOM it may at
the end be the same. Well, food for thoughts…
2024-10-23 18:56:26 +02:00
45f1221d00 Use fake timers on the HLC tests 2024-10-22 13:50:46 +02:00
8eae7990dd Add a fieldInSchema utility function.
Check that fields are present in the schema before calling render
2024-10-22 13:50:46 +02:00
4f0404149e feat(sync): Display the number of connected peers in the interface. 2024-10-22 13:50:46 +02:00
Yohan Boniface
c6c255e216 chore: use shutil.move instead of Path.rename to move to purgatory
Otherwise it will fail if src and dest are not on the same FS.
2024-10-22 12:14:04 +02:00
Yohan Boniface
85d65c5070
chore: bump ruff from 0.6.9 to 0.7.0 (#2230) 2024-10-22 08:28:13 +02:00
Yohan Boniface
e5d82ec645
chore: bump mkdocs-material from 9.5.40 to 9.5.42 (#2229) 2024-10-22 08:27:56 +02:00
Yohan Boniface
57e735d64d
chore: bump pillow from 10.4.0 to 11.0.0 (#2231) 2024-10-22 08:27:37 +02:00
dependabot[bot]
1f34fd3e41
chore: bump pillow from 10.4.0 to 11.0.0
Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.4.0 to 11.0.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/10.4.0...11.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-21 17:41:15 +00:00
dependabot[bot]
b7fd805d3d
chore: bump ruff from 0.6.9 to 0.7.0
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.6.9 to 0.7.0.
- [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/0.6.9...0.7.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-21 17:41:05 +00:00
dependabot[bot]
1d88b84936
chore: bump mkdocs-material from 9.5.40 to 9.5.42
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.5.40 to 9.5.42.
- [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.40...9.5.42)

---
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-10-21 17:40:54 +00:00
Yohan Boniface
d2832be6d5
fix: always call propagate at end of save (#2226)
Otherwise the renderEditToolbar will reset name and all.

fix #2225
2024-10-21 16:40:01 +02:00
Yohan Boniface
e0e7e0961c chore: explicitely add geojson extension when downloading a layer
This was added by the browser I think, but let's be explicit, just
in case.
2024-10-21 16:38:08 +02:00
Yohan Boniface
a2af7171d9 chore: call render at end of save
All changes at some point should call render, and render should
become more subtle to update only the needed part according to
the actual changes
2024-10-21 16:25:07 +02:00
Yohan Boniface
0d5b488f93
chore: remove postsync in captionBar and let map.propagate do its job (#2227) 2024-10-21 16:23:58 +02:00
Yohan Boniface
132be80a48 chore: remove postsync in captionBar and let map.propagate do its job 2024-10-21 16:05:26 +02:00
Yohan Boniface
ae79daec7e fix: always call propagate at end of save
Otherwise the renderEditToolbar will reset name and all.

fix #2225
2024-10-21 15:41:30 +02:00
Yohan Boniface
e100809d24
fix: use correct icon for layer download advanced action (#2224)
Replace #2221
2024-10-21 12:15:05 +02:00
Yohan Boniface
13aa407e47 chore: install sync target on "make develop" 2024-10-21 11:59:58 +02:00
Yohan Boniface
c74971bc0e chore: move pydantic and websocket in sync dependencies target 2024-10-21 11:50:10 +02:00
Yohan Boniface
037b8e0fbd
feat: add importer for French cadastre (#2223)
![Screenshot From 2024-10-18
12-48-23](https://github.com/user-attachments/assets/26357638-cf57-4582-b44a-03bb698f6502)
2024-10-21 11:46:57 +02:00
Yohan Boniface
9520a99d11 feat: add importer for French cadastre 2024-10-21 11:28:15 +02:00
Yohan Boniface
7b88193d62
fix: fix dispeared icons from panel titles (#2222)
Before:


![image](https://github.com/user-attachments/assets/54a7de1e-790a-46a2-aa0c-0acb03286349)


After:


![image](https://github.com/user-attachments/assets/f57bb884-a748-4aa4-9153-707b201909fe)
2024-10-21 10:47:12 +02:00
Yohan Boniface
a1a4904f02 fix: use correct icon for layer download advanced action 2024-10-21 10:41:41 +02:00
Yohan Boniface
e0da3163ec fix: fix dispeared icons from panel titles 2024-10-18 12:08:28 +02:00
David Larlet
2642688764
Docker: version is obsolete. (#2220)
The top-level 'version' property is deprecated and can be omitted to
prevent warnings.
2024-10-16 22:41:47 -04:00
L
39cb9cbed0 version is obsolete.
The top-level 'version' property is deprecated.
2024-10-17 08:42:51 +10:00
Yohan Boniface
0b23f1acd1 2.7.0b3 2024-10-16 19:55:32 +02:00
Yohan Boniface
0b6c66a841 i18n 2024-10-16 19:51:20 +02:00
Yohan Boniface
ab703e081b
feat: add a global toolbox in browser (#2160)
fix #2097
cf #1500


![image](https://github.com/user-attachments/assets/2c8b96e4-8cf7-4d5f-afed-11adf73e98a8)

This is an alternative proposal for #2097:

- adding the button near the "Filter" toggle was a bit ugly, CSS/HTML
talking, because this "Filters" box is a details/summary
- I thought that other needs could live in the same place: a link to
download the filtered/visible data, and a button to show the map data
extent

The "toggle all" button works this way:
- if one or more layers are shown, it will hide those layers
- otherwise it will show all layers

I've preferred not to change the button icon according to map state,
because I didn't find a reliable way to do so, thus I'm afraid to have
inconsistency, but I can't try harder if needed.

Related: I'm thinking of adding a "Download" button for each layers, as
it's a request that comes quite often.

@Aurelie-Jallut could you have a look ? :)
2024-10-16 19:45:56 +02:00
Yohan Boniface
47364904bd
chore: simplify contextmenu items (#2216)
Do not show generic map items when clicking on a feature.

cf #2109

Click on map:


![image](https://github.com/user-attachments/assets/b3717d4a-6f6c-4976-a86b-f97bd1239cea)

Click on feature:


![image](https://github.com/user-attachments/assets/c7f75afb-4a8a-446a-b7f4-a4a790c148c3)
2024-10-16 19:25:06 +02:00
Yohan Boniface
f8e53e7c48
feat: only add visible markers (and tooltips) to DOM (#2204) 2024-10-16 19:20:05 +02:00
Yohan Boniface
dab8bce27e
fix: do not show browser counter when layer is empty or not loaded (#2217)
fix #2215
2024-10-16 12:01:49 +02:00
Yohan Boniface
d8383dafba fix: do not show browser counter when layer is empty or not loaded
fix #2215
2024-10-16 09:48:03 +02:00
Yohan Boniface
e0812afea8
chore: use colorbrewer as ES module (#2218) 2024-10-16 09:41:56 +02:00
Yohan Boniface
61c3be59a8 chore: use colorbrewer as ES module 2024-10-16 09:01:31 +02:00
Yohan Boniface
8daf4cd652 chore: bump and pin front facing JS deps 2024-10-15 11:28:39 +02:00
Yohan Boniface
966c74b85b chore: simplify contextmenu items
Do not show generic map items when clicking on a feature.

cf #2109
2024-10-15 10:32:07 +02:00