mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-30 02:28:12 +08:00
genesets e2e tests, undo/redo (#2327)
* undo redo create * edit undo redo * all tests pass, add, edit * description * remove RER1 * remove rer1 * remove from hosted
This commit is contained in:
@@ -90,6 +90,7 @@ class GeneSet extends React.Component<{}, State> {
|
||||
onClick={this.onGenesetMenuClick}
|
||||
>
|
||||
<Truncate
|
||||
isGenesetDescription
|
||||
tooltipAddendum={
|
||||
genesetDescription ? `: ${genesetDescription}` : ""
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ const SECOND_HALF_INNER_STYLE = {
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any -- - FIXME: disabled temporarily on migrate to TS.
|
||||
export default (props: any) => {
|
||||
const { children, tooltipAddendum = "" } = props;
|
||||
const { children, isGenesetDescription, tooltipAddendum = "" } = props;
|
||||
// Truncate only support a single child with a text child
|
||||
|
||||
if (
|
||||
@@ -89,9 +89,22 @@ export default (props: any) => {
|
||||
"aria-label": originalString,
|
||||
})
|
||||
);
|
||||
// we need an ID to check for this content, since this is the only place the geneset description appears
|
||||
const descriptionContent = (
|
||||
<span
|
||||
test-id={`geneset-description-tooltip-${originalString}${tooltipAddendum}`}
|
||||
>
|
||||
{originalString}
|
||||
{tooltipAddendum}
|
||||
</span>
|
||||
);
|
||||
return (
|
||||
<Tooltip2
|
||||
content={`${originalString}${tooltipAddendum}`}
|
||||
content={
|
||||
isGenesetDescription
|
||||
? descriptionContent
|
||||
: `${originalString}${tooltipAddendum}`
|
||||
}
|
||||
hoverOpenDelay={tooltipHoverOpenDelayQuick}
|
||||
// @ts-expect-error ts-migrate(2769) FIXME: No overload matches this call.
|
||||
targetProps={{ style: children.props.style }}
|
||||
|
||||
Reference in New Issue
Block a user