Commit graph

3015 commits

Author SHA1 Message Date
Yohan Boniface
c0f7e9d50d 2.9.1
Some checks are pending
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
Test & Docs / lint (push) Waiting to run
2025-03-03 18:40:47 +01:00
Yohan Boniface
34259f6234 i18n 2025-03-03 18:39:08 +01:00
Yohan Boniface
284ca8fd9c chore: be more persuasive in deprecating twitter login backend
- always redirect user from map to their profile page when they
  used a deprecated backend to log in
- change the Twitter image to make clear it is to be removed

Co-authored-by: David Larlet <david@larlet.fr>
2025-03-03 18:24:23 +01:00
Yohan Boniface
2cf3a4e6a3 fix: honour error status in alerts
Co-authored-by: David Larlet <david@larlet.fr>
2025-03-03 16:48:44 +01:00
Yohan Boniface
bc1eaa05c9 chore: use a French quote in translation
To prevent escape from Django, as we then use it in a textContent
property for alerts.

Co-authored-by: David Larlet <david@larlet.fr>
2025-03-03 16:47:48 +01:00
Yohan Boniface
ce024d57fd 2.9.0
Some checks are pending
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
Test & Docs / lint (push) Waiting to run
2025-03-03 15:49:27 +01:00
David Larlet
5eab942f25
a11y: switch to better contrasted links (#2532)
And underline for external links otherwise the new green color is too
close to the text one to clearly identify links.
2025-03-03 09:36:50 -05:00
Yohan Boniface
9e791a0ab4
fix: feature edit status not disabled on hide (#2534) 2025-03-03 15:34:49 +01:00
Yohan Boniface
26fe653456 i18n 2025-03-03 15:13:03 +01:00
David Larlet
ea58f93940
a11y: update URLs and (underlined) styles for help 2025-03-03 09:10:37 -05:00
Yohan Boniface
436c083744 fix: feature edit status not disabled on hide 2025-03-03 15:09:34 +01:00
Yohan Boniface
ea00d4fc32 chore: remove _marked_for_deletion pattern
We think it's useless now that we use "editable:edited" event everywhere
(vs using the "editable:commit" which was triggered also after a delete,
when closing the edit panel)
2025-03-03 15:09:07 +01:00
David Larlet
abe49cc1ba
a11y: turn embeded maps into inert elements
One of the side-effects is to make the content of the map un-focusable but we also loose the ability to interact with the map itself.
2025-02-28 16:18:28 -05:00
David Larlet
4f5d37b676
a11y: switch to better contrasted links
And underline for external links otherwise the new green color is too close to the text one to clearly identify links.
2025-02-28 14:05:26 -05:00
David Larlet
949a266437
a11y: set an aria-label for unlabelled search input 2025-02-28 13:58:40 -05:00
Yohan Boniface
48daa0a77f fix: do not show tooltip with only spaces
Some checks failed
Test & Docs / tests (postgresql, 3.10) (push) Has been cancelled
Test & Docs / tests (postgresql, 3.12) (push) Has been cancelled
Test & Docs / lint (push) Has been cancelled
Co-authored-by: David Larlet <david@larlet.fr>
2025-02-27 19:28:38 +01:00
Yohan Boniface
ba20f5791c fix: shift-click on a path should toggle edit
This was broken in 4adc558560

Co-authored-by: David Larlet <david@larlet.fr>
2025-02-27 19:21:43 +01:00
Yohan Boniface
0fe2103b71 chore: bump Leaflet.Editable and DOMPurify 2025-02-27 17:12:02 +01:00
Yohan Boniface
14e90a1a0f
feat: add a quick link to layer's permalink (#2529)
This will open a new page with only this given layer shown.


![image](https://github.com/user-attachments/assets/4db637b9-03f4-4b05-9ce3-6656aba11786)
2025-02-27 15:36:45 +01:00
Yohan Boniface
e919c5f168
fix(sync): make datalayer upsert idempotent (#2528)
That fix does not really fix the original issue, but it makes it
impactless, and I think it's safer anyway to have upsert idempotent.

The pattern to reproduce is:
- peer A create a synced map, add a datalayer, save it
- peer B loads the map, click on edit
- at this time, peer B have twice the datalayer data, once from the
server AND once from the sync

So a better fix would be to make that peer B send a meaningfull HLC to
peer A I guess.
For this we may save the last HLC is the map properties, or maybe try to
merge the "reference_version" and the HLC.
2025-02-27 15:32:09 +01:00
Yohan Boniface
b1076dcb7b
fix: make sure we sync a line when hitting esc while drawing (#2526)
I first tried to handle this on Leaflet.Editable side, to make it fire
the "editable:edited" event we use to trigger the sync, but deciding
what to do with a feature on escape needs some decisions that seems hard
to implement in a generic way in Leaflet.Editable.
We call stopDrawing, which then calls cancelDrawing, so here one need to
decide if cancelDrawing should keep the already drawn line (but cancel
the point being drawn) or cancel everything.
This is why I end up making this change in uMap itself.
2025-02-27 15:26:54 +01:00
Yohan Boniface
69ca89a6ba
fix: prevent client to open two websocket connections (#2524)
To reproduce:
- create a map
- saved it
- change the "syncEnabled" setting to on
- save again
- open another tab with this map
- switch on edit mode

In this case, the second client will try to authenticate:
- once switch on edit mode
- and once receiving the operation message from peer A about the
syncEnabled (which calls render, which calls initSyncEngine in in this
case)

I think we want to keep render to call initSyncEngine, so if a map owner
switch off the syncEnabled setting, this will (should) disconnect the
other peers.
2025-02-27 15:20:16 +01:00
Yohan Boniface
df0faa75aa feat: add a quick link to layer's permalink
This will open a new page with only this given layer shown.
2025-02-26 15:38:48 +01:00
Yohan Boniface
b400ade44b fix(sync): make datalayer upsert idempotent
That fix does not really fix the original issue, but it make it impactless.

The pattern is:
- peer A create a synced map, add a datalayer, save it
- peer B loads the map, click on edit
- at this time, peer B have twice the datalayer data, once from the server
  AND once from the sync

So a better fix would be to make that peer B send a meaningfull HLC to
peer A I guess.
For this we may save the last HLC is the map properties, or maybe try
to merge the "reference_version" and the HLC.
2025-02-26 11:55:21 +01:00
Yohan Boniface
dc35039af8 chore: do not try to disconnect ws if not connected
cf https://umap.sentry.io/issues/6331841272/
2025-02-26 09:41:03 +01:00
Yohan Boniface
9858fc2190 fix: make sure we sync a line when hitting esc while drawing
I first tried to handle this on Leaflet.Editable side, to make
it fire the "editable:edited" event we use to trigger the sync,
but deciding what to do with a feature on escape needs some
decisions that seems hard to implement in a generic way in
Leaflet.Editable.
We call stopDrawing, which then calls cancelDrawing, so here
one need to decide if cancelDrawing should keep the already
drawn line (but cancel the point being drawn) or cancel
everything.
This is why I end up making this change in uMap itself.
2025-02-25 17:17:49 +01:00
Yohan Boniface
5ddd973eae fix: prevent client to open two websocket connections
To reproduce:
- create a map
- saved it
- change the "syncEnabled" setting to on
- save again
- open another tab with this map
- switch on edit mode

In this case, the second client will try to authenticate:
- once switch on edit mode
- and once receiving the operation message from peer A about the
  syncEnabled (which calls render, which calls initSyncEngine in
  in this case)

I think we want to keep render to call initSyncEngine, so if a map
owner switch off the syncEnabled setting, this will (should) disconnect
the other peers.
2025-02-25 08:33:14 +01:00
Yohan Boniface
ab571925ff chore: use template for layer advanced buttons 2025-02-24 17:19:46 +01:00
Yohan Boniface
a70e608e42 chore: use template for map advanced buttons 2025-02-24 17:05:54 +01:00
Yohan Boniface
fcac4df30b
chore: use our contexmenu class for inplace toolbar (#2510)
Some checks failed
Test & Docs / tests (postgresql, 3.10) (push) Has been cancelled
Test & Docs / tests (postgresql, 3.12) (push) Has been cancelled
Test & Docs / lint (push) Has been cancelled
And remove Leaflet.Toolbar dependency.
This also teach ContextMenu how to display icons instead of text and how
to render in horizontal orientation instead of vertical.

Before:

![image](https://github.com/user-attachments/assets/196b17c4-ec6c-4023-b5bf-32033caf4408)

After:


![image](https://github.com/user-attachments/assets/29ad8628-01a6-4028-a99a-bc679c5db18d)

We've lost the bottom tip in the process, should I add this to the
ContextMenu class ?

Also, the automatic border for the focused button is a bit noisy imho,
not sure how to deal with that.
2025-02-14 17:25:13 +01:00
Yohan Boniface
b107de3421
fix(sync): wait for websocket full connection (#2503)
Websocket has now a "connect" method, which is a promise, that yields
"onconnect", so the engine can wait for it before proceding.
2025-02-14 17:22:57 +01:00
Yohan Boniface
b86db00e88
fix(sync): try to reconnect after network error when getting token (#2502)
Otherwise, if the token request fail, the process will be stopped and we
will never try to reconnect.
2025-02-14 17:22:41 +01:00
Yohan Boniface
244e637acc
chore: sync save state (#2487)
When a peer save the map, other peers in dirty state should not need to
save the map anymore.

That implementation uses the lastKnownHLC as a reference, but it changes
all dirty states at once. Another impementation could be to have each
object sync its dirty state, but in this case we do not have a HLC per
object as reference, and it also creates more messages.

ping @almet if you're around and wanna have a fresh look. :)
2025-02-14 17:17:59 +01:00
Yohan Boniface
c00de1a457
fix: use default value from schema for non inheritable fields (#2513)
Eg. moreControl
2025-02-14 17:17:15 +01:00
Yohan Boniface
48b4d61cd0 chore: add an hover on dark context menu buttons
Co-authored-by: David Larlet <david@larlet.fr>
2025-02-14 17:16:35 +01:00
Yohan Boniface
b90328f65e
feat: make vertex icons bigger (and round) (#2506)
Before:
![Screenshot From 2025-02-11
13-59-40](https://github.com/user-attachments/assets/013998f1-d9f7-4129-95b8-0ab969eee018)

After:
![Screenshot From 2025-02-11
13-59-12](https://github.com/user-attachments/assets/7d279db3-3fe2-41cb-bdc4-9255f625895d)

(Size unchanged on mobile)

cf #673
2025-02-14 16:52:54 +01:00
Yohan Boniface
2089d3b0c6 fix: use default value from schema for non inheritable fields
Eg. moreControl

Co-authored-by: David Larlet <david@larlet.fr>
2025-02-14 16:44:11 +01:00
Yohan Boniface
52b4244333 chore: add missing default values in schema 2025-02-14 16:03:15 +01:00
Yohan Boniface
1b3852d0e8 i18n 2025-02-14 16:03:05 +01:00
Yohan Boniface
20b1dd6f26 i18n
Some checks are pending
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
Test & Docs / lint (push) Waiting to run
2025-02-14 15:38:31 +01:00
Yohan Boniface
4adc558560 chore: use our contexmenu class for inplace toolbar
And remove Leaflet.Toolbar dependency.
This also teach ContextMenu how to display icons instead of
text and how to render in horizontal orientation instead of
vertical.
2025-02-12 14:59:43 +01:00
Yohan Boniface
04966cc068 feat: make the tooltip sticky in hover mode for paths
Until now, it was displayed on the path (line or polygon)
"center". So when zoomed in, if the center is not on the
screen, the tooltip will not be visible.
2025-02-11 15:51:43 +01:00
Yohan Boniface
c71a6aafdb
fix: do not display an error for an empty CSV (#2505)
Some checks are pending
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
Test & Docs / lint (push) Waiting to run
fix #577
fix #2491
fix #1546
2025-02-11 15:00:16 +01:00
Yohan Boniface
008a996bea feat: make vertex icons bigger (and round) 2025-02-11 14:00:09 +01:00
Yohan Boniface
8e13a15645 fix: do not display an error for an empty CSV
fix #577
fix #2491
fix #1546
2025-02-11 13:45:40 +01:00
Yohan Boniface
414cc805c2 fix(sync): wait for websocket full connection
Websocket has now a "connect" method, which is a promise,
that yields "onconnect", so the engine can wait for it before
proceding.
2025-02-11 13:26:27 +01:00
Yohan Boniface
1ce491a70c fix(sync): try to reconnect after network error when getting token 2025-02-11 13:03:06 +01:00
Yohan Boniface
f0e87bab83
Fix broken showLabel=null (on hover) (#2490)
Broken since c27e675152
2025-02-11 12:14:52 +01:00
Yohan Boniface
c5417178c4 fix: "null" value was not honoured in showLabel field 2025-02-11 11:48:01 +01:00
Yohan Boniface
aea422a247
feat: add title attribute to layers in browser (#2489)
Some checks are pending
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
Test & Docs / lint (push) Waiting to run
Test & Docs / docs (push) Waiting to run
Usefull when the layer title is truncated because too long.


![image](https://github.com/user-attachments/assets/267a4639-e929-4be9-8934-373afb24b6fe)


![image](https://github.com/user-attachments/assets/0c8953df-77a5-4b7f-93b3-92bf9d7894ff)
2025-02-10 17:17:55 +01:00
Yohan Boniface
9b01a4b77a chore: read datalayer metadata from file if missing in DB
When we introduced the DataLayer.settings property, we did not run
a migration for existing datalayers (because there are millions in the
French server).
Now that we simplified the `DataLayer.isLoaded()` logic in the client,
we want to be sure that created DataLayer on the client have full
metadata.

Co-authored-by: David Larlet <david@larlet.fr>
2025-02-10 16:56:15 +01:00
Yohan Boniface
a8e18c167c chore: no need to reset datalayer._needsFetch after a save
It is reset only after loading the layer data.

Co-authored-by: David Larlet <david@larlet.fr>
2025-02-10 16:30:00 +01:00
Yohan Boniface
175e27a535 chore: remove DataLayer._dataloaded in favor of isLoaded()
At the end, we only need two states: has this datalayer loaded the
data it should load ? yes / no.
Whether it local or remote data should not be a matter.
2025-02-10 15:44:41 +01:00
Yohan Boniface
ba0582deb1 chore: refactor layer.isLoaded() 2025-02-10 13:13:56 +01:00
Yohan Boniface
9fe744573c feat: add title attribute to layers in browser
Usefull when the layer title is truncated because too long.
2025-02-10 09:41:16 +01:00
Yohan Boniface
64068af393 fix: do not save "null" instead of null for showLabel 2025-02-07 21:56:02 +01:00
Yohan Boniface
6793a6bdc7 fix: do not modify schema while iterating on it 2025-02-07 21:50:11 +01:00
Yohan Boniface
c7681c0304 chore: smaller star button and invert author and dates
Also make created/modified lower case on caption.

cf #2424
cf #2442
2025-02-07 19:00:30 +01:00
Yohan Boniface
eca7ad4772 fixup: prevent to reload a datalayer after other peer has saved it
The scenario to reproduce is:
- peer A creates a datalayer
- peer B add a marker on that datalayer
- peer B saves the datalayer

Before this fix, after the save, peer A would get a new _referenceVersion
for this datalayer, and the render method would make a hide/show,
which would refetch the data from the server, duplicating it.
So forcing the _loaded to be true in this situation prevent this.

We may want to rework the "_loaded" pattern, maybe with the server
returning in a datalayer metadata the length of the data it get for
this given datalayer, so the client knows if it is worth getting
data for a layer when itself (the client) does not have any.

Co-authored-by: David Larlet <david@larlet.fr>
2025-02-07 17:58:27 +01:00
Yohan Boniface
a172c4abea fixup: do not try to sync saved state when not in sync mode
Co-authored-by: David Larlet <david@larlet.fr>
2025-02-07 17:53:48 +01:00
Yohan Boniface
b8db07a4ce chore: sync save state
When a peer save the map, other peers in dirty state should not need
to save the map anymore.

That implementation uses the lastKnownHLC as a reference, but it changes
all dirty states at once. Another impementation could be to have each
object sync its dirty state, but in this case we do not have a HLC per
object as reference, and it also creates more messages.

Co-authored-by: David Larlet <david@larlet.fr>
2025-02-07 16:47:45 +01:00
Yohan Boniface
76c13a61a6 fixup: do not show empty helpText for editors and owner fields 2025-02-07 15:35:49 +01:00
Yohan Boniface
ad51f674ef
fix: do not import empty features (#2485) 2025-02-07 15:26:42 +01:00
Yohan Boniface
009b32c818 fix: do not sync twice a point move 2025-02-07 10:08:58 +01:00
Yohan Boniface
c5ee9fc283
chore: use editable-edited event to sync changes (#2478)
Some checks are pending
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
Test & Docs / lint (push) Waiting to run
Test & Docs / docs (push) Waiting to run
This is more unified between markers and paths, and it allows paths to
be synced as soon as they have been drawn (instead of when closing the
edit panel, which created a race condition when changing its properties
that were then synced to other while the feature itself was not).
2025-02-07 09:12:45 +01:00
Yohan Boniface
9af74b0a4e fix: do not import empty features 2025-02-07 09:11:16 +01:00
David Larlet
fb03c6a39e
feat: Expose teams in users’ CSV export (#2484)
Some checks are pending
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
Test & Docs / lint (push) Waiting to run
Test & Docs / docs (push) Waiting to run
2025-02-06 11:50:52 -05:00
Yohan Boniface
a1372b5f4d
chore: move DrawToolbar and SettingsToolbar to bar.js module (#2482)
This also:
- change the "set center and zoom" to be a panel instead of a direct
action (including the "defaultView" setting
- refactor the "get started dialog"

This is a first step to remove our dependency to the unmaintained
Leaflet.Toolbar plugin.


![image](https://github.com/user-attachments/assets/d9a76df1-0392-45c8-9a2f-f1a2995754d1)


![image](https://github.com/user-attachments/assets/7f40e2f5-c816-4086-9a16-b792621948de)


![image](https://github.com/user-attachments/assets/a02fd480-c50b-4d2d-9919-ca483c1c8def)

The mockup on figma glues the edit toolbar to the edit panel, but I
didn't not implement this as I don't know how to make it work in
portrait/mobile view. This step is mainly a code refactor.
2025-02-06 17:28:43 +01:00
David Larlet
17b8d73978
feat: Expose teams in users’ CSV export
Co-authored-by: Yohan Boniface <yohanboniface@free.fr>
2025-02-06 11:26:47 -05:00
David Larlet
519302b53d
fix: Do not error when escape during marker creation
Co-authored-by: Yohan Boniface <yohanboniface@free.fr>
2025-02-06 11:14:58 -05:00
David Larlet
cbe50a0112
fixup: back to original dark grey
Co-authored-by: Yohan Boniface <yohanboniface@free.fr>
2025-02-06 11:02:38 -05:00
David Larlet
b214f4109c
fixup: restore help contents and fix button icon
Co-authored-by: Yohan Boniface <yohanboniface@free.fr>
2025-02-06 10:28:05 -05:00
David Larlet
e8e06da149
fix: consistent border radius for edit bar
Co-authored-by: Yohan Boniface <yohanboniface@free.fr>
2025-02-06 10:05:55 -05:00
David Larlet
0451b4a882
chore: highlight bar buttons according to open panel
Co-authored-by: Yohan Boniface <yohanboniface@free.fr>
2025-02-06 10:02:32 -05:00
Yohan Boniface
99db1c82f4 chore: move DrawToolbar and SettingsToolbar to bar.js module
This also:
- change the "set center and zoom" to be a panel instead of
  a direct action (including the "defaultView" setting
- refactor the "get started dialog"

This is a first step to remove our dependency to the unmaintained
Leaflet.Toolbar plugin.
2025-02-06 12:26:58 +01:00
Yohan Boniface
3e4601c7a3 chore: use logging.debug instead of print for sync debugging 2025-02-05 09:57:58 +01:00
Yohan Boniface
b35740b029
fix: error after deleting a path that was previously moved (#2479)
Some checks are pending
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
Test & Docs / lint (push) Waiting to run
Test & Docs / docs (push) Waiting to run
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
When moving a path, this will put a once time listener on "moveend". If
we delete this feature, and move the map, we should not execute the
event callback.

A better fix would be to cancel the event listener on delete, but that
is much more work given how we deal with Leaflet events right now.
2025-02-04 18:00:09 +01:00
Yohan Boniface
c985cb3de5 fix: error after deleting a path that was previously moved
When moving a path, this will put a once time listener on "moveend".
If we delete this feature, and move the map, we should not execute the
event callback.

A better fix would be to cancel the event listener on delete, but that
is much more work given how we deal with Leaflet events right now.
2025-02-04 17:40:49 +01:00
Yohan Boniface
a48513fcd7
chore: make redis python dep optional (#2470) 2025-02-04 16:38:24 +01:00
Yohan Boniface
79352d8a82 chore: use editable-edited event to sync changes
This is more unified between markers and paths, and it allows paths to
be synced as soon as they have been drawn (instead of when closing the
edit panel, which created a race condition when changing its properties
that were then synced to other while the feature itself was not).
2025-02-04 16:36:14 +01:00
Yohan Boniface
9606bd864b fix: center "Plus" button 2025-02-04 11:45:28 +01:00
Yohan Boniface
432a0a182d i18n
Some checks are pending
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
Test & Docs / lint (push) Waiting to run
Test & Docs / docs (push) Waiting to run
2025-01-31 19:05:22 +01:00
Yohan Boniface
545770dfb9 chore: make redis python dep optional 2025-01-31 18:55:55 +01:00
Yohan Boniface
c5478fa8d3 2.9.0b0 2025-01-31 18:44:01 +01:00
Yohan Boniface
74f81f9894 i18n 2025-01-31 18:37:18 +01:00
Yohan Boniface
1f66377104 fix: show user URL in remote data loading error
Instead of the proxied one, which is less readable and actionable for
the user reading the alert message.
2025-01-31 18:25:20 +01:00
Yohan Boniface
a442e56cbc fixup: use correct delete function for DataLayer
Some checks are pending
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
Test & Docs / lint (push) Waiting to run
Test & Docs / docs (push) Waiting to run
2025-01-31 17:28:09 +01:00
Yohan Boniface
718cc919f8
fix: do not try to backup an undefined geojson (#2468)
This occurs when a remote data returns an invalid geojson.
2025-01-31 17:18:43 +01:00
Yohan Boniface
aa25398a62
feat: display a more descriptive alert on invalid geojson error (#2466) 2025-01-31 17:16:44 +01:00
Yohan Boniface
18ff0de872
fix: clear previous alert timeout when opening a new alert (#2467)
Otherwise, when an infinite alert replace an alert with a finite
duration, this first alert timeout will close the second alert.
2025-01-31 17:16:27 +01:00
Yohan Boniface
37ecea0799 feat: display a more descriptive alert on invalid geojson error
Co-authored-by: David Larlet <david@larlet.fr>
2025-01-31 17:08:35 +01:00
Yohan Boniface
e38e0f162c fix: do not try to backup an undefined geojson
This occurs when a remote data returns an invalid geojson.

Co-authored-by: David Larlet <david@larlet.fr>
2025-01-31 16:47:17 +01:00
Yohan Boniface
bcd69ccb47 fix: clear previous alert timeout when opening a new alert
Otherwise, when an infinite alert replace an alert with a finite duration,
this first alert timeout will close the second alert.

Co-authored-by: David Larlet <david@larlet.fr>
2025-01-31 16:42:38 +01:00
Yohan Boniface
2162aaf930 fix: only allow to set a map as sync when it is already saved 2025-01-31 15:45:55 +01:00
Yohan Boniface
3e9982c8cb
Sync show usernames (#2444)
Some checks are pending
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
Test & Docs / lint (push) Waiting to run
Test & Docs / docs (push) Waiting to run
fix #2267
2025-01-31 06:56:46 +01:00
David Larlet
1eb1f320db
chore: iterate on tooltips design 2025-01-30 14:15:56 -05:00
Yohan Boniface
a18b240c65 fix: catch cluster error at zoom in certain situation
Eg. to reproduce: a map with a limitBounds that makes uMap immediately
zoom to fit the bbox.

Co-authored-by: David Larlet <david@larlet.fr>
2025-01-30 18:40:05 +01:00
David Larlet
e6db23d4d3
fix: better buttons positionning for the homepage (#2463) 2025-01-30 11:35:40 -05:00
Yohan Boniface
5ae83a571b
feat: add DEPRECATED_AUTHENTICATION_PROVIDERS setting (#2461)
Some checks are pending
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
Test & Docs / lint (push) Waiting to run
Test & Docs / docs (push) Waiting to run
![image](https://github.com/user-attachments/assets/00a55dfa-2e41-40bf-a6aa-bf70903645e4)
2025-01-30 17:15:53 +01:00
Yohan Boniface
be1fa55e9b
fix: allow to set choices for a nullablechoices field (#2462)
fix #2380
2025-01-30 17:14:27 +01:00
David Larlet
ac607370d0
a11y: include site description within page titles (#2455)
This is not the same as the short `SITE_NAME` which is displayed as the
title of the (home)page for instance.

The plan is to set `SITE_DESCRIPTION` as `uMap OpenStreetMap` for the
OSM instance and `uMap agents publics` for the ANCT one.
2025-01-30 10:45:22 -05:00
David Larlet
44aa914658
a11y: include site description within page titles
This is not the same as the short SITE_NAME which is displayed as the title of the (home)page for instance.
2025-01-30 10:36:31 -05:00
David Larlet
0e5cdec97e
fix: better buttons positionning for the homepage 2025-01-30 10:16:09 -05:00
Yohan Boniface
c27e675152 fix: allow to set choices for a nullablechoices field
fix #2380
2025-01-30 14:55:11 +01:00
Yohan Boniface
ee1a87cdeb feat: add DEPRECATED_AUTHENTICATION_PROVIDERS setting 2025-01-30 11:04:02 +01:00
Yohan Boniface
96895feea0
fix: display current configured oauth as icon instead of text (#2375)
Before:


![image](https://github.com/user-attachments/assets/b71d78c0-2a11-4d2e-adf5-2f23ccfd6b2e)


After:


![image](https://github.com/user-attachments/assets/35d3494c-275a-42b6-b646-6e025b03d7c5)
2025-01-30 11:03:21 +01:00
Yohan Boniface
359b0b41ca chore: make djlint happy 2025-01-30 09:45:56 +01:00
Yohan Boniface
3aa42d6f0f
feat: soft delete datalayers (#2459)
When deleting a datalayer, it will now be moved to a state "deleted",
and it will only be deleted for real when running the command `umap
empty_trash`.

This is what we already do for the map itself, but until now if a user
deleted a only a datalayer by mistake (not the map itself) it could not
retrieve it.
2025-01-30 09:19:58 +01:00
Yohan Boniface
f0751ec5dd fix: correctly parse http link including another http link in the path
fix #2457
2025-01-29 20:23:43 +01:00
Yohan Boniface
fd8a1971f8 feat: soft delete datalayers
When deleting a datalayer, it will now be moved to a state "deleted", and
it will only be deleted for real when running the command `umap empty_trash`.

This is what we already do for the map itself, but until now if a user
deleted a only a datalayer by mistake (not the map itself) it could not retrieve
it.
2025-01-29 19:08:59 +01:00
Yohan Boniface
a3baf82b7b chore(templates): use images for oauth providers list
Co-authored-by: David Larlet <david@larlet.fr>
2025-01-27 19:04:13 +01:00
Yohan Boniface
70f87d8636 feat: add "accent" mode for tooltip, and use it for peers list
Co-authored-by: David Larlet <david@larlet.fr>
2025-01-27 18:43:36 +01:00
Yohan Boniface
bcd21d3697
feat(forms): add a debounce for Input and Textarea fields (#2445)
fix #2415

I'm a bit afraid this will add more hiccup to the playwright tests,
tough :(
2025-01-27 18:40:11 +01:00
Yohan Boniface
49ea7ed4a5 feat(forms): add a debounce for Input and Textarea fields
fix #2415
2025-01-27 17:25:56 +01:00
Yohan Boniface
d20943a487
feat: move star button to caption (#2442)
fix #2282


![image](https://github.com/user-attachments/assets/45fda270-035b-4ec2-9ac1-3e2f2798663b)
![Screenshot From 2025-01-23
10-42-23](https://github.com/user-attachments/assets/ef323c82-bb12-41ef-97e6-b21dfeef01ba)
2025-01-27 17:18:28 +01:00
Yohan Boniface
250579eaa2 chore: better styling for star button in caption panel
Co-authored-by: David Larlet <david@larlet.fr>
2025-01-27 16:50:27 +01:00
Yohan Boniface
60918e6ca5
wip(sync): POC of using Redis for pubsub (#2426)
Some checks are pending
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
Test & Docs / lint (push) Waiting to run
Test & Docs / docs (push) Waiting to run
## TODO

- [x] add expire to peers registry hash in redis, as for now when the
server closes the connection we have extra users (edit: we cleaned
manually, as HEXPIRE is not available in FOSS version of Redis)
- [x] make that the peer uuid is created by the client, so when it
reconnects, it uses the same, and does not create a new one
- [ ] see if we can use a connection_pool
- [x] use dynamic websocket_uri (that must include the map id)
- [x] integrate Redis in playwright tests
2025-01-27 15:58:30 +01:00
Yohan Boniface
d4afd5646f
feat: allow to define sortKey at layer level (#2449)
In some situation, we do not want the same sortKey for each layer.
2025-01-27 10:08:53 +01:00
Yohan Boniface
485bd94531 feat: allow to define sortKey at layer level
In some situation, we do not want the same sortKey for each layer.
2025-01-26 22:20:19 +01:00
Yohan Boniface
8603774778 chore: do not use hx for non structural headings 2025-01-24 18:52:24 +01:00
Yohan Boniface
8f2bbc6765 fix: re-compute layer settings when type changed 2025-01-24 18:24:33 +01:00
Yohan Boniface
d5efe6b8e2 fix: get COLORS from Utils now that it has been moved there 2025-01-24 18:23:41 +01:00
Yohan Boniface
8111cf5522 fix: add a label for default colors scheme in categorized layer type 2025-01-24 18:22:33 +01:00
Yohan Boniface
609b251303 chore: use datalayer.allProperties() instead of private property 2025-01-24 18:21:29 +01:00
Yohan Boniface
29d70552dd fix: always index properties when feature properties as changed
We want the datalayer index properties to be updated when a user set
a property on the feature, as this property name may not yet be in the
index (which is used later for autocomplete, select…).
2025-01-24 18:19:57 +01:00
Yohan Boniface
ea2bdba270
fix: display a more usefull message when error in remote data (#2443)
Some checks failed
Test & Docs / tests (postgresql, 3.10) (push) Has been cancelled
Test & Docs / tests (postgresql, 3.12) (push) Has been cancelled
Test & Docs / lint (push) Has been cancelled
Test & Docs / docs (push) Has been cancelled
fix #2379

![Screenshot From 2025-01-23
11-54-29](https://github.com/user-attachments/assets/b2000003-b9c3-404f-be91-0a9b13f512c2)
2025-01-24 09:09:14 +01:00
Yohan Boniface
22846acb99
fix: fix circle icon no longer hihlighted (#2440)
Some checks are pending
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
Test & Docs / lint (push) Waiting to run
Test & Docs / docs (push) Waiting to run
fix #2429
2025-01-23 18:30:23 +01:00
Yohan Boniface
693e775ca8
fix: keep layer visibility after clicking on toggle all (#2439)
fix #2430

Not exactly sure how to make this DRY. What we want is to mark the layer
visibility as "controlled by user" as soon as they click on a
show/hide/showAll/hideAll button, so we do not try to infer the
visibility from the from/toZoom settings.
2025-01-23 18:29:37 +01:00
Yohan Boniface
62be6450bb feat(sync): show a very minimal list of connected peers
cf #2267

Co-authored-by: David Larlet <david@larlet.fr>
2025-01-23 18:27:47 +01:00
Yohan Boniface
3e3ce0b8f5 fix: better computation of tooltip bottom position
Co-authored-by: David Larlet <david@larlet.fr>
2025-01-23 18:08:04 +01:00
Yohan Boniface
476c160fd5 wip(sync): clean stale username from redis
We wanted to use the HEXPIRE command, but discovered that this command
is only available since the Redis 7.4 version (the latest), and this version
does not have an OSI compliant licence, so it is generally not installable
through common packages managers. The OSS fork is Valkey, but it still does
not have the HEXPIRE command.

So we decide to clean those keys manually, and in order no do this clean
task at each websocket connection, we only do it when we are the first user
to connect to a given map.

Co-authored-by: David Larlet <david@larlet.fr>
2025-01-23 17:20:21 +01:00
Yohan Boniface
0d5e3047f4 wip(sync): only return peers with an active connection 2025-01-23 17:20:21 +01:00
Yohan Boniface
11fb29c456 wip(sync): log but do not crash when sending fail
This should be a race condition when sending to a closed websocket. Let's
log to track them.
2025-01-23 17:20:21 +01:00
Yohan Boniface
ef7c769abe wip(sync): remove a bit of server prints 2025-01-23 17:20:21 +01:00
Yohan Boniface
82342ea00f wip(sync): try a better pattern to unsubscribe to pubsub channels
When publishing a "STOP", this would unsubscribe every listener of the
channel.
2025-01-23 17:20:21 +01:00
Yohan Boniface
7e42331533 wip(sync): add Redis to CI and configure tests settings 2025-01-23 17:20:21 +01:00
Yohan Boniface
a07ee482ce wip(sync): use our async_live_server for websocket related PW tests
As now both http and ws are on the same domain, let's use one test server
able to serve both.

Co-authored-by: David Larlet <david@larlet.fr>
2025-01-23 17:20:20 +01:00
Yohan Boniface
1bf100d7a8 wip(sync): make the client set its peer id 2025-01-23 17:17:16 +01:00
Yohan Boniface
36d9e9bf06 wip(sync): use the correct URL for websocket
Co-authored-by: David Larlet <david@larlet.fr>
2025-01-23 17:17:16 +01:00
Yohan Boniface
acb2e967b8 wip(sync): POC of using Redis for pubsub
Co-authored-by: David Larlet <david@larlet.fr>
2025-01-23 17:17:16 +01:00
Yohan Boniface
ab7119e0a4 wip(sync): use Daphne as live_server for tests
Also clean dependencies.

We still use the channels live server for our tests, but do not use it
anymore for the actual websocket handling.
2025-01-23 17:17:13 +01:00
Yohan Boniface
460a0c9997 wip(sync): only open listen connections after authentication 2025-01-23 17:16:44 +01:00
Yohan Boniface
698c74b427 wip(sync): only save Peer after authentication 2025-01-23 17:16:44 +01:00
Yohan Boniface
a29eae138e wip(sync): websocket server with ASGI and PostgreSQL LISTEN/NOTIFY 2025-01-23 17:16:44 +01:00
Yohan Boniface
31546d6ff4 wip(sync): use django-channels to serve websockets
Co-authored-by: David Larlet <david@larlet.fr>
2025-01-23 17:16:44 +01:00
Yohan Boniface
83c3a41be5 fix: display a more usefull message when error in remote data
fix #2379
2025-01-23 12:04:25 +01:00
Yohan Boniface
48f9afdedd feat: move star button to caption
fix #2282
2025-01-23 11:25:09 +01:00
Yohan Boniface
122d470e31 fix: do not consume ctrl-Z in textarea or input
fix #2422
2025-01-21 18:19:16 +01:00
Yohan Boniface
44dbf2f0df fix: fix circle icon no longer hihlighted
fix #2429
2025-01-21 11:46:57 +01:00
Yohan Boniface
f3b11b03bc fix: keep layer visibility after clicking on toggle all
fix #2430

Not exactly sure how to make this DRY. What we want is to mark the
layer visibility as "controlled by user" as soon as they click on a
show/hide/showAll/hideAll button, so we do not try to infer the
visibility from the from/toZoom settings.
2025-01-21 11:33:08 +01:00
Yohan Boniface
dc5a3a6b62 fix: test failing due to unstable FS ordering between OS 2025-01-20 21:12:06 +01:00
Yohan Boniface
f53d435dfd
chore: internalize FormBuilder (#2420)
Some checks failed
Test & Docs / lint (push) Has been cancelled
Test & Docs / docs (push) Has been cancelled
Test & Docs / tests (postgresql, 3.10) (push) Has been cancelled
Test & Docs / tests (postgresql, 3.12) (push) Has been cancelled
fix #2280 

That's a first step, which:
- internalize Formbuilder as a bunch of modules
- use Javascript classes instead of Leaflet ones
- remove dependencies to Leaflet (L.DomUtil…)
- replaces `L.FormBuilder` by `Form` (in theory generic, but not quite)
and `U.FormBuilder` by `MutatingForm` (knows about isDirty,
`inheritable` and such)

There is much more room for refactor, but let's do it step by step!
2025-01-11 14:29:55 +01:00
Yohan Boniface
07c29abbec chore(utils): use native events instead of array of callbacks for WithEvents
Co-authored-by: David Larlet <david@larlet.fr>
2025-01-10 16:44:48 +01:00
Yohan Boniface
86a8e17aec
fix(sync): handle sync of datalayer delete (#2416)
Some checks are pending
Test & Docs / lint (push) Waiting to run
Test & Docs / docs (push) Waiting to run
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
fix #2268

There is a tricky choice to do: the delete actually occurs in two
times, first the datalayer is hidden from the UI and set as "deleted"
(this can then be undone) then at next "save" it will totally removed.

When syncing, given we removed the "reset/undo" feature for now, and
because it was simpler, I decide to do both step in once.

When working on a proper "undo/redo", we may challenge this choice
again.
2025-01-10 16:34:47 +01:00
Yohan Boniface
75af1a4855 fix(sync): handle sync of datalayer delete
fix #2268

There is a tricky choice to do: the delete actually occurs in two
times, first the datalayer is hidden from the UI and set as "deleted"
(this can then be undone) then at next "save" it will totally removed.

When syncing, given we removed the "reset/undo" feature for now, and
because it was simpler, I decide to do both step in once.

When working on a proper "undo/redo", we may challenge this choice
again.
2025-01-10 16:33:46 +01:00
Yohan Boniface
0c52c35ae3 chore(tests): use name from data when defined in DataLayerFactory 2025-01-10 16:33:06 +01:00
Yohan Boniface
49cde00361
feat: display map's "created at" and "modified at" in the caption (#2424)
fix #2110 


![image](https://github.com/user-attachments/assets/a7db6197-4cc6-417e-b480-8e1434d73687)
2025-01-10 16:23:42 +01:00
Yohan Boniface
e7fe92c070 feat: display map's "created at" and "modified at" in the caption 2025-01-10 15:49:05 +01:00
Yohan Boniface
92b7be3ad9 fix: update map.modified_at when saving a datalayer
fix #2421
2025-01-10 12:01:13 +01:00
Yohan Boniface
0ba69e41d0 wip(forms): use events instead of callback 2025-01-09 13:02:04 +01:00
Yohan Boniface
fb4fecd337 chore(tests): fix sync tests 2025-01-09 13:00:59 +01:00
Yohan Boniface
b6c8d64c47 chore(forms): remove duplicate NullableBoolean field 2025-01-08 16:15:27 +01:00
Yohan Boniface
63e84d94c4 chore(forms): refactor icon preview of IconURL field 2025-01-08 16:14:36 +01:00
Yohan Boniface
176b8bdbcc wip(forms): refactor forms templating 2025-01-07 18:08:48 +01:00
Yohan Boniface
e0fadea749 chore: remove Leaflet dependency from form modules 2025-01-07 18:07:14 +01:00
Yohan Boniface
b88a0cc49f wip: internalize FormBuilder and move to module 2025-01-07 18:07:14 +01:00
Yohan Boniface
ebae9a8cd0
fix(sync): do not try to reconnect after end edit (#2412)
Some checks failed
Test & Docs / docs (push) Has been cancelled
Test & Docs / tests (postgresql, 3.10) (push) Has been cancelled
Test & Docs / tests (postgresql, 3.12) (push) Has been cancelled
Test & Docs / lint (push) Has been cancelled
We now set the "closeRequested" on the receiver itself, otherwise there
is a race condition between the reconnect (which create a new transport)
and the onclose checking closeRequest on an old transport.
2025-01-01 11:31:32 +01:00
Yohan Boniface
ddeebd758c fix(sync): deactivate cancel and hide button when sync is active
cf #2265

Let's reactivate when we have a proper undo-redo (cf #1107)
2024-12-31 14:23:57 +01:00
Yohan Boniface
424cb70ac4 fix(sync): do not try to reconnect after end edit
We now save the "closeRequested" on the receiver itself, other wise
there is a race condition between the reconnect (which create a new
transport) and the onclose checking closeRequest on an old transport.
2024-12-31 14:17:30 +01:00
Yohan Boniface
eb50d8adf4 2.8.2
Some checks failed
Test & Docs / tests (postgresql, 3.10) (push) Has been cancelled
Test & Docs / tests (postgresql, 3.12) (push) Has been cancelled
Test & Docs / lint (push) Has been cancelled
Test & Docs / docs (push) Has been cancelled
2024-12-26 11:24:46 +01:00
Yohan Boniface
7d7ff7066e i18n 2024-12-26 11:23:28 +01:00
Yohan Boniface
48ae4123ec
fix: fix startMarker/Polyline/Polygon on right click (#2403)
fix #2392
2024-12-26 11:02:48 +01:00
Yohan Boniface
f4cb3509b0 fix: fix create marker from search result
cf https://github.com/umap-project/umap/issues/2392#issuecomment-2561151836
2024-12-25 19:36:53 +01:00
Yohan Boniface
ed33b1611a fix: fix startMarker/Polyline/Polygon on right click
fix #2392
2024-12-25 19:33:35 +01:00
Yohan Boniface
52785e22ad 2.8.1
Some checks failed
Test & Docs / tests (postgresql, 3.10) (push) Has been cancelled
Test & Docs / tests (postgresql, 3.12) (push) Has been cancelled
Test & Docs / lint (push) Has been cancelled
Test & Docs / docs (push) Has been cancelled
2024-12-24 09:56:52 +01:00
Yohan Boniface
5dd56a93d6 i18n 2024-12-24 09:47:03 +01:00
David Larlet
18c8258f2c
wip: add a 403.html template (#2396)
Some checks are pending
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
Test & Docs / lint (push) Waiting to run
Test & Docs / docs (push) Waiting to run
fix #2390
2024-12-23 13:36:18 -05:00
David Larlet
a62bcf6d57
fix: do not load all datalayers at once (#2402)
Some maps have dozens, even hundreds of layers
2024-12-23 13:36:04 -05:00
David Larlet
76cad4a24b
chore: lint python imports 2024-12-23 13:16:11 -05:00
Yohan Boniface
f7b4cb252d fix: do not load all datalayers at once
Some maps have dozens, even hundreds of layers

Co-authored-by: David Larlet <david@larlet.fr>
2024-12-23 19:16:09 +01:00
David Larlet
dc85b2461f
chore: lint templates 2024-12-23 12:29:35 -05:00
David Larlet
4cc8ae3d1f
chore: extract DropControl to a module 2024-12-23 12:26:40 -05:00
David Larlet
3fff54baab
fix: zoom to droped file once loaded 2024-12-23 12:09:16 -05:00
David Larlet
f69e8217cb
chore: better wording and style for the 403 page 2024-12-23 10:44:34 -05:00
David Larlet
e314fa18ad
chore: optimize logocyan’s SVG code
With https://jakearchibald.github.io/svgomg/
2024-12-23 10:33:15 -05:00
David Larlet
aedc26fe6d
docs: add English documentation for map statuses
Refs #2390
2024-12-23 10:28:24 -05:00
Yohan Boniface
ddddf4ece3 wip: add a 403.html template 2024-12-23 15:58:11 +01:00
David Larlet
7cb6c0c45f
fix(#2391): split zoomTo to accept bounds
Since de921660c9 (diff-4a01a166046bdf7e4ea7d41d97cd82a57c82f63d10d1697f76e6fe22bfa769ebR954) we were calling it with bounds but also with the click event sometimes.
2024-12-20 09:25:25 -05:00
Yohan Boniface
a9d9beacb2 fix: main help button was broken 2024-12-20 14:12:13 +01:00
Yohan Boniface
d4fb92ec56
Fix duplicated content during sync (#2388)
Some checks are pending
Test & Docs / lint (push) Waiting to run
Test & Docs / docs (push) Waiting to run
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
Here are the main fixes:

- mark a synched datalayer as loaded (so the peer does not try to get
data from the server)
- do not mark synched datalayers as dirty
- properly consume the lastKnownHLC, so to get an accurate list of
operations

fix #2219
2024-12-19 17:38:39 +01:00
Yohan Boniface
650110fe8a
feat: reconnect websocket on disconnection (#2389)
This is a port of this PR: #2235

(But it was easier to copy-paste than rebase, given the split of umap.js
and co.)
2024-12-19 17:38:02 +01:00
Yohan Boniface
36fdb8190c chore: stringify sync payload before putting it in the console
This allow to have them displayed by playwright in the python
console.

Co-authored-by: David Larlet <david@larlet.fr>
2024-12-19 17:00:30 +01:00
Yohan Boniface
56f2d3d2f9 feat: reconnect websocket on disconnection
This is a port of this PR: #2235

(But it was easier to copy-paste than rebase, given the split of umap.js
and co.)

Co-authored-by: Alexis Métaireau <alexis@notmyidea.org>
Co-authored-by: David Larlet <david@larlet.fr>
2024-12-19 16:51:10 +01:00
Yohan Boniface
80152bf4fb
fix: update star icon on star/unstar (#2387) 2024-12-19 15:23:36 +01:00
Yohan Boniface
1996e315e4 chore: allow to create non dirty DataLayer
There are two situations where we want to create "non dirty" datalayers:

- at normal load, we create datalayers that already exist in DB
- at sync, we create datalayers that will be saved by other peer
2024-12-19 13:38:09 +01:00
Yohan Boniface
dd7641c92e chore: mark synched datalayers as "loaded"
Otherwise, when they will get the "_referenceVersion" later, they
will call the server to fetch the data (while they already have
the data, from the sync itself)
2024-12-19 13:38:09 +01:00
Yohan Boniface
6caf4c3ed1 chore: properly consumme lastKnownHLC on list operations call 2024-12-19 13:38:09 +01:00
Yohan Boniface
471abe1f1b chore: honour "sync" parameter in layer.setReferenceVersion 2024-12-19 13:38:09 +01:00
Yohan Boniface
4ea5a28f04 chore: no need to call layer.redraw in layer.render()
We already call hide/show, which is what redraw does
2024-12-19 13:38:09 +01:00
Yohan Boniface
d24f05907c chore: add failing test for #2219 2024-12-19 13:38:09 +01:00
Yohan Boniface
0bc4900b16 fix(caption): honour carriage returns in datalayer description
fix #2385
2024-12-19 11:10:57 +01:00
Yohan Boniface
0e78d58c03 chore: use WithTemplate for Caption 2024-12-19 11:10:57 +01:00
Yohan Boniface
f93d0b5ca7 fix: update star icon on star/unstar 2024-12-19 10:44:32 +01:00
Yohan Boniface
24511d796d chore(tests): use new_page fixture in login one
Some checks are pending
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
Test & Docs / lint (push) Waiting to run
Test & Docs / docs (push) Waiting to run
So to have the js console relayed in the terminal
2024-12-18 17:44:30 +01:00
Yohan Boniface
0eedc47079 2.8.0
Some checks are pending
Test & Docs / docs (push) Waiting to run
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
Test & Docs / lint (push) Waiting to run
2024-12-18 12:16:58 +01:00
Yohan Boniface
631e3a7fd3
fix: do not unset map dirty status if it has not yet been saved once (#2382) 2024-12-18 11:45:43 +01:00
Yohan Boniface
d00b4e1da9 fix: do not unset map dirty status if it has not yet been saved once 2024-12-18 11:36:54 +01:00
Yohan Boniface
1ead369487 fix: do not try to restore a newly created layer on reset
When asking for cancel, a layer that has not yet been saved to the
server should only be erased, no need to try to restore its previous
state.
2024-12-18 11:21:36 +01:00
Yohan Boniface
32acdc2070
feat: experimental popup template for wikipedia (#2365)
Some checks are pending
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
Test & Docs / lint (push) Waiting to run
Test & Docs / docs (push) Waiting to run
When the data contain a `wikipedia` attribute, like used in OSM data
(see https://wiki.openstreetmap.org/wiki/Key:wikipedia), this template
will fetch the image and an extract for the given page.


![image](https://github.com/user-attachments/assets/3187d5cf-4311-46c5-a6ed-be6a60d4b4a1)

fix #661
2024-12-17 20:29:28 +01:00
Yohan Boniface
a8ed8c0d3d 2.8.0b0
Some checks are pending
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
Test & Docs / lint (push) Waiting to run
Test & Docs / docs (push) Waiting to run
2024-12-17 19:03:55 +01:00
Yohan Boniface
b444380daa
fix: store the "active" status of a feature (#2378)
Otherwise, when the marker is redrawn by Leaflet itself, it will lose
the status (the class we added manually will not be added by Leaflet).

Eg. if we click on a marker on the map border, this will move the map to
make the marker popup fit the screen, and thus this will redraw the
marker icon, which will then lose the "active" flag class.
2024-12-17 18:50:39 +01:00
Yohan Boniface
92df1d792a fixup: escape Wikipedia HTML, just in case 2024-12-17 18:49:49 +01:00
Yohan Boniface
6e5540fe79 fixup: cache wikipedia calls and be a bit more defensive 2024-12-17 18:44:21 +01:00
Yohan Boniface
b7173d4629 fixup: allow to display asynchronous content in the panel too 2024-12-17 18:44:21 +01:00
Yohan Boniface
8a929d2352 fixup: allow aynchronous popups 2024-12-17 18:44:21 +01:00
Yohan Boniface
7670989798 fixup: bigger images from wikipedia 2024-12-17 18:44:21 +01:00
Yohan Boniface
573a065e05 wip 2024-12-17 18:44:21 +01:00
Yohan Boniface
dcaddef57c
feat: allow to edit datalayer name in datalayers list (#2349)
fix #1995



https://github.com/user-attachments/assets/b16d7d1b-eee1-4da2-93b9-2aac127051ba
2024-12-17 18:43:51 +01:00
Yohan Boniface
2bee0bf3d2 fix: store the "active" status of a feature
Otherwise, when the marker is redrawn by Leaflet itself, it will lose
the status (the class we added manually will not be added by Leaflet).

Eg. if we click on a marker on the map border, this will move the map
to make the marker popup fit the screen, and thus this will redraw the
marker icon, which will then lose the "active" flag class.
2024-12-17 18:41:37 +01:00
Yohan Boniface
8f3e9ee546
fix: do not autoescape static tag (#2376)
When using django-storage S3, this will escape the final static URL,
containing query string (so & will become &amp;).
2024-12-17 18:30:06 +01:00
Yohan Boniface
df3adbc85e
fix: bring marker to front on highlight (#2377)
fix #2351

The actual zIndex of a marker is computed by Leaflet, not set in CSS.
2024-12-17 18:28:52 +01:00
Yohan Boniface
7c986e5aea
fix: teach FormBuilder where to look for default values (#2374)
UMap will look into the schema for default values, but untill now
FormBuilder wasn't.
This fix is not the real fix we want, but let's make this last until
then.
The real fix is to refactor schema and make obj.properties a Proxy
object that will then be consumed by FormBuilder as it is now.
2024-12-17 18:19:07 +01:00
Yohan Boniface
1be00ed8ca
fix: show private/draft maps in team maps for members (#2373) 2024-12-17 18:16:55 +01:00
Yohan Boniface
3eba27f6ea
fixup: fix tilelayer switch not saved anymore (#2367)
Since map split.
2024-12-17 18:14:48 +01:00
Yohan Boniface
82708b1e53 fix: bring marker to front on highlight
fix #2351
2024-12-17 15:29:55 +01:00
Yohan Boniface
6db3032bdb fix: do not autoescape static tag
When using django-storage S3, this will escape the final static URL,
containing query string (so & will become &amp;).
2024-12-17 13:07:46 +01:00
Yohan Boniface
bf631f07de fix: display current configured oauth as icon instead of text 2024-12-17 11:44:13 +01:00
Yohan Boniface
9473a8552f fix: teach FormBuilder where to look for default values
UMap will look into the schema for default values, but untill now
FormBuilder wasn't.
This fix is not the real fix we want, but let's make this last until
then.
The real fix is to refactor schema and make obj.properties a Proxy
object that will then be consumed by FormBuilder as it is now.
2024-12-17 11:19:03 +01:00
Yohan Boniface
8a38dd63c9 fix: show private/draft maps in team maps for members 2024-12-17 10:37:07 +01:00
Yohan Boniface
05c27aed98
feat: parse files in parallel at import when multiple (#2372)
Some checks are pending
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
Test & Docs / lint (push) Waiting to run
Test & Docs / docs (push) Waiting to run
cf https://github.com/umap-project/umap/pull/2363#discussion_r1882966275
2024-12-16 21:36:42 +01:00
Yohan Boniface
d08531121b feat: parse files in parallel at import when multiple 2024-12-16 19:49:58 +01:00
Yohan Boniface
06c2438ff1
fixup: fix save center and zoom (#2371)
Some checks are pending
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
Test & Docs / lint (push) Waiting to run
Test & Docs / docs (push) Waiting to run
Broken since map split.
2024-12-16 18:30:37 +01:00
Yohan Boniface
b92490eacc
feat: load all datalayers in parallel (#2370) 2024-12-16 18:26:55 +01:00
Yohan Boniface
cdb5d79297
chore: clean CSS loader (#2369)
- change the CSS (cf
https://github.com/umap-project/umap/issues/564#issuecomment-2541883101)
- change the way we pass events (and their id) to Leaflet.Loading
2024-12-16 18:24:43 +01:00
Yohan Boniface
ecdc58948f fixup: fix save center and zoom
Broken since map split.
2024-12-16 18:22:44 +01:00
Yohan Boniface
e3f02a475f feat: load all datalayers in parallel 2024-12-16 18:03:45 +01:00
Yohan Boniface
9c3f8db548 chore: clean CSS loader
- change the CSS (cf https://github.com/umap-project/umap/issues/564#issuecomment-2541883101)
- change the way we pass events (and their id) to Leaflet.Loading
2024-12-16 18:01:01 +01:00
Yohan Boniface
ce765efefc fixup: fix tilelayer switch not saved anymore
Since map split.
2024-12-16 17:00:43 +01:00
Yohan Boniface
09faa763f9
feat: add a back button to importers dialog (#2364)
Some checks failed
Test & Docs / tests (postgresql, 3.10) (push) Has been cancelled
Test & Docs / tests (postgresql, 3.12) (push) Has been cancelled
Test & Docs / lint (push) Has been cancelled
Test & Docs / docs (push) Has been cancelled
![image](https://github.com/user-attachments/assets/99445f06-f48f-4b0b-88f6-f696e067416d)
2024-12-13 15:49:45 +01:00
Yohan Boniface
fe06a0ff8e chore: add more tests for team related views 2024-12-13 14:44:54 +01:00
Yohan Boniface
b578ceced4 feat: add a back button to importers dialog 2024-12-13 12:27:41 +01:00
Yohan Boniface
45a0ec5d42 fix: add default saved message
Some checks are pending
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
Test & Docs / lint (push) Waiting to run
Test & Docs / docs (push) Waiting to run
Now that we do not always do a save on the map itself, we may have
no feedback message in case we only save layers.
2024-12-13 10:05:20 +01:00
Yohan Boniface
cbab6e03f8 fix: properly close the translate parentesis 2024-12-13 09:48:03 +01:00
Yohan Boniface
54aa687ba1 2.8.0a2 2024-12-13 09:33:24 +01:00
Yohan Boniface
8346459f28 i18n 2024-12-13 09:31:02 +01:00
Yohan Boniface
cd24bf0b3d
feat: refactor importer feedback (#2363)
We basically make the all import chain return the results as promise, so
the importer can act at the end of the process and:
- zoom only to the imported data (in case the layer already as some)
- display a counter of imported data when import is successfull
- display an alert when nothing has been imported

cf #564
2024-12-13 09:18:08 +01:00
Yohan Boniface
de921660c9 feat: refactor importer feedback
We basically make the all import chain return the results as promise, so
the importer can act at the end of the process and:
- zoom only to the imported data (in case the layer already as some)
- display a counter of imported data when import is successfull
- display an alert when nothing has been imported

cf #564
2024-12-12 21:52:54 +01:00
Yohan Boniface
8db974b96a chore: more logs in the ajax proxy validate url
This should only be used in localhost, but there are a bunch of
check and it's often that we need to add print to understand why
the URL does not validate, which is usually an issue with the SITE_URL
or this kind. So let's make those print permanent.
2024-12-12 21:06:09 +01:00
Yohan Boniface
dd89984e28
fix: make sure we set X-DataLayer-Version even when using X-Accel-Redirect (#2361)
Some checks are pending
Test & Docs / lint (push) Waiting to run
Test & Docs / docs (push) Waiting to run
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
2024-12-12 18:20:14 +01:00
Yohan Boniface
86c634db28 fix: make sure we set X-DataLayer-Version even when using X-Accel-Redirect 2024-12-12 18:19:02 +01:00