Skip to content

Commit

Permalink
Update Welcome docs links for launch
Browse files Browse the repository at this point in the history
- Substitute "React DevTools" guide for incoming "React Native DevTools" page (note: URL will be changed later via redirect)
- Fix `/docs/debugging-native-code` link
  • Loading branch information
huntie committed Oct 2, 2024
1 parent 87b2feb commit de79fc2
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
1 change: 0 additions & 1 deletion config/gni/devtools_grd_files.gni
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ grd_files_release_sources = [
"front_end/Images/profile.svg",
"front_end/Images/react_native/learn-debugging-basics.jpg",
"front_end/Images/react_native/learn-native-debugging.jpg",
"front_end/Images/react_native/learn-react-devtools.jpg",
"front_end/Images/react_native/learn-react-native-devtools.jpg",
"front_end/Images/react_native/welcomeIcon.png",
"front_end/Images/record-start.svg",
Expand Down
1 change: 0 additions & 1 deletion config/gni/devtools_image_files.gni
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ devtools_image_files = [
"popoverArrows.png",
"react_native/learn-debugging-basics.jpg",
"react_native/learn-native-debugging.jpg",
"react_native/learn-react-devtools.jpg",
"react_native/learn-react-native-devtools.jpg",
"react_native/welcomeIcon.png",
"toolbarResizerVertical.png",
Expand Down
Binary file not shown.
17 changes: 8 additions & 9 deletions front_end/panels/rn_welcome/RNWelcome.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ const UIStrings = {
docsDebuggingBasics: 'Debugging Basics',
/** @description "Debugging Basics" item detail */
docsDebuggingBasicsDetail: 'Overview of debugging tools in React Native',
/** @description "React DevTools" title (docs item 2 - pre-launch) */
docsReactDevTools: 'React DevTools',
/** @description "React DevTools" item detail */
docsReactDevToolsDetail: 'Debug React components with React DevTools',
/** @description "React Native DevTools" title (docs item 2) */
docsReactNativeDevTools: 'React Native DevTools',
/** @description "React Native DevTools" item detail */
docsReactDevToolsDetail: 'Explore features available in React Native DevTools',
/** @description "Native Debugging" title (docs item 3) */
docsNativeDebugging: 'Native Debugging',
/** @description "Native Debugging" item detail */
Expand Down Expand Up @@ -124,7 +124,7 @@ export class RNWelcomeImpl extends UI.Widget.VBox implements
import.meta.url,
).toString();
const docsImage2Url = new URL(
'../../Images/react_native/learn-react-devtools.jpg',
'../../Images/react_native/learn-react-native-devtools.jpg',
import.meta.url,
).toString();
const docsImage3Url = new URL(
Expand Down Expand Up @@ -176,15 +176,14 @@ export class RNWelcomeImpl extends UI.Widget.VBox implements
<p>${i18nString(UIStrings.docsDebuggingBasicsDetail)}</p>
</div>
</button>
<!-- TODO(huntie): Replace this item when React Native DevTools docs are complete -->
<button class="rn-welcome-docsfeed-item" type="button" role="link" @click=${this.#handleLinkPress.bind(this, 'https:\/\/reactnative.dev/docs/debugging/react-devtools')} title=${i18nString(UIStrings.docsReactDevTools)}>
<button class="rn-welcome-docsfeed-item" type="button" role="link" @click=${this.#handleLinkPress.bind(this, 'https:\/\/reactnative.dev/docs/react-devtools')} title=${i18nString(UIStrings.docsReactNativeDevTools)}>
<div class="rn-welcome-image" style="background-image: url('${docsImage2Url}')"></div>
<div>
<p class="devtools-link">${i18nString(UIStrings.docsReactDevTools)}</p>
<p class="devtools-link">${i18nString(UIStrings.docsReactNativeDevTools)}</p>
<p>${i18nString(UIStrings.docsReactDevToolsDetail)}</p>
</div>
</button>
<button class="rn-welcome-docsfeed-item" type="button" role="link" @click=${this.#handleLinkPress.bind(this, 'https:\/\/reactnative.dev/docs/debugging/debugging-native-code')} title=${i18nString(UIStrings.docsNativeDebugging)}>
<button class="rn-welcome-docsfeed-item" type="button" role="link" @click=${this.#handleLinkPress.bind(this, 'https:\/\/reactnative.dev/docs/debugging-native-code')} title=${i18nString(UIStrings.docsNativeDebugging)}>
<div class="rn-welcome-image" style="background-image: url('${docsImage3Url}')"></div>
<div>
<p class="devtools-link">${i18nString(UIStrings.docsNativeDebugging)}</p>
Expand Down
1 change: 1 addition & 0 deletions front_end/panels/rn_welcome/rnWelcome.css
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@
}

.rn-welcome-image {
flex-shrink: 0;
aspect-ratio: calc(16 / 9);
height: 64px;
margin-right: 16px;
Expand Down

0 comments on commit de79fc2

Please sign in to comment.