Commit graph

3862 commits

Author SHA1 Message Date
David Larlet
f97e8b7691
Merge branch 'master' into dependabot/pip/ruff-0.8.4 2024-12-23 13:19:30 -05:00
David Larlet
f840ac8ea4
chore: bump moto[s3] from 5.0.21 to 5.0.24 (#2397) 2024-12-23 13:18:43 -05:00
David Larlet
6c323b7c05
chore: bump hatch from 1.13.0 to 1.14.0 (#2398) 2024-12-23 13:18:21 -05:00
David Larlet
31f07b4492
chore: bump pymdown-extensions from 10.12 to 10.13 (#2399)
Bumps
[pymdown-extensions](https://github.com/facelessuser/pymdown-extensions)
from 10.12 to 10.13.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/facelessuser/pymdown-extensions/releases">pymdown-extensions's
releases</a>.</em></p>
<blockquote>
<h2>10.13</h2>
<ul>
<li><strong>NEW</strong>: Snippets: Allow multiple line numbers or line
number blocks separated by <code>,</code>.</li>
<li><strong>NEW</strong>: Snippets: Allow using a negative index for
number start indexes and end indexes. Negative indexes are converted to
positive indexes based on the number of lines in the snippet.</li>
<li><strong>FIX</strong>: Snippets: Properly capture empty newline at
end of file.</li>
<li><strong>FIX</strong>: Snippets: Fix issue where when non sections of
files are included, section labels are not stripped.</li>
<li><strong>FIX</strong>: BetterEm: Fixes for complex cases.</li>
<li><strong>FIX</strong>: Blocks: More consistent handling of empty
newlines in block processor extensions.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="36858c6b85"><code>36858c6</code></a>
Mention negative indexing in Snippets documentation</li>
<li><a
href="271950fb0d"><code>271950f</code></a>
More consistent newline handling in blocks extensions (<a
href="https://redirect.github.com/facelessuser/pymdown-extensions/issues/2553">#2553</a>)</li>
<li><a
href="9e26f64ee5"><code>9e26f64</code></a>
Allow negative indexes (<a
href="https://redirect.github.com/facelessuser/pymdown-extensions/issues/2552">#2552</a>)</li>
<li><a
href="1789d6094e"><code>1789d60</code></a>
Docs: Update JS deps</li>
<li><a
href="55ccf795df"><code>55ccf79</code></a>
Allow specifying multiple line selection blocks (<a
href="https://redirect.github.com/facelessuser/pymdown-extensions/issues/2551">#2551</a>)</li>
<li><a
href="f6102ac0dc"><code>f6102ac</code></a>
Fix some complex cases in BetterEm (<a
href="https://redirect.github.com/facelessuser/pymdown-extensions/issues/2547">#2547</a>)</li>
<li><a
href="9df48dbc84"><code>9df48db</code></a>
Strip sections from included file (<a
href="https://redirect.github.com/facelessuser/pymdown-extensions/issues/2541">#2541</a>)</li>
<li><a
href="377e8ff46d"><code>377e8ff</code></a>
Correctly document StripHTML defaults (<a
href="https://redirect.github.com/facelessuser/pymdown-extensions/issues/2535">#2535</a>)</li>
<li><a
href="68c70f9d12"><code>68c70f9</code></a>
Fix broken link to options in block-caption plugin page (<a
href="https://redirect.github.com/facelessuser/pymdown-extensions/issues/2533">#2533</a>)</li>
<li>See full diff in <a
href="https://github.com/facelessuser/pymdown-extensions/compare/10.12...10.13">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pymdown-extensions&package-manager=pip&previous-version=10.12&new-version=10.13)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>
2024-12-23 13:17:57 -05:00
David Larlet
d105f94c69
fix: zoom to droped file once loaded (#2401) 2024-12-23 13:16:57 -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
dependabot[bot]
46ad3f9b78
chore: bump ruff from 0.8.2 to 0.8.4
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.8.2 to 0.8.4.
- [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.8.2...0.8.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-23 17:25:38 +00:00
dependabot[bot]
e7b776d44d
chore: bump pymdown-extensions from 10.12 to 10.13
Bumps [pymdown-extensions](https://github.com/facelessuser/pymdown-extensions) from 10.12 to 10.13.
- [Release notes](https://github.com/facelessuser/pymdown-extensions/releases)
- [Commits](https://github.com/facelessuser/pymdown-extensions/compare/10.12...10.13)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-23 17:25:21 +00:00
dependabot[bot]
8e9eaa5e3e
chore: bump hatch from 1.13.0 to 1.14.0
Bumps [hatch](https://github.com/pypa/hatch) from 1.13.0 to 1.14.0.
- [Release notes](https://github.com/pypa/hatch/releases)
- [Commits](https://github.com/pypa/hatch/compare/hatch-v1.13.0...hatch-v1.14.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-23 17:25:17 +00:00
dependabot[bot]
35ef460640
chore: bump moto[s3] from 5.0.21 to 5.0.24
Bumps [moto[s3]](https://github.com/getmoto/moto) from 5.0.21 to 5.0.24.
- [Release notes](https://github.com/getmoto/moto/releases)
- [Changelog](https://github.com/getmoto/moto/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getmoto/moto/compare/5.0.21...5.0.24)

---
updated-dependencies:
- dependency-name: moto[s3]
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-23 17:25:11 +00:00
David Larlet
3fff54baab
fix: zoom to droped file once loaded 2024-12-23 12:09:16 -05:00
David Larlet
64ad6f0273
docs: faq entry for map permissions and translation
Co-authored-by: Yohan Boniface <yohanboniface@free.fr>
2024-12-23 11:40:31 -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
49d1dbf36e
fix(#2391): split zoomTo to accept bounds (#2394)
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
Since
de921660c9 (diff-4a01a166046bdf7e4ea7d41d97cd82a57c82f63d10d1697f76e6fe22bfa769ebR954)
we were calling it with bounds but also with the click event sometimes.
2024-12-20 09:42:46 -05: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
David Larlet
17e6cf7500
fix: main help button was broken (#2393) 2024-12-20 08:34:15 -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
9ddca50d21
fix: honour carriage returns in layer description (in caption panel) (#2386)
This could have been a four letters fix (adding class "text"), but I've
seen that `Caption` was still using `DomUtil` instead of `WithTemplate`,
so I made this little effort more…
2024-12-19 15:23:16 +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
9e418c2ab0 chore: escape backticks in Makefile printf
Otherwise they are executed by the shell as subcommands…
2024-12-18 12:05:13 +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
7b59cf4afb
fix: do not try to restore a newly created layer on reset (#2381)
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:45:27 +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