Skip to content

PB-1548 : fix mismanagement of drawing features if coming with adminId#1278

Merged
pakb merged 1 commit intodevelopfrom
bug-PB-1548-fix-loading-of-drawing-module-with-adminid
Mar 24, 2025
Merged

PB-1548 : fix mismanagement of drawing features if coming with adminId#1278
pakb merged 1 commit intodevelopfrom
bug-PB-1548-fix-loading-of-drawing-module-with-adminid

Conversation

@pakb
Copy link
Contributor

@pakb pakb commented Mar 24, 2025

the loading state of a KML layer wasn't managed by the drawing module, meaning that the timing of when the KML data was loaded could lead to no features being present on the drawing layer. Very dangerous because that could make user empty their KMLs if they would edit it in this state

Test link

the loading state of a KML layer wasn't managed by the drawing module, meaning that the timing of when the KML data was loaded could lead to no features being present on the drawing layer.
Very dangerous because that could make user empty their KMLs if they would edit it in this state
@github-actions github-actions bot added the bug label Mar 24, 2025
@pakb pakb requested a review from ltkum March 24, 2025 12:20
@cypress
Copy link

cypress bot commented Mar 24, 2025

web-mapviewer    Run #4851

Run Properties:  status check passed Passed #4851  •  git commit 6aaa74d39e: Merge pull request #1278 from geoadmin/bug-PB-1548-fix-loading-of-drawing-module...
Project web-mapviewer
Branch Review develop
Run status status check passed Passed #4851
Run duration 01m 40s
Commit git commit 6aaa74d39e: Merge pull request #1278 from geoadmin/bug-PB-1548-fix-loading-of-drawing-module...
Committer Pascal Barth
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 1
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 48
View all changes introduced in this branch ↗︎

Copy link
Contributor

@ltkum ltkum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a quick idea I had while reviewing, but to be fair it's not important nor breaking. It's perfectly mergeable in the current state :)

good job

Comment on lines +105 to +109
watch(hasLoaded, () => {
if (hasLoaded.value) {
addKmlToDrawing()
}
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it be a good idea to set a {once: true} parameter to the watcher? hasLoaded is either always true (we had already loaded the layer before entering the drawing module), or false, then true (we enter the drawing module with the admin link or we created a new kml layer when starting to draw.)

If you don't think it's useful, we can avoid that :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think that would greatly improve perf, and I'd really like to fix this bug ASAP. Let's go with the current state

@pakb pakb merged commit 6aaa74d into develop Mar 24, 2025
6 checks passed
@pakb pakb deleted the bug-PB-1548-fix-loading-of-drawing-module-with-adminid branch March 24, 2025 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants