From cc2e7b6c2147798552b0c7f316afe3b82dddc463 Mon Sep 17 00:00:00 2001 From: Colin Date: Thu, 1 Apr 2021 21:26:31 -0400 Subject: [PATCH] Pare down globalOmits --- .../BaseFeatureWidget/BaseFeatureDetail.tsx | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/packages/core/BaseFeatureWidget/BaseFeatureDetail.tsx b/packages/core/BaseFeatureWidget/BaseFeatureDetail.tsx index 0bc8327f41..178aa353a6 100644 --- a/packages/core/BaseFeatureWidget/BaseFeatureDetail.tsx +++ b/packages/core/BaseFeatureWidget/BaseFeatureDetail.tsx @@ -23,17 +23,11 @@ import SequenceFeatureDetails from './SequenceFeatureDetails' import { BaseCardProps, BaseProps } from './types' import { SimpleFeatureSerialized } from '../util/simpleFeature' +// these are always omitted as too detailed const globalOmit = [ - 'name', - 'start', - 'end', - 'strand', - 'refName', - 'type', 'length', 'position', 'subfeatures', - 'description', 'uniqueId', 'exonFrames', 'parentId', @@ -41,6 +35,17 @@ const globalOmit = [ 'thickEnd', ] +// coreDetails are omitted in some circumstances +const coreDetails = [ + 'name', + 'start', + 'end', + 'strand', + 'refName', + 'description', + 'type', +] + export const useStyles = makeStyles(theme => ({ expansionPanelDetails: { display: 'block', @@ -438,7 +443,7 @@ export const FeatureDetails = (props: { omit?: string[] formatter?: (val: unknown, key: string) => JSX.Element }) => { - const { model, feature, depth = 0 } = props + const { omit = [], model, feature, depth = 0 } = props const { name, id, type, subfeatures } = feature const displayName = (name || id) as string | undefined const ellipsedDisplayName = @@ -460,7 +465,11 @@ export const FeatureDetails = (props: {
Attributes
- + {sequenceTypes.includes(feature.type) ? ( (