Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PB-984: quick fix for local layers #1087

Merged
merged 3 commits into from
Oct 8, 2024

Conversation

ltkum
Copy link
Contributor

@ltkum ltkum commented Oct 3, 2024

Issue: when reloading the page, local layers trigger the error feedback, telling them they made a mistake, when technically they did not do anything wrong.

Fix : we assume local layers errors are due to actualisations / links sharing, and that we should warn the users they're trying to get a local file through the URL, which doesn't work, and gives them a feedback about it in the form of a warning.

Test link

@github-actions github-actions bot added the bug Something isn't working label Oct 3, 2024
Copy link

cypress bot commented Oct 3, 2024

web-mapviewer    Run #3532

Run Properties:  status check passed Passed #3532  •  git commit 5c0d293c4c: PB-984: Not sending warnings when not necessary
Project web-mapviewer
Run status status check passed Passed #3532
Run duration 03m 57s
Commit git commit 5c0d293c4c: PB-984: Not sending warnings when not necessary
Committer Martin Künzi
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 21
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 211

@ltkum ltkum marked this pull request as ready for review October 8, 2024 09:58
@ltkum ltkum requested review from pakb and ismailsunni October 8, 2024 09:58
@ltkum ltkum force-pushed the fix-PB-984-removing-external-layer-check branch from 56c4b9b to 7800f95 Compare October 8, 2024 10:07
Issue: when reloading the page, local layers trigger the error feedback, telling them they made a mistake, when technically they did not do anything wrong.

Fix : we assume local layers errors are due to actualisations / links sharing, and that we should warn the users they're trying to get a local file through the URL, which doesn't work, and gives them a feedback about it in the form of a warning.
Issue : in some cases, warnings or errors could be sent when unnecessary, as the router would loop more than once when mutations occur, and thus go through the URL query watcher. This was most visible with local external layers, which would be checked when not needed (for example, when switching from 2d to 3d).

Fix : If the value in the store is the same as the one in the query, we no longer validate the input.
@ltkum ltkum force-pushed the fix-PB-984-removing-external-layer-check branch from 7800f95 to 5c0d293 Compare October 8, 2024 12:32
@ltkum ltkum merged commit f477497 into develop Oct 8, 2024
6 checks passed
@ltkum ltkum deleted the fix-PB-984-removing-external-layer-check branch October 8, 2024 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants