From 072c29c5c822fead23857f442a9f56cd904c98da Mon Sep 17 00:00:00 2001 From: Joshua Li Date: Mon, 19 Aug 2024 16:38:54 -0700 Subject: [PATCH] [2.x] Use smaller and compressed varients of buttons and form components (#261) * Use smaller and compressed varients of buttons and form components (#250) Signed-off-by: Miki * Change to small button for incontext insight Signed-off-by: Joshua Li --------- Signed-off-by: Miki Signed-off-by: Joshua Li Co-authored-by: Miki --- public/components/chat_experimental_badge.tsx | 4 ++-- .../components/chat_window_header_title.tsx | 4 ++-- .../edit_conversation_name_modal.tsx | 4 ++-- public/components/incontext_insight/index.tsx | 24 ++++++++++--------- public/components/invite_message.tsx | 6 ++--- .../notebook/notebook_name_modal.tsx | 22 ++++++++--------- public/tabs/chat/chat_page_content.tsx | 6 ++--- public/tabs/chat/messages/message_bubble.tsx | 12 +++++----- public/tabs/history/chat_history_list.tsx | 6 ++--- public/tabs/history/chat_history_page.tsx | 4 ++-- .../tabs/history/chat_history_search_list.tsx | 4 ++-- 11 files changed, 49 insertions(+), 47 deletions(-) diff --git a/public/components/chat_experimental_badge.tsx b/public/components/chat_experimental_badge.tsx index 82e8871f..398420a4 100644 --- a/public/components/chat_experimental_badge.tsx +++ b/public/components/chat_experimental_badge.tsx @@ -6,7 +6,7 @@ import React, { useState } from 'react'; import { EuiPopover, - EuiButtonIcon, + EuiSmallButtonIcon, EuiTitle, EuiHorizontalRule, EuiText, @@ -32,7 +32,7 @@ export const ChatExperimentalBadge = ({ onClick }: ChatExperimentalBadgeProps) = { Please enter a new name for your conversation.

- { ); const GeneratePopoverBody: React.FC<{}> = ({}) => ( - toasts.addDanger('To be implemented...')}>Generate summary + toasts.addDanger('To be implemented...')}> + Generate summary + ); const SummaryPopoverBody: React.FC<{ incontextInsight: IncontextInsightInput }> = ({ @@ -198,19 +200,19 @@ export const IncontextInsight = ({ children }: IncontextInsightProps) => { const ChatPopoverBody: React.FC<{}> = ({}) => ( - - - + + + - toasts.addDanger('To be implemented...')} > Go - + ); @@ -293,7 +295,7 @@ export const IncontextInsight = ({ children }: IncontextInsightProps) => {
- { @@ -28,9 +28,9 @@ export const InviteMessage: React.FC = () => { } actions={ - + Request invite - + } /> ); diff --git a/public/components/notebook/notebook_name_modal.tsx b/public/components/notebook/notebook_name_modal.tsx index 6977af73..6a62c122 100644 --- a/public/components/notebook/notebook_name_modal.tsx +++ b/public/components/notebook/notebook_name_modal.tsx @@ -4,15 +4,15 @@ */ import { - EuiButton, - EuiButtonEmpty, + EuiSmallButton, + EuiSmallButtonEmpty, EuiLink, - EuiFormRow, + EuiCompressedFormRow, EuiModal, EuiModalBody, EuiModalFooter, EuiModalHeader, - EuiFieldText, + EuiCompressedFieldText, EuiModalHeaderTitle, } from '@elastic/eui'; import React, { useState, useCallback } from 'react'; @@ -71,20 +71,20 @@ export const NotebookNameModal = ({ onClose, saveChat }: NotebookNameModalProps) - - + setName(e.target.value)} aria-label="Notebook name input" /> - + - + Cancel - - + Confirm name - + diff --git a/public/tabs/chat/chat_page_content.tsx b/public/tabs/chat/chat_page_content.tsx index 89f518cc..253a52da 100644 --- a/public/tabs/chat/chat_page_content.tsx +++ b/public/tabs/chat/chat_page_content.tsx @@ -4,7 +4,7 @@ */ import { - EuiButton, + EuiSmallButton, EuiEmptyPrompt, EuiFlexGroup, EuiFlexItem, @@ -69,14 +69,14 @@ export const ChatPageContent: React.FC = React.memo((props body={props.messagesLoadingError.message} titleSize="l" actions={ - Refresh - + } /> diff --git a/public/tabs/chat/messages/message_bubble.tsx b/public/tabs/chat/messages/message_bubble.tsx index 3ffaca74..25a67f8f 100644 --- a/public/tabs/chat/messages/message_bubble.tsx +++ b/public/tabs/chat/messages/message_bubble.tsx @@ -5,7 +5,7 @@ import { EuiAvatar, - EuiButtonIcon, + EuiSmallButtonIcon, EuiCopy, EuiFlexGroup, EuiFlexItem, @@ -184,7 +184,7 @@ export const MessageBubble: React.FC = React.memo((props) => {(copy) => ( - = React.memo((props) => )} {props.showRegenerate && props.interaction?.interaction_id ? ( - props.onRegenerate?.(props.interaction?.interaction_id || '')} title="regenerate message" @@ -211,7 +211,7 @@ export const MessageBubble: React.FC = React.memo((props) => <> {feedbackResult !== false ? ( - = React.memo((props) => ) : null} {feedbackResult !== true ? ( - = React.memo((props) => )} {props.message.interactionId ? ( - { diff --git a/public/tabs/history/chat_history_list.tsx b/public/tabs/history/chat_history_list.tsx index 40b52d2a..db1e4477 100644 --- a/public/tabs/history/chat_history_list.tsx +++ b/public/tabs/history/chat_history_list.tsx @@ -5,7 +5,7 @@ import React, { useCallback } from 'react'; import { - EuiButtonIcon, + EuiSmallButtonIcon, EuiFlexGroup, EuiFlexItem, EuiHorizontalRule, @@ -75,7 +75,7 @@ export const ChatHistoryListItem = ({ - - = React.memo((props {flyoutFullScreen ? ( - -