Skip to content

Commit

Permalink
Add feedback context menu for IG feedback flow
Browse files Browse the repository at this point in the history
Summary:
## Context:
IG uses context menu instead of bottomsheet for the feedback flow:
 {F1731709882}

Differential Revision:
D59036272

Privacy Context Container: L1264565

fbshipit-source-id: 965a6171be36be8a3a392a4042ab240922fecda1
  • Loading branch information
Xiang Shen authored and facebook-github-bot committed Jul 2, 2024
1 parent 9577292 commit 0c75986
Showing 1 changed file with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,29 @@ Component: $name""")
yOffset)
}

/**
* Will invoke [showTooltip] for the given [handle] if it has a valid container. The code of
* [showTooltip] should be the one responsible for drawing the tooltip in the screen and is left
* for the client implementation.
*/
@JvmStatic
fun showTooltipOnHandle(
c: ComponentContext,
handle: Handle,
showTooltip: (container: View, anchorBounds: Rect) -> Unit
) {
showTooltipOnHandle(
c = c,
lithoTooltip = { container, anchorBounds, _, _ ->
if (container != null) {
showTooltip(container, anchorBounds)
}
},
handle = handle,
xOffset = 0,
yOffset = 0)
}

/**
* Show the given tooltip with the specified offsets from the bottom-left corner of the component
* with the given anchorKey.
Expand Down

0 comments on commit 0c75986

Please sign in to comment.