diff --git a/cypress/e2e/footer-bar.cy.ts b/cypress/e2e/footer-bar.cy.ts index 5f4b31c1..1496a958 100644 --- a/cypress/e2e/footer-bar.cy.ts +++ b/cypress/e2e/footer-bar.cy.ts @@ -26,6 +26,13 @@ describe('Footer bar', () => { cy.get('button[data-cy="drawButton"]').click() cy.get('[data-cy="myMapsPanel"]').should('exist') }) + + it('closes the info panel', () => { + cy.get('[data-cy="infoOpenClose"]').find('button').click() + cy.get('[data-cy="infoPanel"]').should('exist') + cy.get('button[data-cy="drawButton"]').click() + cy.get('[data-cy="infoPanel"]').should('not.exist') + }) }) describe('Layers button', () => { @@ -65,17 +72,45 @@ describe('Footer bar', () => { it('Other panels are closed', () => { cy.get('[data-cy="styleSelector"]').should('not.exist') cy.get('[data-cy="layerPanel"]').should('not.exist') + cy.get('[data-cy="infoPanel"]').should('not.exist') }) - describe('When clicking on myMapsPanel button', () => { + describe('When clicking on layers panel button', () => { beforeEach(() => { cy.get('[data-cy="layersOpenClose"]').find('button').click() }) - it('closes the left panel', () => { + it('closes the mymaps panel', () => { cy.get('[data-cy="myMapsPanel"]').should('not.exist') }) }) }) }) + + describe('Info button', () => { + describe('When opening Info panel', () => { + beforeEach(() => { + cy.get('[data-cy="infoOpenClose"]').find('button').click() + }) + + it('Info panel is shown', () => { + cy.get('[data-cy="infoPanel"]').should('exist') + }) + + it('Other panels are closed', () => { + cy.get('[data-cy="styleSelector"]').should('not.exist') + cy.get('[data-cy="layerPanel"]').should('not.exist') + }) + + describe('When clicking on layers panel button', () => { + beforeEach(() => { + cy.get('[data-cy="layersOpenClose"]').find('button').click() + }) + + it('closes the info panel', () => { + cy.get('[data-cy="infoPanel"]').should('not.exist') + }) + }) + }) + }) }) diff --git a/public/assets/locales/app.de.json b/public/assets/locales/app.de.json index 50d3bbc5..09663de8 100644 --- a/public/assets/locales/app.de.json +++ b/public/assets/locales/app.de.json @@ -49,5 +49,7 @@ "Retry": "Von vorne anfangen", "small": "Klein", "Take measure": "Messen", - "Update offline data": "Offline-Daten updaten" + "Update offline data": "Offline-Daten updaten", + "A right click (tap and hold on mobile)...": "Durch Rechtsklick (tippen und halten auf Mobil) werden Informationen über den aktuellen Standort angezeigt", + "A short click (tap on mobile)...": "Durch Klick (tippen auf Mobil) auf einer Funktion wir diese Augewählt und weitere Informationen angezeigt" } diff --git a/public/assets/locales/app.en.json b/public/assets/locales/app.en.json index 72f5997b..f45da356 100644 --- a/public/assets/locales/app.en.json +++ b/public/assets/locales/app.en.json @@ -49,5 +49,7 @@ "Retry": "Retry", "small": "small", "Take measure": "Take measure", - "Update offline data": "Update offline data" + "Update offline data": "Update offline data", + "A right click (tap and hold on mobile)...": "A right click (tap and hold on mobile) will display information about the current location.", + "A short click (tap on mobile)...": "A short click (tap on mobile) on a map feature will select the feature and show more information." } diff --git a/public/assets/locales/app.fr.json b/public/assets/locales/app.fr.json index 85395a99..268b1653 100644 --- a/public/assets/locales/app.fr.json +++ b/public/assets/locales/app.fr.json @@ -49,5 +49,7 @@ "Retry": "Recommencez", "small": "Petite", "Take measure": "Mesurer", - "Update offline data": "Mettre à jour données hors connexion" + "Update offline data": "Mettre à jour données hors connexion", + "A right click (tap and hold on mobile)...": "Un clic droit (appuyez et maintenez sur mobile) affiche des informations sur l'emplacement actuel.", + "A short click (tap on mobile)...": "Un clic court (tap sur mobile) sur une caractéristique de la carte permet de sélectionner la caractéristique et de montrer plus d'informations" } diff --git a/public/assets/locales/app.lb.json b/public/assets/locales/app.lb.json index 0ca0fe4d..0905de5c 100644 --- a/public/assets/locales/app.lb.json +++ b/public/assets/locales/app.lb.json @@ -49,5 +49,7 @@ "Retry": "Nach eng Kéier probéiren", "small": "Kleng", "Take measure": "Moossen", - "Update offline data": "Offline-Daten updaten" + "Update offline data": "Offline-Daten updaten", + "A right click (tap and hold on mobile)...": "Duerch Rietsklick (tippen an gedréckt haalen op mobil) ginn d'Informatiounen iwwert déi aktuell Positioun ugewisen", + "A short click (tap on mobile)...": "Duerch Klick (tippen op mobil) op eng Funktioun gëtt dës ausgewielt an méi Informatiounen ugewisen" } diff --git a/src/App.vue b/src/App.vue index 107f90df..889345a8 100644 --- a/src/App.vue +++ b/src/App.vue @@ -38,13 +38,20 @@ statePersistorStyleService.bootstrap() statePersistorBgLayerService.bootstrap() mvtStyleService.initBackgroundsConfigs() -const { embedded, layersOpen, legendsOpen, myMapsOpen, styleEditorOpen } = - storeToRefs(appStore) +const { + embedded, + layersOpen, + legendsOpen, + myMapsOpen, + infoOpen, + styleEditorOpen, +} = storeToRefs(appStore) watch(layersOpen, timeoutResizeMap) watch(legendsOpen, timeoutResizeMap) watch(styleEditorOpen, timeoutResizeMap) watch(myMapsOpen, timeoutResizeMap) +watch(infoOpen, timeoutResizeMap) function timeoutResizeMap() { setTimeout(() => map.resize(), 50) diff --git a/src/components/footer/footer-bar.vue b/src/components/footer/footer-bar.vue index d5ac4aef..b8aacd59 100644 --- a/src/components/footer/footer-bar.vue +++ b/src/components/footer/footer-bar.vue @@ -14,6 +14,7 @@ const { toggleDrawToolbarOpen, toggleMyMapsOpen, toggleLegendsOpen, + toggleInfoOpen, } = appStore const { layersOpen, @@ -21,6 +22,7 @@ const { drawToolbarOpen, styleEditorOpen, myMapsOpen, + infoOpen, themeGridOpen, } = storeToRefs(appStore) @@ -31,6 +33,7 @@ function onClickLayersIcon() { if (open) { styleEditorOpen.value = false myMapsOpen.value = false + infoOpen.value = false } themeGridOpen.value = false @@ -67,11 +70,12 @@ function onClickLayersIcon() { > -