Skip to content

Commit

Permalink
Split React and non-React DG panels
Browse files Browse the repository at this point in the history
  • Loading branch information
bvaughn committed Jul 16, 2024
1 parent 8b4c11d commit c619bae
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
background-color: var(--theme-selection-background);
color: white;
}
.Item[data-disabled] {
color: var(--color-dim);
}
.Item[data-disabled]:hover {
background-color: transparent;
cursor: default;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { TimeStampedPoint } from "@replayio/protocol";
import { useMemo, useState } from "react";

import { ReactComponentStack } from "devtools/client/debugger/src/components/SecondaryPanes/DependencyGraph/ReactComponentStack";
import { DependencyGraphMode } from "shared/client/types";
import { useGraphQLUserData } from "shared/user-data/GraphQL/useGraphQLUserData";
import { useAppSelector } from "ui/setup/hooks";

Expand Down Expand Up @@ -35,6 +36,7 @@ export default function SecondaryPanes() {
"layout_logpointsPanelExpanded"
);
const [dependencyGraphVisible, setDependencyGraphVisible] = useState(false);
const [reactDependencyGraphVisible, setReactDependencyGraphVisible] = useState(false);
const [reactStackVisible, setReactStackVisible] = useState(false);

return (
Expand Down Expand Up @@ -72,6 +74,23 @@ export default function SecondaryPanes() {
>
<ReactComponentStack timeStampedPoint={timeStampedPoint} />
</AccordionPane>
<AccordionPane
header="React Dependency Graph"
headerNode={
<>
<span className="img react !bg-primaryAccent" /> Dependency Graph{" "}
<small className="text-warning">(experimental)</small>
</>
}
className="react-dependency-graph-pane"
expanded={reactDependencyGraphVisible}
onToggle={() => setReactDependencyGraphVisible(!reactDependencyGraphVisible)}
>
<DependencyGraph
mode={DependencyGraphMode.ReactParentRenders}
point={timeStampedPoint?.point}
/>
</AccordionPane>
<AccordionPane
header="Dependency Graph"
headerNode={
Expand Down

0 comments on commit c619bae

Please sign in to comment.