diff --git a/front_end/entrypoints/rn_inspector/rn_inspector.ts b/front_end/entrypoints/rn_inspector/rn_inspector.ts index ca88b10012a..c8011fbd5ae 100644 --- a/front_end/entrypoints/rn_inspector/rn_inspector.ts +++ b/front_end/entrypoints/rn_inspector/rn_inspector.ts @@ -34,9 +34,11 @@ Root.Runtime.experiments.register( ); Root.Runtime.experiments.register( - Root.Runtime.ExperimentName.REACT_NATIVE_SPECIFIC_UI, - 'Show React Native-specific UI', - /* unstable */ false, + Root.Runtime.ExperimentName.REACT_NATIVE_SPECIFIC_UI, + 'Show React Native-specific UI', + /* unstable */ false, + /* docLink */ globalThis.reactNativeDocLink ?? 'https://reactnative.dev/docs/debugging', + /* feedbackLink */ globalThis.reactNativeFeedbackLink, ); Root.Runtime.experiments.register( diff --git a/front_end/global_typings/react_native.d.ts b/front_end/global_typings/react_native.d.ts index 6734f5be5f9..07d575ce965 100644 --- a/front_end/global_typings/react_native.d.ts +++ b/front_end/global_typings/react_native.d.ts @@ -9,5 +9,7 @@ declare global { namespace globalThis { var enableReactNativePerfMetrics: boolean|undefined; var enableReactNativePerfMetricsGlobalPostMessage: boolean|undefined; + var reactNativeDocLink: string|undefined; + var reactNativeFeedbackLink: string|undefined; } } diff --git a/front_end/panels/rn_welcome/RNWelcome.ts b/front_end/panels/rn_welcome/RNWelcome.ts index c0cc2646d58..c55efe0b790 100644 --- a/front_end/panels/rn_welcome/RNWelcome.ts +++ b/front_end/panels/rn_welcome/RNWelcome.ts @@ -3,11 +3,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import * as UI from '../../ui/legacy/legacy.js'; import * as i18n from '../../core/i18n/i18n.js'; +import * as Root from '../../core/root/root.js'; +import * as UI from '../../ui/legacy/legacy.js'; +import * as LitHtml from '../../ui/lit-html/lit-html.js'; import rnWelcomeStyles from './rnWelcome.css.js'; -import * as LitHtml from '../../ui/lit-html/lit-html.js'; const UIStrings = { /** @description The name of the debugging product */ @@ -19,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; @@ -49,11 +52,11 @@ export class RNWelcomeImpl extends UI.Widget.VBox { } render(): void { - const welcomeIconUrl = new URL( - "../../Images/react_native/welcomeIcon.png", - import.meta.url, - ).toString(); - render(html` + const welcomeIconUrl = new URL('../../Images/react_native/welcomeIcon.png', import.meta.url).toString(); + const feedbackLink = this.getFeedbackLink(); + + render( + html`