Page MenuHomePhabricator

[native] extract tab navigator from app navigator
AbandonedPublic

Authored by ashoat on Jul 21 2022, 12:41 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 22, 10:53 AM
Unknown Object (File)
Fri, Nov 22, 10:53 AM
Unknown Object (File)
Fri, Nov 22, 10:53 AM
Unknown Object (File)
Oct 23 2024, 2:49 AM
Unknown Object (File)
Oct 22 2024, 11:47 AM
Unknown Object (File)
Oct 22 2024, 11:24 AM
Unknown Object (File)
Oct 21 2024, 9:52 PM
Unknown Object (File)
Sep 6 2024, 9:51 AM

Details

Summary

extract tab navigator from app navigator before adding community navigation

Test Plan

the app should load and navigate correctly through the different screens

Diff Detail

Repository
rCOMM Comm
Branch
@albert/tab-navigator
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

You should always put a reviewer on your diffs!! Feel free to ask me next time for pointers on who to pick

native/navigation/tab-navigator.react.js
1–129

Has any of this code changed or is it just moved?

You should always put a reviewer on your diffs!! Feel free to ask me next time for pointers on who to pick

Looking through the git history can be helpful to determine who good reviewers for a diff might be. You can obviously do this with git blame, but Phabricator/Arcanist also provides an arc cover utility that's a little more convenient to use imo.

EG the output of arc cover for this diff:

atul@atuls-MacBook-Pro comm % arc cover
Ashoat Tevosyan
  native/calendar/calendar.react.js: 2 line(s) 56, 67
  native/calendar/entry.react.js: 3 line(s) 66, 72-73
  native/chat/chat-list.react.js: 1 line(s) 21
  native/chat/chat-thread-list.react.js: 2 line(s) 39, 46
  native/chat/settings/thread-settings.react.js: 3 line(s) 44, 54-55
  native/navigation/app-navigator.react.js: 71 line(s) 3, 9, 11-12, 28, 36, 38, 49, 51, 54-55, 58-60, 62-64, 66-67, 69-71, 74-75, 77-78, 81-82, 86-95, 104-106, 111-115, 119-126, 128-133, 137, 143-147, 246, 248-251
ashoat
  native/calendar/calendar.react.js: 1 line(s) 68
Tomasz Palys
  native/chat/chat-list.react.js: 1 line(s) 22
  native/chat/chat-thread-list.react.js: 1 line(s) 45
  native/navigation/app-navigator.react.js: 1 line(s) 13
Atul Madhugiri
  native/navigation/app-navigator.react.js: 33 line(s) 4, 10, 61, 65, 68, 76, 79-80, 83-85, 96-103, 107-110, 116-118, 127, 138-142, 247
Jacek Nitychoruk
  native/navigation/app-navigator.react.js: 1 line(s) 18
KatPo
  native/navigation/app-navigator.react.js: 7 line(s) 24, 37, 72-73, 134-136

WHOA that's sick!! Didn't know about arc cover, that is so useful

abosh retitled this revision from ≈[native] extract tab navigator from app navigator to [native] extract tab navigator from app navigator.Jul 25 2022, 7:46 AM

For context, this diff is the first step to building out the "side drawer" community navigation on mobile. @albert, can you add a link to the Figma in the diff description?

native/navigation/tab-navigator.react.js
1–129

@albert, ping to respond to this

native/navigation/tab-navigator.react.js
1–129

It's mostly moved with a few exceptions, added an export, props to the TabNavigator function and an es-lint disable for the props. The props are because checking the code with flow was yielding errors, though they aren't being used in the file.

Cannot create App.Screen element because property navigation is missing

and

Cannot create App.Screen element because property route is missing
tomek requested changes to this revision.Jul 26 2022, 8:14 AM
tomek added inline comments.
native/navigation/tab-navigator.react.js
80

Why do we need to introduce a new prop? Originally, the TabNavigator didn't have any props.

If it is really needed, we should do this in a separated diff. When in a diff we move and update the code, it is really hard to review it.
https://www.notion.so/commapp/Moving-code-around-bbb551c4350b4d5cb553c6751be44314

This revision now requires changes to proceed.Jul 26 2022, 8:14 AM
native/navigation/tab-navigator.react.js
80

I can see that you mentioned that the purpose of the props is to avoid a flow issue. We need to investigate why the issue occurred and fix the cause of it.

native/chat/settings/thread-settings.react.js
54

@tomek question about moving vs updating code in this context. Since this is the result of the new file, it would be allowed. The code changes to watch out for would be more functional (e.g. adding params, side effects, etc.) I don't have access to the Notion yet but Ashoat shared a screenshot earlier.

native/navigation/tab-navigator.react.js
80

Makes sense! I'll dig into it and will try to see who would be good to ping if it's not jumping out.

ashoat requested changes to this revision.Jul 26 2022, 12:16 PM

Pinging this request:

@albert, can you add a link to the Figma in the diff description?

native/navigation/tab-navigator.react.js
1–129

If anything in this huge blob of green has been changed, that should be in a separate diff. It's impossible to review the changes here because it all appears as green

Resigning, feel free to add me back if there's something specific I can be helpful with.

ashoat abandoned this revision.
ashoat edited reviewers, added: albert; removed: ashoat.