Skip to content

Commit

Permalink
Merge pull request #502 from VEuPathDB/debt/367-icon-name-clash
Browse files Browse the repository at this point in the history
Rename marker icons to differentiate from marker components
  • Loading branch information
jernestmyers authored Sep 14, 2023
2 parents 44c9139 + 2d71902 commit 67f54a9
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 30 deletions.
30 changes: 15 additions & 15 deletions packages/libs/eda/src/lib/map/analysis/MapAnalysis.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ import {
BubbleMarkerConfigurationMenu,
} from './MarkerConfiguration';
import {
BarPlotMarker,
DonutMarker,
BubbleMarker,
BarPlotMarkerIcon,
DonutMarkerIcon,
BubbleMarkerIcon,
} from './MarkerConfiguration/icons';
import { leastAncestralEntity } from '../../core/utils/data-element-constraints';
import { getDefaultOverlayConfig } from './utils/defaultOverlayConfig';
Expand All @@ -97,14 +97,14 @@ import { DraggablePanel } from '@veupathdb/coreui/lib/components/containers';
import { TabbedDisplayProps } from '@veupathdb/coreui/lib/components/grids/TabbedDisplay';
import { GeoConfig } from '../../core/types/geoConfig';
import Banner from '@veupathdb/coreui/lib/components/banners/Banner';
import BubbleMarkerComponent, {
import BubbleMarker, {
BubbleMarkerProps,
} from '@veupathdb/components/lib/map/BubbleMarker';
import DonutMarkerComponent, {
import DonutMarker, {
DonutMarkerProps,
DonutMarkerStandalone,
} from '@veupathdb/components/lib/map/DonutMarker';
import ChartMarkerComponent, {
import ChartMarker, {
ChartMarkerProps,
ChartMarkerStandalone,
} from '@veupathdb/components/lib/map/ChartMarker';
Expand Down Expand Up @@ -592,11 +592,11 @@ function MapAnalysisImpl(props: ImplProps) {
() =>
markersData?.map((markerProps) =>
markerType === 'pie' ? (
<DonutMarkerComponent {...(markerProps as DonutMarkerProps)} />
<DonutMarker {...(markerProps as DonutMarkerProps)} />
) : markerType === 'bubble' ? (
<BubbleMarkerComponent {...(markerProps as BubbleMarkerProps)} />
<BubbleMarker {...(markerProps as BubbleMarkerProps)} />
) : (
<ChartMarkerComponent {...(markerProps as ChartMarkerProps)} />
<ChartMarker {...(markerProps as ChartMarkerProps)} />
)
) || [],
[markersData, markerType]
Expand Down Expand Up @@ -735,23 +735,23 @@ function MapAnalysisImpl(props: ImplProps) {
// concatenating the parent and subMenu labels creates a unique ID
id: MapSideNavItemLabels.ConfigureMap + MarkerTypeLabels.pie,
labelText: MarkerTypeLabels.pie,
icon: <DonutMarker style={{ height: '1.25em' }} />,
icon: <DonutMarkerIcon style={{ height: '1.25em' }} />,
onClick: () => setActiveMarkerConfigurationType('pie'),
isActive: activeMarkerConfigurationType === 'pie',
},
{
// concatenating the parent and subMenu labels creates a unique ID
id: MapSideNavItemLabels.ConfigureMap + MarkerTypeLabels.barplot,
labelText: MarkerTypeLabels.barplot,
icon: <BarPlotMarker style={{ height: '1.25em' }} />,
icon: <BarPlotMarkerIcon style={{ height: '1.25em' }} />,
onClick: () => setActiveMarkerConfigurationType('barplot'),
isActive: activeMarkerConfigurationType === 'barplot',
},
{
// concatenating the parent and subMenu labels creates a unique ID
id: MapSideNavItemLabels.ConfigureMap + MarkerTypeLabels.bubble,
labelText: MarkerTypeLabels.bubble,
icon: <BubbleMarker style={{ height: '1.25em' }} />,
icon: <BubbleMarkerIcon style={{ height: '1.25em' }} />,
onClick: () => setActiveMarkerConfigurationType('bubble'),
isActive: activeMarkerConfigurationType === 'bubble',
},
Expand All @@ -768,7 +768,7 @@ function MapAnalysisImpl(props: ImplProps) {
type: 'pie',
displayName: MarkerTypeLabels.pie,
icon: (
<DonutMarker
<DonutMarkerIcon
style={{ height: '1.5em', marginLeft: '0.25em' }}
/>
),
Expand Down Expand Up @@ -807,7 +807,7 @@ function MapAnalysisImpl(props: ImplProps) {
type: 'barplot',
displayName: MarkerTypeLabels.barplot,
icon: (
<BarPlotMarker
<BarPlotMarkerIcon
style={{ height: '1.5em', marginLeft: '0.25em' }}
/>
),
Expand Down Expand Up @@ -846,7 +846,7 @@ function MapAnalysisImpl(props: ImplProps) {
type: 'bubble',
displayName: MarkerTypeLabels.bubble,
icon: (
<BubbleMarker
<BubbleMarkerIcon
style={{ height: '1.5em', marginLeft: '0.25em' }}
/>
),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { SVGProps } from 'react';
export function BarPlotMarker(props: SVGProps<SVGSVGElement>) {
export function BarPlotMarkerIcon(props: SVGProps<SVGSVGElement>) {
return (
<svg
version="1.1"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { SVGProps } from 'react';
export function BarPlotMarkers(props: SVGProps<SVGSVGElement>) {
export function BarPlotMarkersIcon(props: SVGProps<SVGSVGElement>) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { SVGProps } from 'react';

export function BubbleMarker(props: SVGProps<SVGSVGElement>) {
export function BubbleMarkerIcon(props: SVGProps<SVGSVGElement>) {
return (
// <!-- Generator: Adobe Illustrator 27.7.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { SVGProps } from 'react';
export function DonutMarker(props: SVGProps<SVGSVGElement>) {
export function DonutMarkerIcon(props: SVGProps<SVGSVGElement>) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { SVGProps } from 'react';
export function DonutMarkers(props: SVGProps<SVGSVGElement>) {
export function DonutMarkersIcon(props: SVGProps<SVGSVGElement>) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { DonutMarker } from './DonutMarker';
import { DonutMarkers } from './DonutMarkers';
import { BarPlotMarker } from './BarPlotMarker';
import { BarPlotMarkers } from './BarPlotMarkers';
import { BubbleMarker } from './BubbleMarker';
import { DonutMarkerIcon } from './DonutMarkerIcon';
import { DonutMarkersIcon } from './DonutMarkersIcon';
import { BarPlotMarkerIcon } from './BarPlotMarkerIcon';
import { BarPlotMarkersIcon } from './BarPlotMarkersIcon';
import { BubbleMarkerIcon } from './BubbleMarkerIcon';

export {
DonutMarker,
DonutMarkers,
BarPlotMarker,
BarPlotMarkers,
BubbleMarker,
DonutMarkerIcon,
DonutMarkersIcon,
BarPlotMarkerIcon,
BarPlotMarkersIcon,
BubbleMarkerIcon,
};

0 comments on commit 67f54a9

Please sign in to comment.