Skip to content
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

fix: set fixed width and height for ReactFlow to resolve warning #291

Merged
merged 1 commit into from
Sep 13, 2024
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
1 change: 0 additions & 1 deletion packages/docs/components/demos/TinkerDemo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { DataStory } from '@data-story/ui'
import { core, str, } from '@data-story/core';
import { MockJSClient } from '../splash/MockJSClient';
import { useRequestApp } from '../hooks/useRequestApp';
import { useMemo } from 'react';
import useRequest from 'ahooks/lib/useRequest';

// This component is just a place to sketch
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/components/demos/Tree/CustomActivityBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default () => {
client={client}
hideControls={true}
hideSidebar={true}
hideActivityBar={['settings', 'explorer']}
hideActivityBar={['settings']}
/>
</div>
);
Expand Down
6 changes: 4 additions & 2 deletions packages/ui/src/components/DataStory/DataStory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export const DataStoryComponent = (
activeKey={sidebarKey}
onClose={setIsSidebarClose}/>
</Allotment.Pane>
<Allotment.Pane visible={!isSidebarClose} snap maxSize={500}>
<Allotment.Pane visible={!isSidebarClose} snap maxSize={500} preferredSize={300}>
<Sidebar
tree={tree}
handleClickExplorerNode={handleClickExplorerNode}
Expand All @@ -142,7 +142,9 @@ export const DataStoryComponent = (
setSidebarKey={setSidebarKey} node={selectedNode}
onUpdateNodeData={setUpdateSelectedNodeData} onClose={setIsSidebarClose}/>
</Allotment.Pane>
<Allotment.Pane minSize={300}>
{/*The Allotment.Pane will recalculate the width and height of the child components.*/}
{/*The className is used to address the ReactFlow warning.*/}
<Allotment.Pane minSize={300} className="h-full w-96">
<DataStoryCanvas
{...props}
onSave={saveTree}
Expand Down