-
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'my' context and user settings in mobile #256
Conversation
…hared module to be able to use i18n instance without passing t
Ok, one piece of possible weirdness: In the front end, we don't have the static groups. And the front-end basically treats |
@@ -77,7 +86,14 @@ export default function TabsNavigator () { | |||
/> | |||
<Tabs.Screen | |||
name='Settings Tab' | |||
component={UserSettingsTabsNavigator} | |||
component={HomeNavigator} // it will never navigate to this but we need to pass a valid component here anyway |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine by me for now.
By front-end you mean Web. How does it relate to things here? I am not making the connection, but I do hear that My and All are the same, or mostly the same target. I think if they are not actually the same then keeping them as their own targets it still good, and to share their common functionality through components they both use, vs blending the logic. However I'm speaking on abstractly and not entirely familiar with the patterns yet. My includes all of All though I think you were telling me? But still have an /all route? |
So yeah... Post new context menu; On web, at the moment, while the context part of their paths are still different, both the Its probably more trouble to keep both @tibetsprague would like you to add your perspective; do we really need to have the |
@@ -72,7 +72,7 @@ export default function UserSettingsTabsNavigator ({ navigation, route }) { | |||
}) | |||
}, [navigation, route]) | |||
|
|||
|
|||
console.log('does this get called? at alll?') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't, because the navigator isn't rendered
@@ -85,42 +85,42 @@ export default function UserSettingsTabsNavigator ({ navigation, route }) { | |||
name='Edit Profile' | |||
component={UserSettingsWebView} | |||
initialParams={{ | |||
path: '/settings' | |||
path: '/my/edit-profile' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was trying to navigate to these webviews with the existing structure and haven't figured it out. But do they even need a separate settings tab/navigator now? Could these screens just be moved over to the home navigator?
'/:groupSlug(all|public)/post/:id': `${AUTH_ROOT_SCREEN_NAME}/Drawer/Tabs/Home Tab/Post Details`, | ||
'/:groupSlug(all|public)/post/:id/comments/:commentId': `${AUTH_ROOT_SCREEN_NAME}/Drawer/Tabs/Home Tab/Post Details`, | ||
'/:groupSlug(all)/members/:id': `${AUTH_ROOT_SCREEN_NAME}/Drawer/Tabs/Home Tab/Member`, | ||
'/:groupSlug(all)/topics/:topicName': `${AUTH_ROOT_SCREEN_NAME}/Drawer/Tabs/Home Tab/Stream`, | ||
'/:groupSlug(all|public)/events': `${AUTH_ROOT_SCREEN_NAME}/Drawer/Tabs/Home Tab/Stream`, | ||
'/:groupSlug(all|public)': `${AUTH_ROOT_SCREEN_NAME}/Drawer/Tabs/Home Tab/Stream`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved this to the bottom, so other all/public paths wouldn't be eaten by this one first
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct! Always be on the lookout for that, the logic can seem a little inverted if thinking it through. This is always the correct pattern though. The least specific things last.
'/:groupSlug(my)/blocked-users': `${AUTH_ROOT_SCREEN_NAME}/Drawer/Tabs/Settings Tab/Blocked Users`, | ||
'/:groupSlug(my)/:section?': `${AUTH_ROOT_SCREEN_NAME}/Drawer/Tabs/Settings Tab/Edit Profile`, | ||
// So, some user settings aren't explicitly linked, but I assume are avaiable because of this section wildcard. | ||
// But ultimately everything just redirects to the `Edit Profile` screen.... so maybe none of the extra paths need to be here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right?
apps/mobile/src/screens/UserSettingsWebView/UserSettingsWebView.js
Outdated
Show resolved
Hide resolved
This is what openURL is translating the path to... and it looks right, as far as I can tell. But when its passed to Got any ideas on what needs to be switched around here? Am I just barking up the wrong tree by trying to navigate to these screens after changing the path structure? |
oooooooooo I have an idea.... I removed the Settings Tab from the Tabs navigator when I made the changes to the user avatar... will fiddle with that for a second |
Ok, that kinda works. I'll keep playing with this when I get back from my break |
my perspective on /my and /all. The main reasons to keep /all are:
That being said I could be convinced to switch to /my for everything with a good proposal :) |
/my/groups/stream ? |
…arams processing in custom linking config
…gging logging and comments, cleans-up some code
Make i18n-next instance (not config or translations) a shared module
…t+user-settings-mobile-LEJ
…com/Hylozoic/hylo into 254-my-context+user-settings-mobile
…bile-LEJ 'my' context and user settings in mobile (LEJ)
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
See #254 for the goals of this branch.
@lorenjohnson I'm trying to treat each commit on this branch as a diff worth discussing.
First one in, want to get your feel on the brute force approach for my context nav out of the tab
Will next focus on making sure the various
my
context menu links work