Page MenuHomePhabricator

[native] Fetch coordinates from context in nux tips overlay
ClosedPublic

Authored by inka on Aug 14 2024, 5:34 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 20, 6:58 AM
Unknown Object (File)
Fri, Dec 20, 6:01 AM
Unknown Object (File)
Fri, Dec 20, 5:46 AM
Unknown Object (File)
Fri, Dec 20, 12:57 AM
Unknown Object (File)
Nov 20 2024, 12:35 PM
Unknown Object (File)
Nov 20 2024, 12:35 PM
Unknown Object (File)
Nov 20 2024, 12:34 PM
Unknown Object (File)
Nov 10 2024, 5:59 AM
Subscribers

Details

Summary

issue: ENG-8617
As discussed in previous diff, we want the tip to fetch its coordinates from the context, instead of getting them in the route params

Test Plan

tested with following diffs, tested that the tip can be displayed and it fetches its coordinates correctly

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

inka requested review of this revision.Aug 14 2024, 5:51 AM
tomek requested changes to this revision.Aug 14 2024, 9:22 AM
tomek added inline comments.
native/tooltip/nux-tips-overlay.react.js
15–16 ↗(On Diff #43380)

Can be merged.

145–147 ↗(On Diff #43380)

It is a strange pattern to create a callback and immediately invoke it on every render. Why do we need to do it?

It looks like this approach can be replaced by a simple memo.

This revision now requires changes to proceed.Aug 14 2024, 9:22 AM
tomek added inline comments.
native/tooltip/nux-tips-overlay.react.js
125

This line was invalid, because it wasn't guaranteed for a render to happen, but after changes from D13085 it is safe.

This revision is now accepted and ready to land.Aug 20 2024, 7:31 AM