From 010929c901eb4fdbc97adb6303d7c20c4c75f359 Mon Sep 17 00:00:00 2001 From: Christopher Phelefu Date: Tue, 14 Nov 2023 08:56:10 -0500 Subject: [PATCH 1/9] changing icons for layers to match design --- .../public/locales/en/translation.json | 4 +- .../public/locales/fr/translation.json | 4 +- .../core/components/layers/layers-style.ts | 15 ++++ .../layers/left-panel/layerslist-style.ts | 4 +- .../layers/left-panel/single-layer.tsx | 88 +++++++++++++++---- .../layers/right-panel/layer-details.tsx | 40 +++++++-- packages/geoview-core/src/ui/icons/index.ts | 4 + 7 files changed, 131 insertions(+), 28 deletions(-) diff --git a/packages/geoview-core/public/locales/en/translation.json b/packages/geoview-core/public/locales/en/translation.json index 329baea0710..47c6f7d140a 100644 --- a/packages/geoview-core/public/locales/en/translation.json +++ b/packages/geoview-core/public/locales/en/translation.json @@ -65,7 +65,9 @@ "selected_Layers": "An overview of currrently selected layers", "re-arrange": "re-arrange", "categories_title": "Categories", - "items_available": "items available" + "items_available": "items available", + "layer_has_error": "Layer has an error...", + "layer_is_loading": "Layer is loading..." }, "details": { "zoom_to": "Zoom to feature", diff --git a/packages/geoview-core/public/locales/fr/translation.json b/packages/geoview-core/public/locales/fr/translation.json index dc46b7294f3..6e99631b4c4 100644 --- a/packages/geoview-core/public/locales/fr/translation.json +++ b/packages/geoview-core/public/locales/fr/translation.json @@ -63,7 +63,9 @@ "sort_layers": "Trier les calques", "selected_Layers": "Un aperçu des calques actuellement sélectionnés", "re-arrange": "Réarranger", - "categories_title": "Catégories" + "categories_title": "Catégories", + "layer_has_error": "La couche a une erreur...", + "layer_is_loading": "La couche se charge..." }, "details": { "zoom_to": "Zoom à l'élément", diff --git a/packages/geoview-core/src/core/components/layers/layers-style.ts b/packages/geoview-core/src/core/components/layers/layers-style.ts index d69d5e937d1..29d6c005137 100644 --- a/packages/geoview-core/src/core/components/layers/layers-style.ts +++ b/packages/geoview-core/src/core/components/layers/layers-style.ts @@ -11,6 +11,21 @@ export const getSxClasses = (theme: Theme) => ({ marginBottom: '5px', }, + '& .layerItemContainer.error' : { + background: '#ffdcdb 0% 0% no-repeat padding-box', + '& .MuiListItemText-secondary': { + fontWeight: 'bold', + color: 'error.main' + } + }, + '& .layerItemContainer.loading' : { + background: '#e5efff 0% 0% no-repeat padding-box', + '& .MuiListItemText-secondary': { + fontWeight: 'bold', + color: 'info.main' + } + }, + '& .MuiListItemText-primary': { font: theme.footerPanel.layerTitleFont, }, diff --git a/packages/geoview-core/src/core/components/layers/left-panel/layerslist-style.ts b/packages/geoview-core/src/core/components/layers/left-panel/layerslist-style.ts index d30b64a79cc..b84e61cb0dd 100644 --- a/packages/geoview-core/src/core/components/layers/left-panel/layerslist-style.ts +++ b/packages/geoview-core/src/core/components/layers/left-panel/layerslist-style.ts @@ -11,8 +11,9 @@ export const getSxClasses = (theme: Theme) => ({ background: '#FFFFFF 0% 0% no-repeat padding-box', borderRadius: '5px', marginBottom: '5px', + border: '10px solid red' }, - + '& .MuiListItemText-primary': { font: theme.footerPanel.layerTitleFont, }, @@ -77,7 +78,6 @@ export const getSxClasses = (theme: Theme) => ({ layersList: { selectedLayerItem: { border: '2px solid #515BA5', - backgroundColor: 'white !important', }, }, }); diff --git a/packages/geoview-core/src/core/components/layers/left-panel/single-layer.tsx b/packages/geoview-core/src/core/components/layers/left-panel/single-layer.tsx index 576dd2b5fa2..883053deceb 100644 --- a/packages/geoview-core/src/core/components/layers/left-panel/single-layer.tsx +++ b/packages/geoview-core/src/core/components/layers/left-panel/single-layer.tsx @@ -3,7 +3,6 @@ import { useTheme } from '@mui/material/styles'; import { Box, Collapse, - DownloadingIcon, ErrorIcon, GroupWorkOutlinedIcon, IconButton, @@ -19,10 +18,16 @@ import { Tooltip, VisibilityOffOutlinedIcon, VisibilityOutlinedIcon, + RestartAltIcon, + Divider, + TableViewIcon, + CircularProgressBase, + Typography, } from '@/ui'; import { TypeLegendLayer } from '../types'; import { getSxClasses } from './layerslist-style'; import { useLayerStoreActions, useSelectedLayerPath } from '@/core/stores/store-interface-and-intial-values/layer-state'; +import { useTranslation } from 'react-i18next'; interface SingleLayerProps { layer: TypeLegendLayer; @@ -32,10 +37,11 @@ interface SingleLayerProps { export function SingleLayer(props: SingleLayerProps): JSX.Element { const { layer, depth } = props; - const layerDescription = layer.children.length ? `${layer.children.length} layers` : `${layer.items.length} items`; const theme = useTheme(); const sxClasses = getSxClasses(theme); + const { t } = useTranslation(); + const { toggleLayerVisibility, setSelectedLayerPath } = useLayerStoreActions(); // get store actions const selectedLayerPath = useSelectedLayerPath(); // get store value @@ -45,6 +51,22 @@ export function SingleLayer(props: SingleLayerProps): JSX.Element { const [isGroupOpen, setGroupOpen] = useState(layerIsSelected); + //get layer description + const getLayerDescription = () => { + if(layer.layerStatus === 'error') { + return t('legend.layer_has_error'); + } + if(layer.layerStatus === 'loading') { + return t('legend.layer_is_loading'); + } + if(layer.children.length) { + return `${layer.children.length} layers`; + } + else { + return `${layer.items.length} items`; + } + } + /** * Handle expand/shrink of layer groups. */ @@ -65,6 +87,14 @@ export function SingleLayer(props: SingleLayerProps): JSX.Element { toggleLayerVisibility(layer.layerPath); }; + const handleReloadLayer = () => { + console.log('reloading layer'); + } + + const handleOpenTable = () => { + console.log('handle open table'); + } + // renders the layers children, if any function renderChildren() { if (!layer.children?.length) { @@ -81,17 +111,37 @@ export function SingleLayer(props: SingleLayerProps): JSX.Element { } function renderMoreLayerButtons() { + if(layer.layerStatus === 'loading') { + return null; + } + if(layer.layerStatus === 'error') { + return ( + + + + ); + } + return ( - handleToggleVisibility()}> - {(() => { - if (layer.isVisible === false) return ; - return ; - })()} - + <> + + + + + handleToggleVisibility()}> + {(() => { + if (layer.isVisible === false) return ; + return ; + })()} + + ); } function renderArrowButtons() { + if(!['processed', 'loaded'].includes(layer.layerStatus)) { + return null; + } if (layer.children?.length) { return ( @@ -99,11 +149,13 @@ export function SingleLayer(props: SingleLayerProps): JSX.Element { ); } - return ( - - - - ); + else if(layer.items?.length) { + return ( + + + + ); + } } function renderCollapsible() { @@ -128,9 +180,9 @@ export function SingleLayer(props: SingleLayerProps): JSX.Element { } if (layer.layerStatus === 'loading') { return ( - - - + + + ); } if (layer?.children.length) { @@ -148,12 +200,12 @@ export function SingleLayer(props: SingleLayerProps): JSX.Element { } return ( - + {renderLayerIcon()} - + {renderMoreLayerButtons()} diff --git a/packages/geoview-core/src/core/components/layers/right-panel/layer-details.tsx b/packages/geoview-core/src/core/components/layers/right-panel/layer-details.tsx index 626ea995ebb..2dc71c4fbef 100644 --- a/packages/geoview-core/src/core/components/layers/right-panel/layer-details.tsx +++ b/packages/geoview-core/src/core/components/layers/right-panel/layer-details.tsx @@ -2,7 +2,20 @@ import { useTranslation } from 'react-i18next'; import { useTheme } from '@mui/material/styles'; import { TypeLegendLayer } from '../types'; import { getSxClasses } from '../layers-style'; -import { Box, CheckBoxIcon, CheckBoxOutIcon, IconButton, Paper, SliderBase, Typography, ZoomInSearchIcon, Grid } from '@/ui'; +import { + Box, + CheckBoxIcon, + CheckBoxOutIcon, + IconButton, + Paper, + SliderBase, + Typography, + ZoomInSearchIcon, + Grid, + TableChartOutlinedIcon, + RestartAltIcon, + HighlightOutlinedIcon, +} from '@/ui'; import { useLayerStoreActions } from '@/core/stores/store-interface-and-intial-values/layer-state'; interface LayerDetailsProps { @@ -80,6 +93,25 @@ export function LayerDetails(props: LayerDetailsProps): JSX.Element { ); } + function renderLayerButtons() { + return ( + + + + + + + + + + + + + + + ); + } + // function renderItems return ( @@ -89,11 +121,7 @@ export function LayerDetails(props: LayerDetailsProps): JSX.Element { {layerDetails.layerName} {`${layerDetails.items.length} items available`} -
- - - -
+ {renderLayerButtons()}
{renderOpacityControl()} {renderItems()} diff --git a/packages/geoview-core/src/ui/icons/index.ts b/packages/geoview-core/src/ui/icons/index.ts index 522394b8493..374f8c164a3 100644 --- a/packages/geoview-core/src/ui/icons/index.ts +++ b/packages/geoview-core/src/ui/icons/index.ts @@ -37,6 +37,7 @@ export { GroupWork as GroupWorkIcon, GroupWorkOutlined as GroupWorkOutlinedIcon, Help as HelpIcon, + HighlightOutlined as HighlightOutlinedIcon, Home as HomeIcon, HubOutlined as HubOutlinedIcon, ImportExport as ReorderIcon, @@ -67,9 +68,12 @@ export { RadioButtonUnchecked as RadioButtonUncheckedIcon, Remove as ZoomOutIcon, RemoveCircleOutline as RemoveCircleOutlineIcon, + RestartAlt as RestartAltIcon, Search as SearchIcon, Send as SendIcon, Storage as StorageIcon, + TableView as TableViewIcon, + TableChartOutlined as TableChartOutlinedIcon, Visibility as VisibilityIcon, VisibilityOff as VisibilityOffIcon, VisibilityOutlined as VisibilityOutlinedIcon, From 6f4ba345b2be45c2ce32c5847fb321b39fab9c9f Mon Sep 17 00:00:00 2001 From: Christopher Phelefu Date: Tue, 14 Nov 2023 09:00:27 -0500 Subject: [PATCH 2/9] fix icon --- .../src/core/components/layers/right-panel/layer-details.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/geoview-core/src/core/components/layers/right-panel/layer-details.tsx b/packages/geoview-core/src/core/components/layers/right-panel/layer-details.tsx index 2dc71c4fbef..751c9abcb8e 100644 --- a/packages/geoview-core/src/core/components/layers/right-panel/layer-details.tsx +++ b/packages/geoview-core/src/core/components/layers/right-panel/layer-details.tsx @@ -15,6 +15,7 @@ import { TableChartOutlinedIcon, RestartAltIcon, HighlightOutlinedIcon, + TableViewIcon, } from '@/ui'; import { useLayerStoreActions } from '@/core/stores/store-interface-and-intial-values/layer-state'; @@ -97,7 +98,7 @@ export function LayerDetails(props: LayerDetailsProps): JSX.Element { return ( - + From 231e8655b7fed0acf54d310d27588a18dc805834 Mon Sep 17 00:00:00 2001 From: Christopher Phelefu Date: Tue, 14 Nov 2023 09:59:18 -0500 Subject: [PATCH 3/9] fixing build errors --- .../core/components/layers/layers-style.ts | 12 ++--- .../layers/left-panel/layerslist-style.ts | 4 +- .../layers/left-panel/single-layer.tsx | 45 ++++++++++--------- .../layers/right-panel/layer-details.tsx | 1 - 4 files changed, 32 insertions(+), 30 deletions(-) diff --git a/packages/geoview-core/src/core/components/layers/layers-style.ts b/packages/geoview-core/src/core/components/layers/layers-style.ts index 29d6c005137..33333ecc0be 100644 --- a/packages/geoview-core/src/core/components/layers/layers-style.ts +++ b/packages/geoview-core/src/core/components/layers/layers-style.ts @@ -11,19 +11,19 @@ export const getSxClasses = (theme: Theme) => ({ marginBottom: '5px', }, - '& .layerItemContainer.error' : { + '& .layerItemContainer.error': { background: '#ffdcdb 0% 0% no-repeat padding-box', '& .MuiListItemText-secondary': { fontWeight: 'bold', - color: 'error.main' - } + color: 'error.main', + }, }, - '& .layerItemContainer.loading' : { + '& .layerItemContainer.loading': { background: '#e5efff 0% 0% no-repeat padding-box', '& .MuiListItemText-secondary': { fontWeight: 'bold', - color: 'info.main' - } + color: 'info.main', + }, }, '& .MuiListItemText-primary': { diff --git a/packages/geoview-core/src/core/components/layers/left-panel/layerslist-style.ts b/packages/geoview-core/src/core/components/layers/left-panel/layerslist-style.ts index b84e61cb0dd..e78a8ba9fb1 100644 --- a/packages/geoview-core/src/core/components/layers/left-panel/layerslist-style.ts +++ b/packages/geoview-core/src/core/components/layers/left-panel/layerslist-style.ts @@ -11,9 +11,9 @@ export const getSxClasses = (theme: Theme) => ({ background: '#FFFFFF 0% 0% no-repeat padding-box', borderRadius: '5px', marginBottom: '5px', - border: '10px solid red' + border: '10px solid red', }, - + '& .MuiListItemText-primary': { font: theme.footerPanel.layerTitleFont, }, diff --git a/packages/geoview-core/src/core/components/layers/left-panel/single-layer.tsx b/packages/geoview-core/src/core/components/layers/left-panel/single-layer.tsx index 883053deceb..94e663d8820 100644 --- a/packages/geoview-core/src/core/components/layers/left-panel/single-layer.tsx +++ b/packages/geoview-core/src/core/components/layers/left-panel/single-layer.tsx @@ -1,5 +1,6 @@ import { useState } from 'react'; import { useTheme } from '@mui/material/styles'; +import { useTranslation } from 'react-i18next'; import { Box, Collapse, @@ -22,12 +23,10 @@ import { Divider, TableViewIcon, CircularProgressBase, - Typography, } from '@/ui'; import { TypeLegendLayer } from '../types'; import { getSxClasses } from './layerslist-style'; import { useLayerStoreActions, useSelectedLayerPath } from '@/core/stores/store-interface-and-intial-values/layer-state'; -import { useTranslation } from 'react-i18next'; interface SingleLayerProps { layer: TypeLegendLayer; @@ -51,21 +50,19 @@ export function SingleLayer(props: SingleLayerProps): JSX.Element { const [isGroupOpen, setGroupOpen] = useState(layerIsSelected); - //get layer description + // get layer description const getLayerDescription = () => { - if(layer.layerStatus === 'error') { + if (layer.layerStatus === 'error') { return t('legend.layer_has_error'); } - if(layer.layerStatus === 'loading') { + if (layer.layerStatus === 'loading') { return t('legend.layer_is_loading'); } - if(layer.children.length) { + if (layer.children.length) { return `${layer.children.length} layers`; } - else { - return `${layer.items.length} items`; - } - } + return `${layer.items.length} items`; + }; /** * Handle expand/shrink of layer groups. @@ -89,11 +86,11 @@ export function SingleLayer(props: SingleLayerProps): JSX.Element { const handleReloadLayer = () => { console.log('reloading layer'); - } + }; const handleOpenTable = () => { console.log('handle open table'); - } + }; // renders the layers children, if any function renderChildren() { @@ -111,23 +108,28 @@ export function SingleLayer(props: SingleLayerProps): JSX.Element { } function renderMoreLayerButtons() { - if(layer.layerStatus === 'loading') { + if (layer.layerStatus === 'loading') { return null; } - if(layer.layerStatus === 'error') { + if (layer.layerStatus === 'error') { return ( ); } - + return ( <> - + - + handleToggleVisibility()}> {(() => { if (layer.isVisible === false) return ; @@ -139,7 +141,7 @@ export function SingleLayer(props: SingleLayerProps): JSX.Element { } function renderArrowButtons() { - if(!['processed', 'loaded'].includes(layer.layerStatus)) { + if (!['processed', 'loaded'].includes(layer.layerStatus)) { return null; } if (layer.children?.length) { @@ -149,13 +151,14 @@ export function SingleLayer(props: SingleLayerProps): JSX.Element { ); } - else if(layer.items?.length) { + if (layer.items?.length) { return ( ); } + return null; } function renderCollapsible() { @@ -180,8 +183,8 @@ export function SingleLayer(props: SingleLayerProps): JSX.Element { } if (layer.layerStatus === 'loading') { return ( - - + + ); } diff --git a/packages/geoview-core/src/core/components/layers/right-panel/layer-details.tsx b/packages/geoview-core/src/core/components/layers/right-panel/layer-details.tsx index 751c9abcb8e..72962fc6cbc 100644 --- a/packages/geoview-core/src/core/components/layers/right-panel/layer-details.tsx +++ b/packages/geoview-core/src/core/components/layers/right-panel/layer-details.tsx @@ -12,7 +12,6 @@ import { Typography, ZoomInSearchIcon, Grid, - TableChartOutlinedIcon, RestartAltIcon, HighlightOutlinedIcon, TableViewIcon, From 1baf5edbcc56fcf673d05f33ee47ded7d591df60 Mon Sep 17 00:00:00 2001 From: Christopher Phelefu Date: Tue, 14 Nov 2023 11:26:35 -0500 Subject: [PATCH 4/9] remove table icon on left --- .../layers/left-panel/single-layer.tsx | 18 +++--------------- .../layer-state.ts | 1 - 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/packages/geoview-core/src/core/components/layers/left-panel/single-layer.tsx b/packages/geoview-core/src/core/components/layers/left-panel/single-layer.tsx index 94e663d8820..73c764ac090 100644 --- a/packages/geoview-core/src/core/components/layers/left-panel/single-layer.tsx +++ b/packages/geoview-core/src/core/components/layers/left-panel/single-layer.tsx @@ -20,8 +20,6 @@ import { VisibilityOffOutlinedIcon, VisibilityOutlinedIcon, RestartAltIcon, - Divider, - TableViewIcon, CircularProgressBase, } from '@/ui'; import { TypeLegendLayer } from '../types'; @@ -72,6 +70,9 @@ export function SingleLayer(props: SingleLayerProps): JSX.Element { }; const handleLayerClick = () => { + if (!['processed', 'loaded'].includes(layer.layerStatus)) { + return null; + } if (layer.children.length === 0) { // setSelectedLayer(layer); setSelectedLayerPath(layer.layerPath); @@ -88,10 +89,6 @@ export function SingleLayer(props: SingleLayerProps): JSX.Element { console.log('reloading layer'); }; - const handleOpenTable = () => { - console.log('handle open table'); - }; - // renders the layers children, if any function renderChildren() { if (!layer.children?.length) { @@ -121,15 +118,6 @@ export function SingleLayer(props: SingleLayerProps): JSX.Element { return ( <> - - - - handleToggleVisibility()}> {(() => { if (layer.isVisible === false) return ; diff --git a/packages/geoview-core/src/core/stores/store-interface-and-intial-values/layer-state.ts b/packages/geoview-core/src/core/stores/store-interface-and-intial-values/layer-state.ts index b647150fe8d..930b8fdfda0 100644 --- a/packages/geoview-core/src/core/stores/store-interface-and-intial-values/layer-state.ts +++ b/packages/geoview-core/src/core/stores/store-interface-and-intial-values/layer-state.ts @@ -107,7 +107,6 @@ export function initializeLayerState(set: TypeSetStore, get: TypeGetStore): ILay }); layer.allItemsChecked = visibility; layer.isVisible = visibility; - } set({ legendState: { From 681d09d30676aa09698a4a91aee8ff545c2a7d5d Mon Sep 17 00:00:00 2001 From: Christopher Phelefu Date: Tue, 14 Nov 2023 11:32:42 -0500 Subject: [PATCH 5/9] fix errors --- .../layers/left-panel/single-layer.tsx | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/packages/geoview-core/src/core/components/layers/left-panel/single-layer.tsx b/packages/geoview-core/src/core/components/layers/left-panel/single-layer.tsx index 73c764ac090..5242bb13193 100644 --- a/packages/geoview-core/src/core/components/layers/left-panel/single-layer.tsx +++ b/packages/geoview-core/src/core/components/layers/left-panel/single-layer.tsx @@ -71,7 +71,7 @@ export function SingleLayer(props: SingleLayerProps): JSX.Element { const handleLayerClick = () => { if (!['processed', 'loaded'].includes(layer.layerStatus)) { - return null; + return; } if (layer.children.length === 0) { // setSelectedLayer(layer); @@ -117,14 +117,12 @@ export function SingleLayer(props: SingleLayerProps): JSX.Element { } return ( - <> - handleToggleVisibility()}> - {(() => { - if (layer.isVisible === false) return ; - return ; - })()} - - + handleToggleVisibility()}> + {(() => { + if (layer.isVisible === false) return ; + return ; + })()} + ); } From a275f72d4eb593bb5d9c713faf76afeaf18b6609 Mon Sep 17 00:00:00 2001 From: Christopher Phelefu Date: Tue, 14 Nov 2023 15:17:12 -0500 Subject: [PATCH 6/9] adding filtered table view icon --- .../components/layers/left-panel/single-layer.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/geoview-core/src/core/components/layers/left-panel/single-layer.tsx b/packages/geoview-core/src/core/components/layers/left-panel/single-layer.tsx index 5242bb13193..a145f80ce8f 100644 --- a/packages/geoview-core/src/core/components/layers/left-panel/single-layer.tsx +++ b/packages/geoview-core/src/core/components/layers/left-panel/single-layer.tsx @@ -21,10 +21,12 @@ import { VisibilityOutlinedIcon, RestartAltIcon, CircularProgressBase, + TableViewIcon, } from '@/ui'; import { TypeLegendLayer } from '../types'; import { getSxClasses } from './layerslist-style'; import { useLayerStoreActions, useSelectedLayerPath } from '@/core/stores/store-interface-and-intial-values/layer-state'; +import { useDataTableStoreMapFilteredRecord } from '@/core/stores/store-interface-and-intial-values/data-table-state'; interface SingleLayerProps { layer: TypeLegendLayer; @@ -42,6 +44,7 @@ export function SingleLayer(props: SingleLayerProps): JSX.Element { const { toggleLayerVisibility, setSelectedLayerPath } = useLayerStoreActions(); // get store actions const selectedLayerPath = useSelectedLayerPath(); // get store value + const mapFiltered = useDataTableStoreMapFilteredRecord(); const layerIsSelected = layer.layerPath === selectedLayerPath; const legendClass = layerIsSelected ? { ...sxClasses.layersList.selectedLayerItem } : null; @@ -59,6 +62,14 @@ export function SingleLayer(props: SingleLayerProps): JSX.Element { if (layer.children.length) { return `${layer.children.length} layers`; } + if (mapFiltered[layer.layerPath]) { + return ( + + {layer.items.length} items + + + ); + } return `${layer.items.length} items`; }; From 0cf913c441d2a7791477cd50bc94764c10fb7d46 Mon Sep 17 00:00:00 2001 From: Christopher Phelefu Date: Tue, 14 Nov 2023 15:59:06 -0500 Subject: [PATCH 7/9] fix alignment --- .../src/core/components/layers/left-panel/single-layer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/geoview-core/src/core/components/layers/left-panel/single-layer.tsx b/packages/geoview-core/src/core/components/layers/left-panel/single-layer.tsx index a145f80ce8f..bc22c57c97f 100644 --- a/packages/geoview-core/src/core/components/layers/left-panel/single-layer.tsx +++ b/packages/geoview-core/src/core/components/layers/left-panel/single-layer.tsx @@ -64,7 +64,7 @@ export function SingleLayer(props: SingleLayerProps): JSX.Element { } if (mapFiltered[layer.layerPath]) { return ( - + {layer.items.length} items From 71cfa2b3603bea36b6b2d89b373d76a6d856fd6c Mon Sep 17 00:00:00 2001 From: Christopher Phelefu Date: Tue, 14 Nov 2023 16:02:39 -0500 Subject: [PATCH 8/9] fix alignment --- .../src/core/components/layers/left-panel/single-layer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/geoview-core/src/core/components/layers/left-panel/single-layer.tsx b/packages/geoview-core/src/core/components/layers/left-panel/single-layer.tsx index bc22c57c97f..4d69f4d6893 100644 --- a/packages/geoview-core/src/core/components/layers/left-panel/single-layer.tsx +++ b/packages/geoview-core/src/core/components/layers/left-panel/single-layer.tsx @@ -64,7 +64,7 @@ export function SingleLayer(props: SingleLayerProps): JSX.Element { } if (mapFiltered[layer.layerPath]) { return ( - + {layer.items.length} items From 3a8fbeb47c3313cf684f80306038d42fee6ea548 Mon Sep 17 00:00:00 2001 From: Christopher Phelefu Date: Wed, 15 Nov 2023 09:41:07 -0500 Subject: [PATCH 9/9] remove unused code --- .../src/core/components/layers/left-panel/single-layer.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/geoview-core/src/core/components/layers/left-panel/single-layer.tsx b/packages/geoview-core/src/core/components/layers/left-panel/single-layer.tsx index 4d69f4d6893..1f4f0c297bd 100644 --- a/packages/geoview-core/src/core/components/layers/left-panel/single-layer.tsx +++ b/packages/geoview-core/src/core/components/layers/left-panel/single-layer.tsx @@ -85,7 +85,6 @@ export function SingleLayer(props: SingleLayerProps): JSX.Element { return; } if (layer.children.length === 0) { - // setSelectedLayer(layer); setSelectedLayerPath(layer.layerPath); } else { setGroupOpen(!isGroupOpen);