Page MenuHomePhabricator

[native] Add mappaing from nux tips to button onPress params
ClosedPublic

Authored by inka on Aug 14 2024, 3:51 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)
Sat, Sep 14, 12:12 AM
Unknown Object (File)
Wed, Sep 11, 4:55 PM
Unknown Object (File)
Wed, Sep 11, 2:03 AM
Unknown Object (File)
Mon, Sep 9, 7:54 AM
Unknown Object (File)
Sun, Sep 8, 3:21 PM
Subscribers

Details

Summary

issue: ENG-8617
A handler will display one tip, then pressing on ok will navigate to the next tip and so on. So we need to be able to provide each tip with coordinates and params for the next tip.
We will do this like so: route.params will include a tipKey, and the tip will fetch its coordinates from the context. It will also use this getTipCallbackParams function to get params for the next tip it has to navigate to.

Test Plan

Tested with later diffs - tested that this solution works and it is possible to navigate to next tips

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

inka added inline comments.
native/components/nux-tips-context.react.js
26 ↗(On Diff #43376)

This will be changed once a screen for MUTED is added

40–45 ↗(On Diff #43376)

We don't need this to be nullable now that the whole object is optional

Harbormaster returned this revision to the author for changes because remote builds failed.Aug 14 2024, 4:04 AM
Harbormaster failed remote builds in B31090: Diff 43376!
native/components/nux-tips-context.react.js
16 ↗(On Diff #43376)

Why is it called CallbackParams? Can we find a less implementation-specific name?

Also, we can consider including a tip text in this object.

native/components/nux-tips-context.react.js
16 ↗(On Diff #43376)

It doesn't make sense to include text here because we are passing the button to createNUXTipsOverlay anyway, and text directly depends on the button

inka requested review of this revision.Aug 19 2024, 9:04 AM
This revision is now accepted and ready to land.Aug 20 2024, 1:21 AM