Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Ohlsen <[email protected]>
  • Loading branch information
ohltyler committed Oct 9, 2023
1 parent 3ced5e1 commit 03c2f72
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export function ComponentDetails(props: ComponentDetailsProps) {
* Hook provided by reactflow to listen on when nodes are selected / de-selected.
* - populate panel content appropriately
* - open the panel if a node is selected and the panel is closed
* - it is assumed that only one node can be selected at once
*/
useOnSelectionChange({
onChange: ({ nodes, edges }) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ interface ResizableWorkspaceProps {
workflow?: Workflow;
}

const COMPONENT_DETAILS_PANEL_ID = 'component_details_panel_id';

/**
* The overall workspace component that maintains state related to the 2 resizable
* panels - the ReactFlow workspace panel and the selected component details panel.
Expand All @@ -25,7 +27,7 @@ export function ResizableWorkspace(props: ResizableWorkspaceProps) {
);

const onToggleChange = () => {
collapseFn.current('inputsPanel', { direction: 'left' });
collapseFn.current(COMPONENT_DETAILS_PANEL_ID, { direction: 'left' });
setIsOpen(!isOpen);
};

Expand All @@ -47,7 +49,7 @@ export function ResizableWorkspace(props: ResizableWorkspaceProps) {
</EuiResizablePanel>
<EuiResizableButton />
<EuiResizablePanel
id="inputsPanel"
id={COMPONENT_DETAILS_PANEL_ID}
mode="collapsible"
initialSize={25}
minSize="10%"
Expand Down

0 comments on commit 03c2f72

Please sign in to comment.