Skip to content

Commit

Permalink
Add experiment to configure internal debugger branding (#44388)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #44388

Towards the open source rollout of the `rn_fusebox.ts` entry point.

NOTE: Requires facebookexperimental/rn-chrome-devtools-frontend#59, but can (and should) be landed safely beforehand.

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D56883040
  • Loading branch information
huntie authored and facebook-github-bot committed May 2, 2024
1 parent b38f80a commit c37f8f9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/dev-middleware/src/createDevMiddleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,5 +129,6 @@ function getExperiments(config: ExperimentsConfig): Experiments {
enableNewDebugger: config.enableNewDebugger ?? false,
enableOpenDebuggerRedirect: config.enableOpenDebuggerRedirect ?? false,
enableNetworkInspector: config.enableNetworkInspector ?? false,
useInternalBranding: config.useInternalBranding ?? false,
};
}
6 changes: 6 additions & 0 deletions packages/dev-middleware/src/types/Experiments.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ export type Experiments = $ReadOnly<{
* Enables the Network panel when launching the custom debugger frontend.
*/
enableNetworkInspector: boolean,

/**
* [Meta-internal] Controls visibility of the internal "Fusebox" codename
* across the UI when using the modern `rn_fusebox` entry point.
*/
useFuseboxInternalBranding: boolean,
}>;

export type ExperimentsConfig = Partial<Experiments>;
6 changes: 6 additions & 0 deletions packages/dev-middleware/src/utils/getDevToolsFrontendUrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ export default function getDevToolsFrontendUrl(
if (experiments.enableNetworkInspector) {
searchParams.append('unstable_enableNetworkPanel', 'true');
}
if (
options?.useFuseboxEntryPoint === true &&
experiments.useFuseboxInternalBranding
) {
searchParams.append('unstable_useInternalBranding', 'true');
}
if (options?.launchId != null && options.launchId !== '') {
searchParams.append('launchId', options.launchId);
}
Expand Down

0 comments on commit c37f8f9

Please sign in to comment.