diff --git a/frontend/next.config.js b/frontend/next.config.js index 3609005f3..8f68cd85e 100644 --- a/frontend/next.config.js +++ b/frontend/next.config.js @@ -49,6 +49,7 @@ module.exports = { ...previewOptions, i18n: isPreview ? undefined : i18n, + productionBrowserSourceMaps: true, basePath: process.env.BASE_PATH || '', pageExtensions: ['ts', 'tsx'], diff --git a/frontend/package.json b/frontend/package.json index 4f86ac709..fedf82efe 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -55,8 +55,8 @@ "preview:dev:build": "PREVIEW=src/fixtures/plugin.json PREVIEW_PULL_REQUEST=https://github.com/chanzuckerberg/napari-demo/pull/5 yarn preview:build", "// Runs frontend in production. Requires running `yarn build` first.": "", "start": "next start -p 8080", - "start:prod": "API_URL='https://api.napari-hub.org' yarn dev", - "start:staging": "API_URL='https://api.staging.napari-hub.org' yarn dev", + "start:prod": "API_URL='https://api.napari-hub.org' yarn start", + "start:staging": "API_URL='https://api.staging.napari-hub.org' yarn start", "// Runs unit / integration tests": "", "test": "jest -c jest/test.config.js", "// Runs unit / integration tests in watch mode": "", diff --git a/frontend/src/components/CategoryChip/CategoryChip.tsx b/frontend/src/components/CategoryChip/CategoryChip.tsx index 6bee10e48..12f98a2be 100644 --- a/frontend/src/components/CategoryChip/CategoryChip.tsx +++ b/frontend/src/components/CategoryChip/CategoryChip.tsx @@ -118,6 +118,7 @@ function BaseCategoryChip( setOpen(true); }} type="button" + aria-label={`info-${category ?? ''}`} > diff --git a/frontend/src/components/CollectionPage/CollectionLinks.tsx b/frontend/src/components/CollectionPage/CollectionLinks.tsx index 66970b8a3..4241c3e50 100644 --- a/frontend/src/components/CollectionPage/CollectionLinks.tsx +++ b/frontend/src/components/CollectionPage/CollectionLinks.tsx @@ -1,15 +1,17 @@ import clsx from 'clsx'; import { useTranslation } from 'next-i18next'; +import { ComponentType } from 'react'; import { GitHub, OrcID, Twitter, Website } from 'src/components/icons'; import { Link } from 'src/components/Link'; import { Tooltip } from 'src/components/Tooltip'; import { CollectionLinks as CollectionLinksType } from 'src/types/collections'; +import { IconColorProps } from '../icons/icons.type'; import { useCollection } from './context'; type LinkKey = keyof CollectionLinksType; -function useLinkData(key: LinkKey) { +function useLinkData(key: LinkKey): [string, ComponentType] { const { t } = useTranslation(['collections']); switch (key) { @@ -66,7 +68,7 @@ function CollectionLink({ linkKey }: CollectionLinkProps) { disableInteractive leaveDelay={0} > - + @@ -83,7 +85,7 @@ export function CollectionLinks() { return (
{filteredLinks.map((key) => ( - + ))}
); diff --git a/frontend/src/components/CollectionPage/CollectionPluginList.tsx b/frontend/src/components/CollectionPage/CollectionPluginList.tsx index 4bbb811a4..fce25e779 100644 --- a/frontend/src/components/CollectionPage/CollectionPluginList.tsx +++ b/frontend/src/components/CollectionPage/CollectionPluginList.tsx @@ -36,7 +36,7 @@ export function CollectionPluginList() { )} href={`/plugins/${plugin.name}`} > -

{plugin.display_name || plugin.name} -

+ - + should match snapshot 1`] = ` class="border-r-[1px] border-black" /> should match snapshot 1`] = ` !link.value); @@ -256,7 +257,11 @@ function Links({ children, links }: LinksProps) { } > - + {hasEmptyLinks ? cloneElement(children, { color: '#999999', @@ -271,7 +276,7 @@ function CodeLinks() { const metadata = usePluginMetadata(); return ( - + ); @@ -281,7 +286,10 @@ function WebsiteLinks() { const metadata = usePluginMetadata(); return ( - + ); @@ -291,7 +299,10 @@ function SupportLinks() { const metadata = usePluginMetadata(); return ( - + ); diff --git a/frontend/src/components/SearchPage/PluginComplexFilter.tsx b/frontend/src/components/SearchPage/PluginComplexFilter.tsx index 1c3243ef8..45b96c6ba 100644 --- a/frontend/src/components/SearchPage/PluginComplexFilter.tsx +++ b/frontend/src/components/SearchPage/PluginComplexFilter.tsx @@ -96,13 +96,13 @@ const StyledPopper = styled(Popper)` `; function InputDropdown(props: InputDropdownProps) { - const { label, sdsStage } = props; + const { label, sdsStage, ...rest } = props; const iconSizeClassName = 'w-4 h-4'; return (