Skip to content

[UI] Add execution_count in Code node #402

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 29, 2023
Merged
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
38 changes: 0 additions & 38 deletions ui/src/components/canvas.style.js

This file was deleted.

15 changes: 14 additions & 1 deletion ui/src/components/nodes/Code.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ import { RepoContext } from "../../lib/store";

import { MyMonaco } from "../MyMonaco";
import { useApolloClient } from "@apollo/client";

import { NodeResizeControl, NodeResizer } from "reactflow";

import "@reactflow/node-resizer/dist/style.css";
Expand Down Expand Up @@ -501,6 +500,10 @@ export const CodeNode = memo<NodeProps>(function ({
const isPodFocused = useStore(store, (state) => state.pods[id]?.focus);
const inputRef = useRef<HTMLInputElement>(null);
const updateView = useStore(store, (state) => state.updateView);
const exec_count = useStore(
store,
(state) => state.pods[id]?.result?.count || " "
);
const isCutting = useStore(store, (state) => state.cuttingIds.has(id));

const nodesMap = useStore(store, (state) => state.ydoc.getMap<Node>("pods"));
Expand Down Expand Up @@ -787,6 +790,16 @@ export const CodeNode = memo<NodeProps>(function ({
}}
></InputBase>
</Box>
<Box
sx={{
color: "#8b8282",
textAlign: "left",
paddingLeft: "5px",
fontSize: "12px",
}}
>
[{exec_count}]
</Box>
<Box
sx={{
opacity: showToolbar ? 1 : 0,
Expand Down