-
-
Notifications
You must be signed in to change notification settings - Fork 533
V5 #820
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
V5 #820
Conversation
BREAKING CHANGE: V5 will be the react tooltip built from scratch
Hi guys, I want to know your thoughts about a thing, as in the current code of V5, we only have 2 elements for tooltip:
And there are a lot of props related to tooltip customization and arrow customization, like:
And we can override the default styles by simply using CSS in prop V5 CSS style file: https://github.com/ReactTooltip/react-tooltip/pull/820/files#diff-f3be1842ab0f045e66d70c56d859378687b1522beaced9541d38c307157114df So, those v4 props sound redundant to me, what does everyone thinks about that? |
I think you should make it as simple as possible, still keeping the same customization available. So if you are able to make the changes with pure CSS, it is fine to leave these props out - but you will want to make a migration guide + example to show how to change them with CSS in the new version. It's great you are able to work on this and possibly get to a more react style component with the new version! I'm sure many people are looking forward to it! |
hey @aronhelser, I'm very happy to have your feedback, thanks! Yes, sure! I'll update docs and the release notes with the steps and changes after every change :) |
PR is ready to be reviewed and tested. Please let me know your thoughts as soon as possible, I planned to release V5 in a few days 🙏🏻 |
It looks great! I don't have particular comments about code style or anything. I see a few typos various places in docs/readme, but I don't think that should hold you up. I haven't worked in typescript in 7 years, so I would defer to someone else there. +1 |
Thanks :D oh, the typos are in Grammarly? Please, do the suggestions, I'm not a native English speaker, but I'm still improving my English hahaha |
I'll release ReactTooltip V5 tomorrow (December 7), if anyone has anything to say before that, now it's the moment :) |
All issues related to V4 will be closed. They are old and the codebase from V4 to V5 is totally different. |
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.
Looks great! goodluck to V5!
🤞🏻 |
Upgrade Guide in new docs
Installing
or
Current exported files
Changelog V4 -> V5
Improvements
uuid
useId
(https://beta.reactjs.org/apis/react/useId)useId
was introduced only into React v18, so, that will be the minimum necessary version of React to V5prop-types
(I'm thinking if we will use prop-types with TS)V4
props available inV5
:data-place
type- Deprecated | in V5 ->variant
-data-variant
data-offset
padding- Deprecated | in V5 -> can be easy updated by className propmultiline- Deprecated | in V5 -> this is already supported as default bycontent
andhtml
propsborder- Deprecated | in V5 -> can be easy updated byclassName
propborderClass- Deprecated | in V5 -> can be easy updated byclassName
proptextColor- Deprecated | in V5 -> can be easy updated byclassName
propbackgroundColor- Deprecated | in V5 -> can be easy updated byclassName
propborderColor- Deprecated | in V5 -> can be easy updated byclassName
proparrowColor- Deprecated | in V5 -> can be easy updated byclassName
proparrowRadius- Deprecated | in V5 -> can be easy updated byclassName
proptooltipRadius- Deprecated | in V5 -> can be easy updated byclassName
propinsecure- Deprecated | in V5 -> CSS will be a separate file and can be imported or notdata-delay-hide
delayUpdate- Deprecated | if requested, can be implemented laterdata-delay-show
eventOff- DeprecatedisCapture- DeprecatedglobalEventOff- DeprecatedoverridePosition- Deprecateddisable- Deprecated | in V5 -> state can be controlled or uncontrolleddata-wrapper
bodyMode- Deprecatedclickable- Deprecated | Supported by default in V5disableInternalStyle- Deprecated | in V5 -> CSS will be a separate file and can be imported or notBreak Changes
tooltip
into his namepadding: 8px 21px;
topadding: 8px 16px;
Tooltip
instead ofReactTooltip
Tooltip
component in your application and want to explicitly declare this isReactTooltip
, justimport { Tooltip as ReactTooltip } from "react-tooltip"
data-tip
attribute now isdata-content
getContent
prop now doesn't acceptany
anymore, just afunction
solid
instead offloat
New Props
data-events
-['hover', 'click']
- default:['hover']
(always an array when using as prop, even with only one option, when using as data attribute:data-events="hover click"
)boolean
(to control tooltip state) - if not used, internal state of tooltip will handle the show statefunction
(to control tooltip state) - if not used, internal state of tooltip will handle the show state