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)
Wed, Nov 20, 12:35 PM
Unknown Object (File)
Wed, Nov 20, 12:35 PM
Unknown Object (File)
Wed, Nov 20, 12:34 PM
Unknown Object (File)
Nov 10 2024, 5:59 AM
Unknown Object (File)
Nov 9 2024, 10:06 PM
Unknown Object (File)
Nov 9 2024, 9:50 PM
Unknown Object (File)
Nov 9 2024, 8:46 PM
Unknown Object (File)
Nov 8 2024, 11:06 PM
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
Lint Not Applicable
Unit
Tests Not Applicable

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 ↗(On Diff #43464)

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