Skip to content

Commit

Permalink
fixes based on feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
cphelefu committed Feb 26, 2024
1 parent d17da5d commit b0cc667
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -409,12 +409,12 @@ function DataTable({ data, layerPath, tableHeight = 600 }: DataTableProps) {
},
renderToolbarInternalActions: ({ table }) => (
<Box>
<MRTToggleFiltersButton table={table} />
<MRTToggleFiltersButton className='style1' table={table} />
<FilterMap layerPath={layerPath} />
<MRTShowHideColumnsButton table={table} />
<MRTToggleDensePaddingButton table={table} />
<MRTFullScreenToggleButton table={table} />
<ExportButton rows={rows} columns={columns}>
<MRTShowHideColumnsButton className='style1' table={table} />
<MRTToggleDensePaddingButton className='style1' table={table} />
<MRTFullScreenToggleButton className='style1' table={table} />
<ExportButton rows={rows} columns={columns}>
<JSONExportButton features={data.features as TypeFeatureInfoEntry[]} layerPath={layerPath} />
</ExportButton>
</Box>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function ExportButton({ rows, columns, children }: ExportButtonProps): JSX.Eleme

return (
<>
<IconButton onClick={handleClick}>
<IconButton onClick={handleClick} className='style1'>
<Tooltip title={t('dataTable.exportBtn')} placement="bottom" enterDelay={100}>
<DownloadIcon />
</Tooltip>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export function LegendLayer(props: LegendLayerProps): JSX.Element {
className="layerTitle"
secondary={getSecondaryText()}
/>
<IconButton sx={{ marginBottom: '20px' }} color="primary" edge="end" size="small" tooltip="layers.toggleCollapse">
<IconButton sx={{ marginBottom: '20px' }} className="style1" edge="end" size="small" tooltip="layers.toggleCollapse">
{isGroupOpen ? <KeyboardArrowUpIcon /> : <KeyboardArrowDownIcon />}
</IconButton>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { getSxClasses } from './notifications-style';
import { useAppNotifications, useAppStoreActions } from '@/core/stores/store-interface-and-intial-values/app-state';
import { useGeoViewMapId } from '@/app';
import { logger } from '@/core/utils/logger';
import { ClickAwayListener } from '@mui/material';

export type NotificationDetailsType = {
key: string;
Expand Down Expand Up @@ -63,6 +64,12 @@ export default function Notifications(): JSX.Element {
setOpen(!open);
};

const handleClickAway = () => {
if(open) {
setOpen(false);
}
}

/**
* Remove a notification
*/
Expand Down Expand Up @@ -104,6 +111,9 @@ export default function Notifications(): JSX.Element {

return (
<>
<ClickAwayListener mouseEvent="onMouseDown"
touchEvent="onTouchStart" onClickAway={handleClickAway}>
<div>
<Badge badgeContent={notificationsCount} color="error">
<IconButton
id="notification"
Expand All @@ -118,6 +128,7 @@ export default function Notifications(): JSX.Element {
</Badge>

<Popper open={open} anchorEl={anchorEl} placement="right-end" container={mapElem}>

<Paper sx={sxClasses.notificationPanel}>
<Typography component="h3" sx={sxClasses.notificationsTitle}>
{t('appbar.notifications')}
Expand All @@ -133,6 +144,8 @@ export default function Notifications(): JSX.Element {
</Box>
</Paper>
</Popper>
</div>
</ClickAwayListener>
</>
);
}
5 changes: 5 additions & 0 deletions packages/geoview-time-slider/src/time-slider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ export function TimeSlider(TimeSliderPanelProps: TimeSliderPanelProps) {
<div style={{ textAlign: 'center', paddingTop: '20px' }}>
{!singleHandle && (
<IconButton
className='style1'
aria-label={returnLockTooltip()}
tooltip={returnLockTooltip()}
tooltipPlacement="top"
Expand All @@ -368,6 +369,7 @@ export function TimeSlider(TimeSliderPanelProps: TimeSliderPanelProps) {
</IconButton>
)}
<IconButton
className='style1'
aria-label={getLocalizedMessage(mapId, 'timeSlider.slider.back') as string}
tooltip="timeSlider.slider.back"
tooltipPlacement="top"
Expand All @@ -377,6 +379,7 @@ export function TimeSlider(TimeSliderPanelProps: TimeSliderPanelProps) {
<ArrowLeftIcon />
</IconButton>
<IconButton
className='style1'
aria-label={
isPlaying
? (getLocalizedMessage(mapId, 'timeSlider.slider.pauseAnimation') as string)
Expand All @@ -390,6 +393,7 @@ export function TimeSlider(TimeSliderPanelProps: TimeSliderPanelProps) {
{!isPlaying ? <PlayArrowIcon /> : <PauseIcon />}
</IconButton>
<IconButton
className='style1'
aria-label={getLocalizedMessage(mapId, 'timeSlider.slider.forward') as string}
tooltip="timeSlider.slider.forward"
tooltipPlacement="top"
Expand All @@ -399,6 +403,7 @@ export function TimeSlider(TimeSliderPanelProps: TimeSliderPanelProps) {
<ArrowRightIcon />
</IconButton>
<IconButton
className='style1'
aria-label={getLocalizedMessage(mapId, 'timeSlider.slider.changeDirection') as string}
tooltip="timeSlider.slider.changeDirection"
tooltipPlacement="top"
Expand Down

0 comments on commit b0cc667

Please sign in to comment.