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

Refactores the Tooltip component into a functional component #27353

Closed
wants to merge 5 commits into from

Conversation

grzim
Copy link
Contributor

@grzim grzim commented Nov 28, 2020

Description

Regarding #22890 "Refactor all React class components to functional components using hooks" this pull request contains a rewritten tooltip

How has this been tested?

Changes tested visually and with a set of unit tests that were adjusted to work with the functional component.

Screenshots

Types of changes

Refactoring

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR.

@grzim grzim changed the title From classical to fn tootltip From classical to fn tooltip Nov 28, 2020
@gziolo gziolo added the [Type] Code Quality Issues or PRs that relate to code quality label Nov 29, 2020
@grzim grzim changed the title From classical to fn tooltip Refactores the Tooltip component into a functional component Nov 30, 2020
Copy link
Contributor

@draganescu draganescu left a comment

Choose a reason for hiding this comment

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

LGTM, tested and works as expected. @grzim check if the tests pas and maybe fix that nitpick I left about that old comment.

}
function Tooltip( { children, position, text, shortcut } ) {
/**
* Whether a the mouse is currently pressed, used in determining whether
Copy link
Contributor

Choose a reason for hiding this comment

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

"Whether a the mouse" => "Whether the mouse"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

comment fixed,
tooltip unit tests are passing

@grzim
Copy link
Contributor Author

grzim commented Dec 11, 2020

resolved in #27682

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants