HomePhabricator
Diffusion Comm a4f03066a553

[native] Clean up Tooltip component

Description

[native] Clean up Tooltip component

Summary:
Lots of technical debt accumulated over the last couple months here. Big part of the problem is that we have to "drill" anything we need in from a hook.

This diff replaces the static spec we have today with a React component, which allows callers to use hooks to fetch any necessary data. It also looks pretty clean.

It also addresses a bug resulting from the relationship between options and icons not be considered - it was possible for icons to be matched to incorrect options.

After this diff, we should have no message-related code inside Tooltip, and going forward we should make sure we don't regress on that.

TooltipContext handles figuring out how many items can fit, as well as the relationship with the action sheet.

This is a pretty large diff, but I opted not to break it up because it otherwise would've been hard to see the changes to the Tooltip component if I had to keep both the old and the new ones alive across multiple diffs.

Test Plan: Played around with all of the tooltips in the iOS simulator. I need to test Android as well. @ginsu, could use some help here

Reviewers: ginsu, atul, tomek

Reviewed By: ginsu

Subscribers: ginsu

Differential Revision: https://phab.comm.dev/D6549

Details

Provenance
ashoatAuthored on Feb 3 2023, 12:01 AM
Reviewer
ginsu
Differential Revision
D6549: [native] Clean up Tooltip component
Parents
rCOMM663476da03a4: Revert "Temporary changes for staff release"
Branches
Unknown
Tags
Unknown