PB-912 Fix language of background layer attribution#1052
Merged
Conversation
c6e6ad5 to
3eefbab
Compare
5513403 to
10d3616
Compare
8a0e81c to
5e77db0
Compare
5e77db0 to
5e76331
Compare
web-mapviewer
|
||||||||||||||||||||||||||||
| Project |
web-mapviewer
|
| Branch Review |
feat-pb-912-swisstopo-source
|
| Run status |
|
| Run duration | 05m 21s |
| Commit |
|
| Committer | Stefan Heinemann |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
21
|
|
|
0
|
|
|
211
|
| View all changes introduced in this branch ↗︎ | |
pakb
approved these changes
Sep 30, 2024
e64bd50 to
77c8fcf
Compare
On language change, the background layers weren't properly updated so that the reactivity propagated through to the UI, thus the link to the source was in the wrong language.
77c8fcf to
48ba6cc
Compare
The background layer's attributes didn't update when the language was changed. This was because we copied the background layer around for setting the current one. Refactored the code so that we only set the ID of the layer and the actual data is being served through a getter.
48ba6cc to
0f04cff
Compare
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.
(the reason I am doing this was because I fixed something small when nobody else was around, this is like the extension of that)
Some notes on the fix: the backgroundLayer was copied inside the store. When one changes the language, the attributions would therefore not be updated. One solution would be to listen to language changes and trigger the update (see first commit), but IMO this would diffuse the responsibility of the data further. So I changed the store a bit so the currentLayer comes through a getter, streamlining the data flow.
Test link