From b524adc2860ebb17dc244dd1d94aeaa1604caf1f Mon Sep 17 00:00:00 2001 From: Felix Sommer Date: Mon, 20 Jan 2025 14:06:34 +0100 Subject: [PATCH 1/4] PB-1236: infobox doesn't change language when open --- .../activeLayers/MenuActiveLayersList.vue | 18 ++++---- .../activeLayers/MenuActiveLayersListItem.vue | 2 + src/store/modules/features.store.js | 2 +- src/store/modules/layers.store.js | 5 ++- src/utils/components/SimpleWindow.vue | 6 +-- .../fixtures/html-popup-german.fixture.html | 44 +++++++++++++++++++ tests/cypress/tests-e2e/drawing.cy.js | 1 + tests/cypress/tests-e2e/infobox.cy.js | 32 ++++++++++++++ tests/cypress/tests-e2e/layers.cy.js | 16 +++++++ 9 files changed, 111 insertions(+), 15 deletions(-) create mode 100644 tests/cypress/fixtures/html-popup-german.fixture.html diff --git a/src/modules/menu/components/activeLayers/MenuActiveLayersList.vue b/src/modules/menu/components/activeLayers/MenuActiveLayersList.vue index fdae21e510..45f4f6d56f 100644 --- a/src/modules/menu/components/activeLayers/MenuActiveLayersList.vue +++ b/src/modules/menu/components/activeLayers/MenuActiveLayersList.vue @@ -23,10 +23,9 @@ const { compact } = toRefs(props) const activeLayersList = ref(null) // used to deactivate the hover change of color on layer whenever one of them is dragged const aLayerIsDragged = ref(false) -const showLayerDescriptionForLayer = ref(null) const showLayerDetailIndex = ref(null) const layerDetailFocusMoveButton = ref(null) - +const showDescriptionForLayerId = ref(null) const store = useStore() // Users are used to have layers ordered top to bottom (the first layer is on top), but we store them in the opposite order. // So here we swap the order of this array to match the desired order on the UI @@ -96,15 +95,16 @@ function onToggleLayerDetail(index) { :class="{ 'drag-in-progress': aLayerIsDragged }" :show-layer-detail="showLayerDetailIndex === reverseIndex(index)" :focus-move-button="layerDetailFocusMoveButton" - @show-layer-description-popup="showLayerDescriptionForLayer = layer" + @show-layer-description-popup="showDescriptionForLayerId = layer.id" @toggle-layer-detail="onToggleLayerDetail" @move-layer="onMoveLayer" - /> - + > + +
- diff --git a/src/modules/menu/components/activeLayers/MenuActiveLayersListItem.vue b/src/modules/menu/components/activeLayers/MenuActiveLayersListItem.vue index 3c294cb5d0..bfe097d30c 100644 --- a/src/modules/menu/components/activeLayers/MenuActiveLayersListItem.vue +++ b/src/modules/menu/components/activeLayers/MenuActiveLayersListItem.vue @@ -171,6 +171,7 @@ function changeStyle(newStyle) {
+