Page MenuHomePhabricator

[native] Refactor nux tips overlay to reanimated 2
ClosedPublic

Authored by inka on Aug 13 2024, 9:19 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)
Mon, Sep 9, 6:06 PM
Unknown Object (File)
Sun, Sep 8, 8:08 PM
Unknown Object (File)
Sun, Sep 8, 7:56 PM
Unknown Object (File)
Sun, Sep 8, 5:13 PM
Unknown Object (File)
Sun, Sep 8, 3:28 PM
Subscribers

Details

Summary

issue: ENG-9039

Test Plan

Please see the video (this is with longer duration):

Here is duration 150:

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

native/tooltip/nux-tips-overlay.react.js
9–12 ↗(On Diff #43366)

Those types are used in worklets. We have to import them for flow, but eslint doesn't understand that

84 ↗(On Diff #43366)

I don't think this value can ba calculated in any way? I think I just have to use something that looks rigth?

202–207 ↗(On Diff #43366)

For community drawer button which is rather small, the hardcoded 20 made it look awkward. I used 20% instead, but this may be changed later

228–230 ↗(On Diff #43366)

In worklets we cannot use flow types

inka requested review of this revision.Aug 13 2024, 9:37 AM
tomek added inline comments.
native/tooltip/nux-tips-overlay.react.js
9–12 ↗(On Diff #43366)

It seems like it can't be fixed on eslint level https://github.com/jsx-eslint/eslint-plugin-react/issues/1714. It needs to be fixed on babel level - I found an issue https://github.com/babel/babel/issues/15061 where someone is using flowComments plugin. Maybe we should give it a try. https://linear.app/comm/issue/ENG-9040/check-if-flowcomments-babel-plugin-allows-flow-comment-syntax

84 ↗(On Diff #43366)

Isn't it related to the height of the tooltip?

202–207 ↗(On Diff #43366)

Please simplify these expressions

This revision is now accepted and ready to land.Aug 14 2024, 6:08 AM

Simplify

native/tooltip/nux-tips-overlay.react.js
84 ↗(On Diff #43366)

You are right, going to fix this in D13072 where I move this to the component