Merged
Conversation
Issue: In chrome-based web browsers, the layers would be removed from the preview and the link when opening the embed preview unless the bgLayer was 'void'. Cause: There might be a need to refactor completely the embed sharing component, but for now, it seems the issue was caused by the bgLayer parameter being handled before the layers. This would cause a situation where the router would trigger a mutation, go to a new URL with no layers, and overwrite what should have been in store. As the default background layer is the void one, we did not go through this when we used the empty background layer. Fix: by changing the order in which the parameters are handled, we can ensure layers are handled before the background layer, and thus ensure they are kept.
da3c4d9 to
f10e2ca
Compare
web-mapviewer
|
||||||||||||||||||||||||||||
| Project |
web-mapviewer
|
| Branch Review |
fix-PB-1254-allow-embed-layer-sharing
|
| Run status |
|
| Run duration | 05m 17s |
| Commit |
|
| Committer | Martin Künzi |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
21
|
|
|
0
|
|
|
214
|
| View all changes introduced in this branch ↗︎ | |
pakb
reviewed
Dec 6, 2024
Contributor
There was a problem hiding this comment.
can you change all your invoke(...).then(...) into invoke(...).should(...) ? This would add retry-ability to all your tests (and should make them a bit more resilient on the CI)
Issue : the tests for the embed links checked strings as they are without any further processing. This meant that if the order of the parameters changed, it would make the test fail. Fix : We update the tests with a deep comparison between two 'URLSearchParams' made from the variable parameter and the validation string
bcf2432 to
772af64
Compare
pakb
approved these changes
Dec 6, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue: In chrome-based web browsers, the layers would be removed from the preview and the link when opening the embed preview unless the bgLayer was 'void'.
Cause: There might be a need to refactor completely the embed sharing component, but for now, it seems the issue was caused by the bgLayer parameter being handled before the layers. This would cause a situation where the router would trigger a mutation, go to a new URL with no layers, and overwrite what should have been in store. As the default background layer is the void one, we did not go through this when we used the empty background layer.
Fix: by changing the order in which the parameters are handled, we can ensure layers are handled before the background layer, and thus ensure they are kept.
Test link