-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Components: refactor Navigator*
folder structure, rename Navigator
to NavigatorProvider
#35160
Conversation
Size Change: +4 B (0%) Total Size: 1.06 MB
ℹ️ View Unchanged
|
packages/components/src/index.js
Outdated
@@ -97,7 +97,7 @@ export { default as __experimentalNavigationGroup } from './navigation/group'; | |||
export { default as __experimentalNavigationItem } from './navigation/item'; | |||
export { default as __experimentalNavigationMenu } from './navigation/menu'; | |||
export { | |||
Navigator as __experimentalNavigator, | |||
NavigatorRoot as __experimentalNavigatorRoot, |
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.
To be honest I don't like the name NavigatorRoot
. I feel it can be confused with the "Root Screen". In other places in the UI Components we use Provider
so maybe NavigatorProvider
would be better for me. That said, don't take my word for it, I know I'm not great at naming things :P
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.
Naming things is hard, and doing so in a project like Gutenberg is even harder! NavigatorProvider
sounds good to me, I'll go ahead and make changes
Navigator
's folder structure, rename to NavigatorRoot
Navigator*
folder structure, rename Navigator
to NavigatorProvider
aa7f003
to
c2f0a3a
Compare
@youknowriad , this PR is ready for another round of review |
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.
LGTM 👍
Edit: actually nevermind, my bad. Looks like the 2 parallel PRs didn't cause any conflicts. Sorry for the ping! |
Description
This is part of a series of smaller PRs that aim at refining the family of
Navigator
components and is part of a larger effort tracked in #34907.This PR slightly refactors the folder structure of the
Navigator*
components family, following the contributing guidelines:Navigator
has been renamed toNavigatorProvider
(also to avoid confusion with theuseNavigator
hook, which could be otherwise mistaken for the hook of theNavigator
component)NavigatorProvider
andNavigatorScreen
have been moved to subfolders, respectivelynavigator-provider
andnavigator-screen
NavigatorScreen
Navigator
to now referenceNavigatorProvider
Future follow-up PRs will introduce unit tests and refactor the family of components to TypeScript.
How has this been tested?
There are no runtime changes.
Screenshots
Types of changes
Checklist:
*.native.js
files for terms that need renaming or removal).