Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up tooltips by default #640

Merged
merged 3 commits into from
Feb 10, 2017
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/core/src/components/tooltip/_tooltip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Styleguide components.tooltip.js.svg
@include react-transition(
"pt-popover",
(transform: scale(0.8) scale(1)),
$duration: $pt-transition-duration * 2,
$duration: $pt-transition-duration,
$after: "> &"
);

Expand Down
8 changes: 4 additions & 4 deletions packages/core/src/components/tooltip/tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export interface ITooltipProps extends IProps, IIntentProps {
* The amount of time in milliseconds the tooltip should wait before opening after the
* user hovers over the trigger. The timer is canceled if the user mouses away from the
* target before it expires.
* @default 150
* @default 100
*/
hoverOpenDelay?: number;

Expand Down Expand Up @@ -129,7 +129,7 @@ export class Tooltip extends React.Component<ITooltipProps, {}> {
className: "",
content: "",
hoverCloseDelay: 0,
hoverOpenDelay: 150,
hoverOpenDelay: 100,
isDisabled: false,
position: Position.TOP,
rootElementTag: "span",
Expand All @@ -142,7 +142,7 @@ export class Tooltip extends React.Component<ITooltipProps, {}> {
public displayName = "Blueprint.Tooltip";

public render(): JSX.Element {
const { children, intent, tooltipClassName } = this.props;
const { children, intent, tooltipClassName, transitionDuration } = this.props;
const classes = classNames(Classes.TOOLTIP, Classes.intentClass(intent), tooltipClassName);

return (
Expand All @@ -155,7 +155,7 @@ export class Tooltip extends React.Component<ITooltipProps, {}> {
interactionKind={PopoverInteractionKind.HOVER_TARGET_ONLY}
lazy={true}
popoverClassName={classes}
transitionDuration={200}
transitionDuration={transitionDuration}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double check that this is correct

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the better thing to do is to remove this line entirely cuz it's covered by {...this.props} spread

>
{children}
</Popover>
Expand Down