Yohan Boniface
16fd5d8ca3
wip: typo
2024-06-14 18:38:30 +02:00
Yohan Boniface
342dcbabbe
wip: no need for AVAILABLE_IMPORTERS
2024-06-14 18:38:30 +02:00
Yohan Boniface
f5eea1fe3f
wip(naming): replace "plugin" by "importer"
...
We are not ready yet to talk about plugins
2024-06-14 18:38:30 +02:00
Yohan Boniface
93a189497b
wip: control plugins from settings
2024-06-14 18:38:29 +02:00
Yohan Boniface
a7a214d7fe
wip: deal with boundary types in geodatamine importer
2024-06-14 18:38:29 +02:00
Yohan Boniface
03ce8e90d6
wip: refactor importer
2024-06-14 18:38:29 +02:00
Yohan Boniface
c7cd87ec8a
wip: move presets to importer plugins
2024-06-14 18:38:29 +02:00
Yohan Boniface
b657a5e9b3
wip: simpler importer API
2024-06-14 18:38:29 +02:00
Yohan Boniface
1e4de02694
wip: add a basic importer for commune shapes
...
Mainly wanted to have two improters to play with, in order to
better understand the common part, and thus the API we may define
between them and the importer panel.
2024-06-14 18:38:29 +02:00
Yohan Boniface
5b914c1bd2
wip: make it simpler to create an autocomplete class
2024-06-14 18:38:29 +02:00
Yohan Boniface
e51347e239
wip: very naive geodatamine and communes importers
2024-06-14 18:38:29 +02:00
Yohan Boniface
22ccd61d87
chore: remove empty help entry inclusion
2024-06-14 18:30:32 +02:00
Yohan Boniface
191fb6d853
chore: reviewing labels with Aurélie
2024-06-14 18:24:56 +02:00
Yohan Boniface
59dbde4f32
chore: make browser labels consistent
2024-06-14 18:24:54 +02:00
Yohan Boniface
d407949138
chore: be more explicit on browser modes
2024-06-14 18:24:10 +02:00
Yohan Boniface
e023321ee5
Merge pull request #1895 from umap-project/request-error-alert
...
fix: display an alert on any request error
2024-06-14 18:22:54 +02:00
Yohan Boniface
713be1538c
chore: change alert CSS sizing
2024-06-14 18:21:44 +02:00
David Larlet
eda3823b3a
Merge pull request #1896 from umap-project/better-alerts
...
chore: overall alerts improvements
2024-06-14 11:51:46 -04:00
Yohan Boniface
7e86bc6db8
wip: do not display alerts from the maps in a content list page
2024-06-14 17:51:42 +02:00
Yohan Boniface
a2ba35cb93
Merge pull request #1894 from umap-project/fix-feature-edit-icon
...
fix: use correct icon class in edit feature panel
2024-06-14 17:31:42 +02:00
David Larlet
fb1407cdbf
chore: overall alerts improvements
2024-06-14 11:08:59 -04:00
Yohan Boniface
15de486425
fix: use correct icon class in edit feature panel
2024-06-14 15:31:16 +02:00
Yohan Boniface
d221a98e78
fix: display an alert on any request error
...
This used to be the case, but was changed by mistake in the
request refactor (swicht from xhr)
2024-06-14 15:24:01 +02:00
b94995120a
refactoring(sync): Simplify the design of the sync engine.
...
Removes the concept of message dispatcher and message sender, all of
it can be done by the syncengine class, making it easier to grasp.
2024-06-14 00:20:59 +02:00
Yohan Boniface
e968261dff
wip: fix more tests
2024-06-13 20:53:07 +02:00
Yohan Boniface
897d4f22f4
chore(tests): make sure we send a valid geojson when data is empty
2024-06-13 20:52:28 +02:00
David Larlet
b863beaec9
chore: fix tests
2024-06-13 14:13:42 -04:00
David Larlet
802d5d9d6c
chore: set default language for tests as en-GB
2024-06-13 13:41:00 -04:00
David Larlet
b197e067e8
fix: listen to the correct event for conflicts
2024-06-12 19:06:28 -04:00
David Larlet
8400b55b9d
chore: direct import of the Alert class in modules
2024-06-12 18:30:40 -04:00
David Larlet
cea2aee88f
chore: rename alert choice to conflict + CSS vars
2024-06-12 18:15:28 -04:00
David Larlet
10e398d222
chore: better alerts CSS
2024-06-12 18:03:05 -04:00
David Larlet
6cb1be1fd4
chore: use direct import for ServerRequest in alerts
2024-06-12 18:03:05 -04:00
David Larlet
ddaafa8cda
chore: scroll when the help box is too big
2024-06-12 18:03:05 -04:00
David Larlet
c0ecc39439
chore: uniformize buttons across panels and alerts
2024-06-12 18:03:05 -04:00
David Larlet
e1f91b393d
chore: do not display zoom alert on save
2024-06-12 18:03:05 -04:00
David Larlet
6bbdec49bf
chore: refactor web components with templates
2024-06-12 18:03:04 -04:00
David Larlet
6f715c109b
chore: improve message/choice in case of conflicts
2024-06-12 18:03:04 -04:00
David Larlet
5c2528900e
chore: Use web components to display alerts + a11y roles
2024-06-12 18:03:04 -04:00
Yohan Boniface
8967ab5901
whore: prettier
2024-06-11 14:12:33 +02:00
Yohan Boniface
50ef073d36
Merge pull request #1883 from umap-project/remove-u-keys
...
chore: remove U.Keys, and refactor global shorcuts
2024-06-07 18:35:49 +02:00
fc2de3fc53
tests(sync): Change the way the websocket server is run in the tests
...
Using [pytest-xprocess](https://pytest-xprocess.readthedocs.io/ ) proved
not being as useful as I thought at first, because it was causing
intermitent failures when starting the process.
The code now directly uses `subprocess.popen` calls to start the server.
The tests are grouped together using the following decorator:
`@pytest.mark.xdist_group(name="websockets")`
Tests now need to be run with the `pytest --dist loadgroup` so that all
tests of the same group happen on the same process.
More details on this blogpost:
https://blog.notmyidea.org/start-a-process-when-using-pytest-xdist.html
2024-06-07 18:21:30 +02:00
98a7a56701
refactor(sync): rename ws.py
to websocket_server.py
...
Hopefully this is clearer :-)
2024-06-07 18:21:30 +02:00
f42498d195
refactor(sync): Sync layers creation with map.createDataLayer
utility.
...
Rather than having it done inside the datalayer itself. This gives us
more control.
2024-06-07 18:21:30 +02:00
149a0c1680
refactor: rename geometrytoFeatures
to geoJSONToLeaflet
...
Because we are dealing with technologies using overlapping vocabulary,
it is easy to get lost. Hopefully this change makes it clear that it
converts geoJSON inputs in Leaflet / uMap objects.
2024-06-07 18:21:30 +02:00
137cc21af2
feat(sync): Add a proxy to the SyncEngine
objects.
...
It is now possible to create proxy objects using `sync_engine.proxy(object)`.
The returned proxy object will automatically inject `metadata` and
`subject` parameters, after looking for them in the `getSyncMetadata`
method (these are only known to the synced objects).
As a result, the calls are now simplified:
```
this.sync.update("key", "value")
```
2024-06-07 18:21:30 +02:00
4e7ac23b53
refactor(sync): remove formbuilder this._redraw()
callbacks.
...
They are now handled in the `render()` call, so there is no more need
for them here.
2024-06-07 18:21:30 +02:00
5247bf77d3
refactor(sync): Remove syncUpdateProperties
function.
...
The function was only used once, so removing it simplified the whole
flow.
2024-06-07 18:21:30 +02:00
d3730a99ff
fix: use array.includes(string)
the proper way.
...
Because this `syncUpdatedProperties` function is only called once, it
didn't trigger any issue in practice (as the check was always returning
true).
2024-06-07 18:21:30 +02:00
d91c86e7fa
feat(websockets): run the WS server as a django management command.
...
This allows to handle the loading of the settings in a consistant way,
and aditionnaly to provide a way to override the `WEBSOCKET_BACK_HOST`
and `WEBSOCKET_BACK_PORT` settings with arg commands `--host` and
`--port`.
Without this change, because of how we are currently loading our
settings, we would require the settings the be exposed by the
`umap.settings.__init__` file.
Previous implementations were exposing these settings, with the
following code:
```python
settings_as_dict = {k: v for k, v in globals().items() if k.isupper()}
```
2024-06-07 18:21:30 +02:00