Skip to content

Commit

Permalink
feat: increase sidebar width and add default node
Browse files Browse the repository at this point in the history
  • Loading branch information
stone-lyl committed Sep 30, 2024
1 parent f329a79 commit 241f623
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion packages/docs/components/Playground.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ function Playground({ mode }: {mode?: 'js' | 'node'}) {
<div className="w-full" style={{ height: 'calc(100vh - 72px)' }} data-cy="playground">
<DataStory
client={client}
initSidebarKey="explorer"
>
<ToastComponent />
</DataStory>
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/src/components/DataStory/DataStory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const DataStoryComponent = (
const [selectedNode, setSelectedNode] = useState<ReactFlowNode>();
const [isSidebarClose, setIsSidebarClose] = useState(!!props.hideSidebar);
const [updateSelectedNodeData, setUpdateSelectedNodeData] = useState<ReactFlowNode['data']>();
const [sidebarKey, setSidebarKey] = useState(initSidebarKey ?? '');
const [sidebarKey, setSidebarKey] = useState(initSidebarKey ?? 'addNode');
const partialStoreRef = useRef<Partial<StoreSchema>>(null);
const [diagram, setDiagram] = useState<Diagram | null>(initDiagram || new Diagram());
const [diagramKey, setDiagramKey] = useState<string>();
Expand Down Expand Up @@ -85,7 +85,7 @@ export const DataStoryComponent = (
onChange={onChange}
/>
</Allotment.Pane>
<Allotment.Pane visible={!isSidebarClose} snap maxSize={500} preferredSize={300}>
<Allotment.Pane visible={!isSidebarClose} snap maxSize={800} preferredSize={400}>
<Sidebar
nodeDescriptions={nodeDescriptions}
nodeDescriptionsLoading={nodeDescriptionsLoading}
Expand Down

0 comments on commit 241f623

Please sign in to comment.