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)
Mon, Sep 16, 3:52 AM
Unknown Object (File)
Sun, Sep 15, 9:07 AM
Unknown Object (File)
Sun, Sep 15, 9:06 AM
Unknown Object (File)
Thu, Sep 12, 4:20 AM
Unknown Object (File)
Thu, Sep 12, 12:40 AM
Unknown Object (File)
Wed, Sep 11, 7:31 AM
Unknown Object (File)
Sun, Sep 8, 6:34 AM
Unknown Object (File)
Fri, Sep 6, 5:48 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
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