@samitouri / QOS-React / commits / e2cc315a1b

[DevTools] Don't suspend shell while retrieving original source for "open-in-editor" (#34381)

Sebastian "Sebbie" Silbermann committed Sep 4, 2025 at 16:39 UTC e2cc315a1bec95477a4e7aff74bdb5151b935f75
1 file changed +14 -1
packages/react-devtools-shared/src/devtools/views/Components/OpenInEditorButton.js
+14 -1
@@ -23,7 +23,7 @@ type Props = {
23 symbolicatedSourcePromise: Promise<SourceMappedLocation | null>,
24 };
25
26 -function OpenInEditorButton({
26 +function OpenSymbolicatedSourceInEditorButton({
27 editorURL,
28 source,
29 symbolicatedSourcePromise,
@@ -45,4 +45,17 @@ function OpenInEditorButton({
45 );
46 }
47
48 +function OpenInEditorButton(props: Props): React.Node {
49 + return (
50 + <React.Suspense
51 + fallback={
52 + <Button disabled={true} title="retrieving original source…">
53 + <ButtonIcon type="editor" />
54 + </Button>
55 + }>
56 + <OpenSymbolicatedSourceInEditorButton {...props} />
57 + </React.Suspense>
58 + );
59 +}
60 +
61 export default OpenInEditorButton;