Commit graph

4292 commits

Author SHA1 Message Date
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
dependabot[bot]
1dc468c350
chore: bump ruff from 0.9.6 to 0.9.9
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.9.6 to 0.9.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.9.6...0.9.9)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-03 17:19:47 +00:00
dependabot[bot]
434de70c02
chore: bump psycopg from 3.2.4 to 3.2.5
Bumps [psycopg](https://github.com/psycopg/psycopg) from 3.2.4 to 3.2.5.
- [Changelog](https://github.com/psycopg/psycopg/blob/master/docs/news.rst)
- [Commits](https://github.com/psycopg/psycopg/compare/3.2.4...3.2.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-03 17:19:37 +00:00
dependabot[bot]
e9389723e8
chore: bump isort from 6.0.0 to 6.0.1
Bumps [isort](https://github.com/PyCQA/isort) from 6.0.0 to 6.0.1.
- [Release notes](https://github.com/PyCQA/isort/releases)
- [Changelog](https://github.com/PyCQA/isort/blob/main/CHANGELOG.md)
- [Commits](https://github.com/PyCQA/isort/compare/6.0.0...6.0.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-03 17:19:32 +00: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
420647906d doc: fix setting name for DEPRECATED_AUTHENTICATION_BACKENDS
Co-authored-by: David Larlet <david@larlet.fr>
2025-03-03 16:47:09 +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
742a23b668
a11y: set an aria-label for unlabelled search input (#2531) 2025-03-03 09:04:31 -05: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
dependabot[bot]
c5eac8a8a9
chore: bump social-auth-core from 4.5.4 to 4.5.6
Bumps [social-auth-core](https://github.com/python-social-auth/social-core) from 4.5.4 to 4.5.6.
- [Release notes](https://github.com/python-social-auth/social-core/releases)
- [Changelog](https://github.com/python-social-auth/social-core/blob/master/CHANGELOG.md)
- [Commits](https://github.com/python-social-auth/social-core/compare/4.5.4...4.5.6)

---
updated-dependencies:
- dependency-name: social-auth-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-27 14:49:50 +00:00
Yohan Boniface
55d505e7d8
chore: bump rjsmin from 1.2.3 to 1.2.4 (#2519) 2025-02-27 15:48:37 +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
fc6ea191cc
chore: do not try to disconnect ws if not connected (#2527)
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
cf https://umap.sentry.io/issues/6331841272/
2025-02-26 15:18:34 +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
6e40388f7d
chore: use template for map advanced buttons (and fix icons) (#2523)
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
Before:


![image](https://github.com/user-attachments/assets/fc8dd27f-aa03-4eaf-ba21-e041b0548e51)

After:


![image](https://github.com/user-attachments/assets/2b9b15ca-542b-4114-b57c-c88189a7260a)
2025-02-25 08:25:24 +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
dependabot[bot]
d342336930
chore: bump rjsmin from 1.2.3 to 1.2.4
Bumps [rjsmin](https://github.com/ndparker/rjsmin) from 1.2.3 to 1.2.4.
- [Changelog](https://github.com/ndparker/rjsmin/blob/master/CHANGES)
- [Commits](https://github.com/ndparker/rjsmin/compare/1.2.3...1.2.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-24 14:09:11 +00:00
Yohan Boniface
4c76f8dbde
chore: bump dompurify from 3.1.7 to 3.2.4 (#2521)
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-24 15:08:22 +01:00
Yohan Boniface
b417d71fb7
chore: bump rcssmin from 1.2.0 to 1.2.1 (#2515) 2025-02-24 15:07:55 +01:00
dependabot[bot]
be267504da
chore: bump dompurify from 3.1.7 to 3.2.4
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 3.1.7 to 3.2.4.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](https://github.com/cure53/DOMPurify/compare/3.1.7...3.2.4)

---
updated-dependencies:
- dependency-name: dompurify
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-24 13:23:19 +00:00
Yohan Boniface
0e12efbca6
chore: bump mkdocs-material from 9.6.3 to 9.6.4 (#2516) 2025-02-24 14:22:12 +01:00
dependabot[bot]
0dfe1ac29a
chore: bump mkdocs-material from 9.6.3 to 9.6.4
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.6.3 to 9.6.4.
- [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.6.3...9.6.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-17 17:50:05 +00:00
dependabot[bot]
256613512b
chore: bump rcssmin from 1.2.0 to 1.2.1
Bumps [rcssmin](https://github.com/ndparker/rcssmin) from 1.2.0 to 1.2.1.
- [Changelog](https://github.com/ndparker/rcssmin/blob/master/CHANGES)
- [Commits](https://github.com/ndparker/rcssmin/compare/1.2.0...1.2.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-17 17:49:57 +00: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