From 55de2d173b313cf3a1328569334622bc29edac86 Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 18 Oct 2023 15:46:57 -0400 Subject: [PATCH] Add ability to display refNames from track --- .../BaseFeatureDetail/index.tsx | 2 +- .../src/ui/AboutDialogContents.tsx | 7 +- .../product-core/src/ui/RefNameInfoPanel.tsx | 108 ++++++++++++++++++ 3 files changed, 115 insertions(+), 2 deletions(-) create mode 100644 packages/product-core/src/ui/RefNameInfoPanel.tsx diff --git a/packages/core/BaseFeatureWidget/BaseFeatureDetail/index.tsx b/packages/core/BaseFeatureWidget/BaseFeatureDetail/index.tsx index f9b3f65726..637e32fe1f 100644 --- a/packages/core/BaseFeatureWidget/BaseFeatureDetail/index.tsx +++ b/packages/core/BaseFeatureWidget/BaseFeatureDetail/index.tsx @@ -67,7 +67,7 @@ export function BaseCard({ } > - {title} + {title} {children} diff --git a/packages/product-core/src/ui/AboutDialogContents.tsx b/packages/product-core/src/ui/AboutDialogContents.tsx index 44434327c7..f45e0a323d 100644 --- a/packages/product-core/src/ui/AboutDialogContents.tsx +++ b/packages/product-core/src/ui/AboutDialogContents.tsx @@ -14,11 +14,15 @@ import { Attributes, } from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail' import FileInfoPanel from './FileInfoPanel' +import RefNamePanel from './RefNameInfoPanel' const useStyles = makeStyles()({ content: { minWidth: 800, }, + button: { + float: 'right', + }, }) function removeAttr(obj: Record, attr: string) { @@ -73,7 +77,7 @@ export default function AboutContents({ {!hideUris ? ( +
+ +
+              {refNames.slice(0, MAX_REF_NAMES).join('\n')}
+              {refNames.length > MAX_REF_NAMES
+                ? '\nToo many refNames to show in browser, use "Copy ref names" button to copy to clipboard'
+                : ''}
+            
+
+ + )} + + ) +}) + +export default RefNamePanel