Skip to content

Commit

Permalink
fix(catalog tile): remove the default tooltip for description text (p…
Browse files Browse the repository at this point in the history
…atternfly#640)

affects: patternfly-react-extensions

ISSUES CLOSED: patternfly#637
  • Loading branch information
jeff-phillips-18 authored and dtaylor113 committed Sep 21, 2018
1 parent a9be410 commit cca07db
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { OverlayTrigger, Tooltip } from 'patternfly-react';

import CatalogTileBadge from './CatalogTileBadge';

Expand All @@ -26,11 +25,11 @@ const CatalogTile = ({
return text;
}

const tooltip = <Tooltip id={`${id || Date.now()}_tooltip`}>{text}</Tooltip>;
return (
<OverlayTrigger overlay={tooltip} placement="top">
<span>{`${text.substring(0, max - 3)}...`}</span>
</OverlayTrigger>
<React.Fragment>
{text.substring(0, max - 3)}
&hellip;
</React.Fragment>
);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,7 @@ exports[`CatalogTile renders properly 1`] = `
<div
class="catalog-tile-pf-description"
>
<span>
This is a very long description that should be truncated after 112 characters. 112 is the default but can be ...
</span>
This is a very long description that should be truncated after 112 characters. 112 is the default but can be …
</div>
</div>
</div>
Expand Down

0 comments on commit cca07db

Please sign in to comment.