From 134cd97041df787584eeb54d9a875f237381afa0 Mon Sep 17 00:00:00 2001 From: Johann Levesque Date: Fri, 1 Nov 2024 10:50:33 -0400 Subject: [PATCH] fix(ui): Toggle class visibility, legend class border and wms stack icon (#2567) * fix(ui): Toggle class visibility, legend class border and wms stack icon Closes #2550, #2565, #2556 * fix comment layers * Remove tooltip * Remove tooltip format --- .../public/locales/en/translation.json | 1 + .../public/locales/fr/translation.json | 1 + .../components/common/layer-icon-style.ts | 2 + .../src/core/components/common/layer-icon.tsx | 4 +- .../layers/right-panel/layer-details-style.ts | 10 +---- .../layers/right-panel/layer-details.tsx | 44 ++++++++++--------- .../layer-opacity-control-styles.ts | 2 + .../layer-opacity-control.tsx | 24 +++++----- .../core/components/legend/legend-layer.tsx | 2 +- .../core/components/legend/legend-styles.ts | 7 ++- .../nav-bar/buttons/basemap-select.tsx | 2 +- .../nav-bar/nav-bar-panel-button.tsx | 5 ++- 12 files changed, 55 insertions(+), 49 deletions(-) diff --git a/packages/geoview-core/public/locales/en/translation.json b/packages/geoview-core/public/locales/en/translation.json index 63a4b5e634a..5898d347359 100644 --- a/packages/geoview-core/public/locales/en/translation.json +++ b/packages/geoview-core/public/locales/en/translation.json @@ -113,6 +113,7 @@ "reloadLayer": "Reload layer", "visibilityIsAlways": "Visibility is always enabled", "toggleVisibility": "Toggle visibility", + "toggleAllVisibility": "Toggle all visibility", "toggleCollapse": "Toggle collapse", "querying": "Querying", "layerAdded": "Layer __param__ added", diff --git a/packages/geoview-core/public/locales/fr/translation.json b/packages/geoview-core/public/locales/fr/translation.json index 48440f01909..6aac062092c 100644 --- a/packages/geoview-core/public/locales/fr/translation.json +++ b/packages/geoview-core/public/locales/fr/translation.json @@ -113,6 +113,7 @@ "reloadLayer": "Recharger la couche", "visibilityIsAlways": "La visibilité est toujours activée", "toggleVisibility": "Basculer la visibilité", + "toggleAllVisibility": "Basculer toute les visibilités", "toggleCollapse": "Basculer la fermeture", "querying": "Requête en cours", "layerAdded": "Couche __param__ ajoutée", diff --git a/packages/geoview-core/src/core/components/common/layer-icon-style.ts b/packages/geoview-core/src/core/components/common/layer-icon-style.ts index 7bb964cb81d..574f15eee2d 100644 --- a/packages/geoview-core/src/core/components/common/layer-icon-style.ts +++ b/packages/geoview-core/src/core/components/common/layer-icon-style.ts @@ -37,6 +37,8 @@ export const getSxClasses = (theme: Theme): any => ({ maxIconImg: { maxWidth: 24, maxHeight: 24, + padding: 1, + height: 'auto !important', // Make sure the WMS image is not duplicated to fill the 100% height from parent }, legendIcon: { display: 'flex', diff --git a/packages/geoview-core/src/core/components/common/layer-icon.tsx b/packages/geoview-core/src/core/components/common/layer-icon.tsx index 618ff2ae91d..1c007808f79 100644 --- a/packages/geoview-core/src/core/components/common/layer-icon.tsx +++ b/packages/geoview-core/src/core/components/common/layer-icon.tsx @@ -50,7 +50,7 @@ function IconStack({ layerPath, onIconClick, onStackIconClick }: TypeIconStackPr } if (numOfIcons && numOfIcons > 0) { return ( - onStackIconClick?.(e)} aria-hidden="true"> + onStackIconClick?.(e)} aria-hidden="true">