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
F3499739: D13071.diff
Fri, Dec 20, 12:05 AM
Unknown Object (File)
Sun, Dec 15, 1:44 PM
Unknown Object (File)
Sun, Dec 15, 1:57 AM
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 9 2024, 8:28 PM
Unknown Object (File)
Nov 8 2024, 11:06 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
No Lint Coverage
Unit
No Test Coverage

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