diff --git a/package.json b/package.json index 57345860..0adef5c1 100644 --- a/package.json +++ b/package.json @@ -51,10 +51,10 @@ "jest": { "coverageThreshold": { "global": { - "statements": 62, - "branches": 61, - "functions": 70, - "lines": 62 + "statements": 64, + "branches": 65, + "functions": 71, + "lines": 65 } }, "transformIgnorePatterns": [ diff --git a/src/components/Toolbar.js b/src/components/Toolbar.js index b517f20c..ef27461b 100644 --- a/src/components/Toolbar.js +++ b/src/components/Toolbar.js @@ -3,6 +3,28 @@ import PropTypes from 'prop-types' import 'bootstrap/dist/css/bootstrap.min.css' import { compareVersions } from 'compare-versions' import styles from './Toolbar.module.css' +import { toast } from 'react-toastify' +import Config from '../config' +import { getLinkAsButton } from '../utilities/uiUtils' + +const helpToast = ( +
+

Help

+ View or submit feedback to our {getLinkAsButton(Config.REPO_URL, 'GitHub repository')}: +
+ {getLinkAsButton(`${Config.REPO_URL}/issues`, 'Issues (bugs or feature requests)', 'View/submit bugs or feature requests', true)} + {getLinkAsButton(`${Config.REPO_URL}/discussions`, 'Discussions', 'View/submit discussions', true)} +
+
+

Getting started

+ Use this tool to create metadata files based on {getLinkAsButton(Config.AIND_DATA_SCHEMA_REPO_URL, 'aind-data-schema')} +  ({getLinkAsButton(Config.AIND_DATA_SCHEMA_READTHEDOCS_URL, 'readthedocs')}). + +
) function Toolbar (props) { /** @@ -35,6 +57,14 @@ function Toolbar (props) { event.target.blur() } + const showHelpPopup = (event) => { + toast(helpToast, { + toastId: 'help-toast', // provide id to disable duplicates + autoClose: false + }) + event.target.blur() + } + return (
+