This repository has been archived by the owner on Mar 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 55
chore(Tooltip): move to function component #2357
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
layershifter
requested review from
dvdzkwsk,
dzearing,
ecraig12345,
JasonGore,
jdhuntington,
kenotron,
levithomason,
miroslavstastny and
mnajdova
as code owners
February 14, 2020 11:41
Perf comparison
Potential regressions comparing to master
Perf tests with no regressions
Generated by 🚫 dangerJS |
mnajdova
reviewed
Feb 17, 2020
@@ -68,6 +67,12 @@ export interface TooltipProps | |||
/** Defines whether tooltip is displayed. */ | |||
open?: boolean | |||
|
|||
// TODO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ups
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
mnajdova
reviewed
Feb 17, 2020
e: React.MouseEvent | React.FocusEvent | React.KeyboardEvent, | ||
data: TooltipProps, | ||
) => void | ||
|
||
/** | ||
* TODO: should this be centralized? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know what this means as it was added previously 🤔 I removed it for now
mnajdova
reviewed
Feb 17, 2020
…ore/tooltip-to-hooks � Conflicts: � packages/react/src/components/Tooltip/Tooltip.tsx
mnajdova
reviewed
Feb 17, 2020
mnajdova
approved these changes
Feb 17, 2020
Co-Authored-By: Marija Najdova <mnajdova@gmail.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
BREAKING CHANGES
As in other components converted to hooks
TooltipContent
now passes only these props to styles:placement
,pointing
,open
.Performance
I used an example with 100 opened
Tooltip
s to measure rendering speed. And it almost 2 times faster because of enabled caching (#2309).Before
After without caching
It's also a bit faster because
Tooltip
now completely omits styles computations.After