diff --git a/client/src/components/categorical/value/index.js b/client/src/components/categorical/value/index.js index 01ca7595..b556bd5e 100644 --- a/client/src/components/categorical/value/index.js +++ b/client/src/components/categorical/value/index.js @@ -9,7 +9,6 @@ import { Position, Icon, PopoverInteractionKind, - Tooltip, } from "@blueprintjs/core"; import Occupancy from "./occupancy"; import * as globals from "../../../globals"; @@ -18,8 +17,8 @@ import AnnoDialog from "../annoDialog"; import LabelInput from "../labelInput"; import { AnnotationsHelpers } from "../../../util/stateManager"; -import maybeTruncateString from "../../../util/maybeTruncateString"; import { labelPrompt, isLabelErroneous } from "../labelUtil"; +import Truncate from "../../util/truncate"; /* this is defined outside of the class so we can use it in connect() */ function _currentLabel(ownProps, categoricalSelection) { @@ -317,13 +316,6 @@ class CategoryValue extends React.Component { categories = schema.annotations.obsByName[colorAccessor]?.categories; } - const truncatedString = maybeTruncateString( - displayString, - colorAccessor && !isColorBy - ? globals.categoryLabelDisplayStringShortLength - : globals.categoryLabelDisplayStringLongLength - ); - const editModeActive = isUserAnno && annotations.labelEditable.category === metadataField && @@ -384,40 +376,34 @@ class CategoryValue extends React.Component { onMouseLeave={this.handleMouseEnter} /> - - - {truncatedString || displayString} - - + {displayString} + {editModeActive ? (