Commit graph

3662 commits

Author SHA1 Message Date
Yohan Boniface
64814f355f
chore: bump ruff from 0.6.8 to 0.6.9 (#2200) 2024-10-07 22:28:17 +02:00
dependabot[bot]
bad10f6734
chore: bump ruff from 0.6.8 to 0.6.9
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.6.8 to 0.6.9.
- [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.8...0.6.9)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-07 17:12:37 +00:00
David Larlet
76ebe1c0ea
tests: use at.least to compare dates on the hlc tests. (#2196)
Should fix [this
error](https://github.com/umap-project/umap/actions/runs/11165503827/job/31037336947?pr=2188)
2024-10-07 08:20:58 -04:00
Yohan Boniface
e7ed14f216 chore: deactivate contextmenu and shortcuts in map preview
Contextmenu and keyboard shortcuts open controls, which are not
fully initiated when in mode `noControl`, which is the case for
preview.
2024-10-07 12:27:33 +02:00
Yohan Boniface
4b66e0fa83 chore: add border top to browser toolbox 2024-10-07 11:57:37 +02:00
Yohan Boniface
36afe0ead5 chore: open dropdown on download click in browser
Instead of switching context and opening the share panel.
2024-10-07 11:46:01 +02:00
Yohan Boniface
2923e1ca51 feat: add a global toolbox in browser
fix #2097
cf #1500
2024-10-07 10:20:17 +02:00
Yohan Boniface
2ca6ffd5ca 2.7.0b2 2024-10-06 10:20:18 +02:00
Yohan Boniface
16f80beffa
fix: fix contextmenu positionning when map is not full screen (#2198) 2024-10-06 10:18:07 +02:00
Yohan Boniface
581ec242b8 chore: always insert contextmenu on map container parent
offsetParent will return whatever positionned parent element, so
when clicking on a marker it will be the marker container.
And we cannot add the contextmenu inside the map container, as it
the focusout element will be sent before the click action happen
on any item of the contextmenu.
2024-10-06 09:46:23 +02:00
37ffea97a9
FIXUP: adapt the tests to a slow CI 2024-10-05 21:16:45 +02:00
Yohan Boniface
3c0d2b79ef fix: allow to call contextmenu with given positions 2024-10-05 11:26:05 +02:00
Yohan Boniface
c844e1c03d chore: use position: fixed for contextmenu 2024-10-05 11:22:02 +02:00
Yohan Boniface
70f06e7852 fix: insert contextmenu in the offsetParent
Otherwise when parent is a dialog, if the the contextemenu is in
the body, it will be below the dialog forever
2024-10-05 11:08:50 +02:00
Yohan Boniface
89c13a3b7e fix: window.offsetHeight does not means anything 2024-10-05 11:08:36 +02:00
Yohan Boniface
42e7fb8dae chore: pass event to ContextMenu.open 2024-10-05 10:41:33 +02:00
Yohan Boniface
c4b80afb15 fix: simpler way to deal with positionning contextmenu
Use pageX/Y from the begginning instead of recomputing it later.
2024-10-05 10:38:51 +02:00
Yohan Boniface
cba0af96f6 fix: fix contextmenu positionning when map is not full screen 2024-10-05 10:02:41 +02:00
Yohan Boniface
c90618a248 fix: do not show separator in contextmenu when nothing before 2024-10-05 09:09:30 +02:00
Yohan Boniface
c0eb936499 changelog 2024-10-05 08:58:52 +02:00
979d34f3fa
tests: use at.least to compare dates on the hlc tests. 2024-10-04 22:46:33 +02:00
Yohan Boniface
16b759973b 2.7.0b1 2024-10-04 19:31:57 +02:00
Yohan Boniface
8788f97791 2.7.0b0 2024-10-04 19:18:07 +02:00
Yohan Boniface
a8d04a6abb i18n 2024-10-04 18:38:00 +02:00
Yohan Boniface
f9cf923684
feat: add a profile drop-down menu (#2194)
fix #2115
2024-10-04 18:26:49 +02:00
Yohan Boniface
8d59220d05
fix: make sure anonymous is owner at create (#2189)
The tricky thing is that the Map.is_owner() method check for cookies on
the request, but at create this cookie is not set yet on the request, so
we have to deal with an exception here.

fix #2176
2024-10-04 17:55:29 +02:00
Yohan Boniface
21be2e4fd0 fix: hide "my profile" from dropdown menu if ALLOW_EDIT_PROFILE=False 2024-10-04 17:54:13 +02:00
Yohan Boniface
6876bb1ba5 fix: listen just once for escape key in contextmenu 2024-10-04 17:44:50 +02:00
Yohan Boniface
1029c2655e wip: add a profile drop-down menu
fix #2113
2024-10-04 17:44:50 +02:00
Yohan Boniface
de93446af2
clean: remove zoom in and out from contextmenu (#2195)
Let's make it smaller (unless proven otherwise!).
2024-10-04 17:43:23 +02:00
Yohan Boniface
9828c491e3
chore: replace native confirm by our styled ones (#2193) 2024-10-04 17:42:56 +02:00
Yohan Boniface
03ae31c18b chore: remove map.dirty_datalayers
Let's try to make it simpler.
map.datalayers stores all datalayers
map.datalayers_index the non deleted ones sorted
2024-10-04 17:35:35 +02:00
Yohan Boniface
a35b37f423 chore: use map getter instead of getMap in permissions 2024-10-04 17:35:35 +02:00
Yohan Boniface
0d7c6e451d chore: new strategy to update map name when editing it
Also propagate share_status (this may be moved to permissions)
2024-10-04 17:35:33 +02:00
Yohan Boniface
0fdb70ce66 chore: review save strategy
All is now orchestrated from a single method, instead of chaining
calls.
2024-10-04 17:34:59 +02:00
Yohan Boniface
73c83cfa86 chore: always return user infos on map save 2024-10-04 17:34:59 +02:00
Yohan Boniface
13a7a2257d fix: do not fail in autocomplete if on_unselect is undefined 2024-10-04 17:34:59 +02:00
Yohan Boniface
ff5195a787 fix: make sure anonymous is owner at create
The tricky thing is that the Map.is_owner() method check for cookies
on the request, but at create this cookie is not set yet on the
request, so we have to deal with an exception here.

fix #2176
2024-10-04 17:34:59 +02:00
Yohan Boniface
ebd3896e91 chore: replace native confirm by our styled ones 2024-10-04 17:34:20 +02:00
Yohan Boniface
9b29b705da clean: remove zoom in and out from contextmenu
Let's make it smaller (unless proven otherwise!).
2024-10-04 17:32:39 +02:00
Yohan Boniface
4940f6c329 test: fix playwright selector 2024-10-04 17:31:05 +02:00
Yohan Boniface
a12d0e6b50 chore: remove package-lock.json from git
As we vendor our dependencies ourselves, let's make it simple.
2024-10-04 17:22:04 +02:00
Yohan Boniface
c8ffe4273f
fix: allow to draw new proprotional circles and to drag them (#2172)
The main issue was because we overrided the `getLatLngs` function in our
PointMixin class, so I changed the way feature get the latlngs from the
UI classes. Plus getting CircleMarker to inherit more from Marker,
through PointMixin.

fix #2171
2024-10-04 16:43:49 +02:00
Yohan Boniface
4b4546991a
chore: display user maps in admin and add in csv export (#2169)
maps are owned maps + maps as editor

cf https://github.com/umap-project/umap/pull/2131#discussion_r1772775039
2024-10-04 16:42:53 +02:00
Yohan Boniface
5d5be52337
feat: delete datalayer's files on delete (#2158)
Until now, uMap was not deleting files on delete, which can increase
file storage a lot after some time.

The files are not deleted, but moved to a "purgatory" folder, from where
they can be deleted after some time.
2024-10-04 16:41:11 +02:00
Yohan Boniface
91800d104d
fix: polygon with interactive=false was still interactive (#2151)
This bug has been introduced when spliting features, as we now only set
the Leaflet Polygon options with setStyle, will the `interactive` option
is only used in the init by Leaflet.

See https://github.com/Leaflet/Leaflet/pull/9475
2024-10-04 16:36:21 +02:00
Yohan Boniface
d95f06abab
chore: use our own contextmenu (#2109)
Let's start from here to clean the contextmenu items.

Current status:

### Some entries are generic, and always present:

In preview mode:


![image](https://github.com/user-attachments/assets/ea5cf2d3-f8f7-4d6a-8bf5-4c0334334bbc)

In edit mode:


![image](https://github.com/user-attachments/assets/2d2fa5c1-a275-4037-8780-d18a5e31949b)

### Some entries are specific to a clicked feature

In preview mode (Marker):


![image](https://github.com/user-attachments/assets/2d03f640-fb62-4be8-893d-d1ffc09d66f1)

In edit mode (Marker):


![image](https://github.com/user-attachments/assets/3f5ede89-fe3e-41a0-ac9a-575ef04e7a41)

In preview mode (Polygon):


![image](https://github.com/user-attachments/assets/fa88b13a-ac53-4bdd-896c-ada025640c35)

In edit mode (Polygon):


![image](https://github.com/user-attachments/assets/c2b46f2a-4f6d-4660-9654-d4f775386898)

In preview mode (Line):


![image](https://github.com/user-attachments/assets/74cd5c21-ad17-4592-b3da-f82f12c60baf)

In edit mode (Line):


![image](https://github.com/user-attachments/assets/4c9f89c6-a30e-4f40-84fe-3fff306358aa)


@Aurelie-Jallut Do you want to make suggestion on what to show or not in
this menu, depending on the context (feature or not, preview or edit
mode) ?
2024-10-04 16:34:06 +02:00
Yohan Boniface
a2d0d14857
feat: allow to search by code INSEE in communes importer (#2188)
Otherwise when searching for a very commun name (like "Saint-Paul"), one
may not find the right one among the x returned results.

![Screenshot from 2024-10-03
16-59-39](https://github.com/user-attachments/assets/662c0d13-2c85-4159-b37e-19247bf838b8)


![Screenshot from 2024-10-03
16-53-49](https://github.com/user-attachments/assets/a19c405c-ea2b-4359-9db1-95101fb6012d)

![Screenshot from 2024-10-03
17-00-55](https://github.com/user-attachments/assets/65705a87-ee24-4e50-acbb-069565a70c75)
2024-10-04 15:47:15 +02:00
David Larlet
5185cc56a9
docs: Display Grist data in uMap
Based on work from @C-Sophie and @ybon

Also, explicit admonition icons for French instance and OSM instance.

Closes #2173
2024-10-03 16:47:11 -04:00
Yohan Boniface
f1619579a4 feat: allow to search by code INSEE in communes importer 2024-10-03 18:03:43 +02:00