diff --git a/package-lock.json b/package-lock.json index 1133eed..78ec01e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@dynamods/dynamo-home", - "version": "1.0.18", + "version": "1.0.19", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@dynamods/dynamo-home", - "version": "1.0.18", + "version": "1.0.19", "license": "MIT", "dependencies": { "@types/node": "^20.14.2", diff --git a/package.json b/package.json index 60afd91..44a32eb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dynamods/dynamo-home", - "version": "1.0.18", + "version": "1.0.19", "description": "Dynamo Home", "author": "Autodesk Inc.", "main": "index.tsx", diff --git a/src/components/Samples/PageSamples.module.css b/src/components/Samples/PageSamples.module.css index f6436dd..57a7b00 100644 --- a/src/components/Samples/PageSamples.module.css +++ b/src/components/Samples/PageSamples.module.css @@ -1,3 +1,3 @@ .wideDropdown { - width: 200px; + width: 185px; } diff --git a/src/components/Samples/PageSamples.tsx b/src/components/Samples/PageSamples.tsx index 2e4d5f3..b693713 100644 --- a/src/components/Samples/PageSamples.tsx +++ b/src/components/Samples/PageSamples.tsx @@ -8,7 +8,7 @@ import { CustomSampleFirstCellRenderer } from "./CustomSampleFirstCellRenderer"; import { SamplesGrid } from './SamplesGrid'; import { openFile, showSamplesCommand, saveHomePageSettings } from '../../functions/utility'; import { useSettings } from '../SettingsContext'; -import { CustomDropdown } from "../Sidebar/CustomDropDown"; +import { CustomDropdown } from '../Sidebar/CustomDropDown'; import styles from './PageSamples.module.css'; export const SamplesPage = ({ samplesViewMode }) => { @@ -133,10 +133,13 @@ export const SamplesPage = ({ samplesViewMode }) => { placeholder={} onSelectionChange={handleShowSamplesClick} options={[ - { label: , value: 'open-files' }, + { label: , value: 'open-graphs' }, { label: , value: 'open-datasets' } ]} className={styles.wideDropdown} + showDivider={false} + wholeButtonActionable={true} + disableArrowHoverShadow={true} /> diff --git a/src/components/Sidebar/CustomDropDown.module.css b/src/components/Sidebar/CustomDropDown.module.css index 761ecfc..9321d37 100644 --- a/src/components/Sidebar/CustomDropDown.module.css +++ b/src/components/Sidebar/CustomDropDown.module.css @@ -113,4 +113,8 @@ height: 100%; background-color: #9B9B9B; margin: 0px; +} + +.no-hover-shadow .arrow-container:hover { + box-shadow: none !important; } \ No newline at end of file diff --git a/src/components/Sidebar/CustomDropDown.tsx b/src/components/Sidebar/CustomDropDown.tsx index 546f777..5f4b3ea 100644 --- a/src/components/Sidebar/CustomDropDown.tsx +++ b/src/components/Sidebar/CustomDropDown.tsx @@ -2,7 +2,21 @@ import { useState, useRef, useEffect } from 'react'; import styles from './CustomDropDown.module.css'; import { OpenArrow } from '../Common/Arrow'; -export const CustomDropdown = ({ id, options, placeholder, onSelectionChange, className }: Dropdown & { className?: string }) => { +export const CustomDropdown = ({ + id, + options, + placeholder, + onSelectionChange, + className, + showDivider = true, + wholeButtonActionable = false, + disableArrowHoverShadow = false +}: Dropdown & { + className?: string, + showDivider?: boolean, + wholeButtonActionable?: boolean, + disableArrowHoverShadow?: boolean +}) => { const [isOpen, setIsOpen] = useState(false); const [lastSelected, setLastSelected] = useState(options[0]); const dropdownRef = useRef(null); @@ -43,14 +57,27 @@ export const CustomDropdown = ({ id, options, placeholder, onSelectionChange, cl }, [isOpen]); return ( -
-
+
+
{placeholder} - -
{ - e.stopPropagation(); - toggleDropdown(); - }}> + {showDivider && } +
{ + e.stopPropagation(); + toggleDropdown(); + }} + >
diff --git a/src/functions/utility.ts b/src/functions/utility.ts index 73aadf9..0008a31 100644 --- a/src/functions/utility.ts +++ b/src/functions/utility.ts @@ -48,7 +48,7 @@ export function showSamplesCommand(value: ShowSamplesCommand) { if (value === 'open-graphs' && window.chrome?.webview !== undefined) { window.chrome.webview.hostObjects.scriptObject.ShowSampleFilesInFolder(); } - if (value == 'open-datasets' && window.chrome?.webview !== undefined) { + if (value === 'open-datasets' && window.chrome?.webview !== undefined) { window.chrome.webview.hostObjects.scriptObject.ShowSampleDatasetsInFolder(); } }