Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions front_end/entrypoints/rn_inspector/rn_inspector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Root.Runtime.experiments.register(
'Show React Native-specific UI',
/* unstable */ false,
/* docLink */ globalThis.reactNativeDocLink ?? 'https://reactnative.dev/docs/debugging',
/* feedbackLink */ globalThis.reactNativeFeedbackLink,
);

Root.Runtime.experiments.register(
Expand Down
1 change: 1 addition & 0 deletions front_end/global_typings/react_native.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ declare global {
var enableReactNativePerfMetrics: boolean|undefined;
var enableReactNativePerfMetricsGlobalPostMessage: boolean|undefined;
var reactNativeDocLink: string|undefined;
var reactNativeFeedbackLink: string|undefined;
}
}
17 changes: 16 additions & 1 deletion front_end/panels/rn_welcome/RNWelcome.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ const UIStrings = {
/** @description "Debugging docs" link */
docsLabel: 'Debugging docs',
/** @description "What's new" link */
whatsNewLabel: "What's new",
whatsNewLabel: 'What\'s new',
/** @description "Send feedback" link */
feedbackLabel: 'Send feedback',
};
const {render, html} = LitHtml;

Expand Down Expand Up @@ -51,6 +53,8 @@ export class RNWelcomeImpl extends UI.Widget.VBox {

render(): void {
const welcomeIconUrl = new URL('../../Images/react_native/welcomeIcon.png', import.meta.url).toString();
const feedbackLink = this.getFeedbackLink();

render(
html`
<div class="rn-welcome-panel">
Expand All @@ -73,6 +77,11 @@ export class RNWelcomeImpl extends UI.Widget.VBox {
<x-link class="devtools-link" href="https://reactnative.dev/blog">
${i18nString(UIStrings.whatsNewLabel)}
</x-link>
${!feedbackLink ? LitHtml.nothing : html`
<x-link class="devtools-link" href=${feedbackLink}>
${i18nString(UIStrings.feedbackLabel)}
</x-link>
`}
</div>
</div>
`,
Expand All @@ -86,4 +95,10 @@ export class RNWelcomeImpl extends UI.Widget.VBox {

return experimentDocLink ?? 'https://reactnative.dev/docs/debugging';
}

private getFeedbackLink(): string|undefined {
return Root.Runtime.experiments.enabledExperiments()
.find(e => e.name === Root.Runtime.ExperimentName.REACT_NATIVE_SPECIFIC_UI)
?.feedbackLink;
}
}