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
F3193597: D13079.id43464.diff
Fri, Nov 8, 11:06 PM
Unknown Object (File)
Fri, Nov 8, 6:34 PM
Unknown Object (File)
Fri, Nov 8, 6:15 PM
Unknown Object (File)
Fri, Nov 8, 12:23 PM
Unknown Object (File)
Fri, Oct 18, 9:48 PM
Unknown Object (File)
Fri, Oct 18, 9:42 PM
Unknown Object (File)
Fri, Oct 18, 9:38 PM
Unknown Object (File)
Sep 29 2024, 4:51 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