Skip to content

PB-912 Fix language of background layer attribution#1052

Merged
schtibe merged 2 commits intodevelopfrom
feat-pb-912-swisstopo-source
Sep 30, 2024
Merged

PB-912 Fix language of background layer attribution#1052
schtibe merged 2 commits intodevelopfrom
feat-pb-912-swisstopo-source

Conversation

@schtibe
Copy link
Contributor

@schtibe schtibe commented Sep 2, 2024

(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

@schtibe schtibe force-pushed the feat-pb-912-swisstopo-source branch 4 times, most recently from c6e6ad5 to 3eefbab Compare September 3, 2024 14:20
@schtibe schtibe force-pushed the feat-pb-912-swisstopo-source branch 6 times, most recently from 5513403 to 10d3616 Compare September 13, 2024 17:03
@schtibe schtibe force-pushed the feat-pb-912-swisstopo-source branch 5 times, most recently from 8a0e81c to 5e77db0 Compare September 20, 2024 11:10
@geoadmin geoadmin deleted a comment from cypress bot Sep 20, 2024
@schtibe schtibe changed the title PB 912 Fix language of background layer attribution PB-912 Fix language of background layer attribution Sep 20, 2024
@schtibe schtibe force-pushed the feat-pb-912-swisstopo-source branch from 5e77db0 to 5e76331 Compare September 20, 2024 11:45
@cypress
Copy link

cypress bot commented Sep 20, 2024

web-mapviewer    Run #3440

Run Properties:  status check passed Passed #3440  •  git commit 0f04cff899: PB-912 Refactor map attribution for language updating
Project web-mapviewer
Branch Review feat-pb-912-swisstopo-source
Run status status check passed Passed #3440
Run duration 05m 21s
Commit git commit 0f04cff899: PB-912 Refactor map attribution for language updating
Committer Stefan Heinemann
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
View all changes introduced in this branch ↗︎

@schtibe schtibe requested a review from pakb September 20, 2024 12:03
@schtibe schtibe force-pushed the feat-pb-912-swisstopo-source branch 4 times, most recently from e64bd50 to 77c8fcf Compare September 30, 2024 08:35
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.
@schtibe schtibe force-pushed the feat-pb-912-swisstopo-source branch from 77c8fcf to 48ba6cc Compare September 30, 2024 12:10
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.
@schtibe schtibe force-pushed the feat-pb-912-swisstopo-source branch from 48ba6cc to 0f04cff Compare September 30, 2024 13:06
@schtibe schtibe merged commit 182a614 into develop Sep 30, 2024
@schtibe schtibe deleted the feat-pb-912-swisstopo-source branch September 30, 2024 14:21
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