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

[Tooltip] Converted to a functional component #2543

Merged
merged 5 commits into from
Jan 6, 2020
Merged

Conversation

AndrewMusgrave
Copy link
Member

@AndrewMusgrave AndrewMusgrave commented Dec 11, 2019

WHY are these changes introduced?

More context here

@github-actions
Copy link
Contributor

github-actions bot commented Dec 11, 2019

💦 Potential splash zone of changes introduced to src/**/*.tsx in this pull request:

Files modified2
Files potentially affected3

Details

All files potentially affected (total: 3)
📄 UNRELEASED.md (total: 0)

Files potentially affected (total: 0)

🧩 src/components/Tooltip/Tooltip.tsx (total: 3)

Files potentially affected (total: 3)


This comment automatically updates as changes are made to this pull request.
Feedback, troubleshooting: open an issue or reach out on Slack in #polaris-tooling.

@AndrewMusgrave AndrewMusgrave marked this pull request as ready for review December 16, 2019 21:55
activatorWrapper = 'span',
}: TooltipProps) {
const WrapperComponent: any = activatorWrapper;
const {value: active, setTrue: handleFocus, setFalse: handleBlur} = useToggle(
Copy link
Contributor

Choose a reason for hiding this comment

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

TIL about useToggle 😄

@LauraAubin
Copy link
Contributor

Looks like a test where activatorContainer is null could improve codecov

@AndrewMusgrave
Copy link
Member Author

activatorContainer.current will never be null in useEffect, the check appeases typescript and prevents future regression but isn't currently testable.

@AndrewMusgrave AndrewMusgrave merged commit 1acb51a into master Jan 6, 2020
@AndrewMusgrave AndrewMusgrave deleted the funcify-tooltip branch January 6, 2020 18:59
@LauraAubin LauraAubin temporarily deployed to production January 16, 2020 16:22 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants