From 0181d6236d8b74c80adb62648fd6571431cf3210 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Thu, 3 Aug 2023 22:15:06 -0700 Subject: feat: :lipstick: small ui tweaks, detached child process --- extension/react-app/src/components/ComboBox.tsx | 8 ++++++++ extension/react-app/src/components/PillButton.tsx | 4 ++-- extension/react-app/src/components/StepContainer.tsx | 12 ++++++++++-- extension/react-app/src/components/UserInputContainer.tsx | 4 +++- 4 files changed, 23 insertions(+), 5 deletions(-) (limited to 'extension/react-app/src/components') diff --git a/extension/react-app/src/components/ComboBox.tsx b/extension/react-app/src/components/ComboBox.tsx index 982c42d1..5eada708 100644 --- a/extension/react-app/src/components/ComboBox.tsx +++ b/extension/react-app/src/components/ComboBox.tsx @@ -379,6 +379,14 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => { Math.min(prev + 1, history.length) ); setCurrentlyInContextQuery(false); + } else if (event.key === "Escape") { + setCurrentlyInContextQuery(false); + if (downshiftProps.isOpen) { + downshiftProps.closeMenu(); + } else { + // Move cursor back over to the editor + postVscMessage("focusEditor", {}); + } } }, onClick: () => { diff --git a/extension/react-app/src/components/PillButton.tsx b/extension/react-app/src/components/PillButton.tsx index 586c49f0..edef808e 100644 --- a/extension/react-app/src/components/PillButton.tsx +++ b/extension/react-app/src/components/PillButton.tsx @@ -103,8 +103,8 @@ const PillButton = (props: PillButtonProps) => {
               `
   padding-right: 8px;
 `;
 
+const LeftHeaderSubDiv = styled.div`
+  margin: 8px;
+  display: grid;
+  grid-template-columns: auto 1fr;
+  align-items: center;
+  grid-gap: 2px;
+`;
+
 const ContentDiv = styled.div<{ isUserInput: boolean }>`
   padding: 8px;
   background-color: ${(props) =>
@@ -167,7 +175,7 @@ function StepContainer(props: StepContainerProps) {
             loading={(props.historyNode.active as boolean) || false}
             error={props.historyNode.observation?.error ? true : false}
           >
-            
+ {!isUserInput && (props.open ? ( @@ -176,7 +184,7 @@ function StepContainer(props: StepContainerProps) { ))} {props.historyNode.observation?.title || (props.historyNode.step.name as any)} -
+ {/* { e.stopPropagation(); diff --git a/extension/react-app/src/components/UserInputContainer.tsx b/extension/react-app/src/components/UserInputContainer.tsx index ae054947..7e964ad9 100644 --- a/extension/react-app/src/components/UserInputContainer.tsx +++ b/extension/react-app/src/components/UserInputContainer.tsx @@ -21,6 +21,8 @@ const StyledDiv = styled.div` align-items: center; border-bottom: 1px solid ${vscBackground}; padding: 8px; + padding-top: 4px; + padding-bottom: 4px; `; const DeleteButtonDiv = styled.div` @@ -35,7 +37,7 @@ const UserInputContainer = (props: UserInputContainerProps) => { {/* */} -- cgit v1.2.3-70-g09d2