Page MenuHomePhabricator

[native] Create custom top tabs component
ClosedPublic

Authored by inka on Aug 14 2024, 6:53 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 12, 5:35 PM
Unknown Object (File)
Tue, Nov 12, 5:18 PM
Unknown Object (File)
Tue, Nov 12, 5:07 PM
Unknown Object (File)
Sat, Nov 9, 10:20 PM
Unknown Object (File)
Sat, Nov 9, 10:13 PM
Unknown Object (File)
Sat, Nov 9, 8:45 PM
Unknown Object (File)
Wed, Oct 23, 5:02 AM
Unknown Object (File)
Wed, Oct 23, 3:45 AM
Subscribers

Details

Summary

issue: ENG-8541
We need this to be able to display the button for the muted tab tip.
For now this results in some changes to the style: the indicator doesn't smoothly move from one tab to the second, and there is some on press feedback that wasn't present before. I'll address those changes in ENG-9041

Test Plan

Please see the videos:

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

native/chat/chat-tab-bar-button.react.js
117–127 ↗(On Diff #43385)

Based on source code

native/chat/chat-tab-bar.react.js
39–57 ↗(On Diff #43385)
native/components/nux-tips-context.react.js
12 ↗(On Diff #43387)

The home tab tip wasn't in the initial scope, but was mentioned in a comment here. We will probably want to add it

Harbormaster returned this revision to the author for changes because remote builds failed.Aug 14 2024, 7:20 AM
Harbormaster failed remote builds in B31101: Diff 43387!
inka requested review of this revision.Aug 14 2024, 9:45 AM
tomek requested changes to this revision.Aug 14 2024, 9:55 AM

Looks ok, but based on this comment https://linear.app/comm/issue/ENG-9041/update-tabs-style#comment-ce51487d I'm wondering if we can use TabBarItem from react-native-tab-view.

native/chat/chat-tab-bar-button.react.js
97 ↗(On Diff #43387)

Can we use something from our color palette?

This revision now requires changes to proceed.Aug 14 2024, 9:55 AM

Use components from react-native-tab-view

tomek added inline comments.
native/chat/chat-tab-bar.react.js
42–48 ↗(On Diff #43678)

Can we use something from innerProps.route as a key of ButtonTitleToTip? That would make it less fragile.

native/chat/chat.react.js
124–125 ↗(On Diff #43678)
125 ↗(On Diff #43678)

I guess we can use React.Node here

545 ↗(On Diff #43678)

Exporting values next to a default export usually causes some hot reloading issues. Could you move these values somewhere else?

This revision is now accepted and ready to land.Aug 27 2024, 7:10 AM
inka planned changes to this revision.Aug 27 2024, 7:53 AM

I need a separate ref for every tab, this doesn't work

This revision is now accepted and ready to land.Aug 27 2024, 8:49 AM
inka requested review of this revision.Aug 27 2024, 8:49 AM
This revision is now accepted and ready to land.Aug 28 2024, 8:22 AM
This revision was automatically updated to reflect the committed changes.