Merge pull request #5195 from Granite-Code/Jazzcort/standardize-tooltip
Standardize tooltip for chat section
This commit is contained in:
commit
cbff7ed0cb
2 changed files with 30 additions and 10 deletions
|
|
@ -91,8 +91,18 @@ function InputToolbar(props: InputToolbarProps) {
|
|||
}}
|
||||
>
|
||||
<div className="xs:gap-1.5 flex flex-row items-center gap-1">
|
||||
<ModeSelect />
|
||||
<ModelSelect />
|
||||
<HoverItem data-tooltip-id="mode-select-tooltip">
|
||||
<ModeSelect />
|
||||
<ToolTip id="mode-select-tooltip" place="top">
|
||||
Select Mode
|
||||
</ToolTip>
|
||||
</HoverItem>
|
||||
<HoverItem data-tooltip-id="model-select-tooltip">
|
||||
<ModelSelect />
|
||||
<ToolTip id="model-select-tooltip" place="top">
|
||||
Select Model
|
||||
</ToolTip>
|
||||
</HoverItem>
|
||||
<div className="xs:flex -mb-1 hidden items-center text-gray-400 transition-colors duration-200">
|
||||
{props.toolbarOptions?.hideImageUpload ||
|
||||
(supportsImages && (
|
||||
|
|
@ -120,8 +130,9 @@ function InputToolbar(props: InputToolbarProps) {
|
|||
fileInputRef.current?.click();
|
||||
}}
|
||||
/>
|
||||
|
||||
<ToolTip id="image-tooltip" place="top">
|
||||
Attach an image
|
||||
Attach Image
|
||||
</ToolTip>
|
||||
</HoverItem>
|
||||
</>
|
||||
|
|
@ -134,7 +145,7 @@ function InputToolbar(props: InputToolbarProps) {
|
|||
/>
|
||||
|
||||
<ToolTip id="add-context-item-tooltip" place="top">
|
||||
Add context (files, docs, urls, etc.)
|
||||
Attach Context
|
||||
</ToolTip>
|
||||
</HoverItem>
|
||||
)}
|
||||
|
|
@ -170,7 +181,7 @@ function InputToolbar(props: InputToolbarProps) {
|
|||
{getMetaKeyLabel()}⏎ @codebase
|
||||
</span>
|
||||
<ToolTip id="add-codebase-context-tooltip" place="top-end">
|
||||
Submit with the codebase as context ({getMetaKeyLabel()}⏎)
|
||||
Send With Codebase as Context ({getMetaKeyLabel()}⏎)
|
||||
</ToolTip>
|
||||
</HoverItem>
|
||||
)}
|
||||
|
|
@ -196,6 +207,7 @@ function InputToolbar(props: InputToolbarProps) {
|
|||
)}
|
||||
|
||||
<EnterButton
|
||||
data-tooltip-id="enter-tooltip"
|
||||
isPrimary={props.isMainInput}
|
||||
data-testid="submit-input-button"
|
||||
onClick={async (e) => {
|
||||
|
|
@ -212,6 +224,9 @@ function InputToolbar(props: InputToolbarProps) {
|
|||
⏎ {props.toolbarOptions?.enterText ?? "Enter"}
|
||||
</span>
|
||||
<span className="md:hidden">⏎</span>
|
||||
<ToolTip id="enter-tooltip" place="top">
|
||||
Send (⏎)
|
||||
</ToolTip>
|
||||
</EnterButton>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ function BlockSettingsToolbarIcon(
|
|||
|
||||
const id = `block-settings-toolbar-icon-${props.sectionId}`;
|
||||
return (
|
||||
|
||||
<>
|
||||
<HoverItem
|
||||
px={0}
|
||||
|
|
@ -122,6 +123,7 @@ function BlockSettingsToolbarIcon(
|
|||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</HoverItem>
|
||||
<ToolTip delayShow={700} id={id}>
|
||||
{props.tooltip}
|
||||
|
|
@ -160,9 +162,7 @@ export function BlockSettingsTopToolbar() {
|
|||
<BlockSettingsToolbarIcon
|
||||
className="-ml-1.5"
|
||||
icon={isToolbarExpanded ? ChevronLeftIcon : EllipsisHorizontalIcon}
|
||||
tooltip={
|
||||
isToolbarExpanded ? "Collapse sections" : "Expand sections"
|
||||
}
|
||||
tooltip={isToolbarExpanded ? "Collapse Toolbar" : "Expand Toolbar"}
|
||||
title=""
|
||||
isSelected={false}
|
||||
onClick={handleEllipsisClick}
|
||||
|
|
@ -190,8 +190,13 @@ export function BlockSettingsTopToolbar() {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex">
|
||||
<AssistantSelect />
|
||||
<div className="flex gap-0.5">
|
||||
<HoverItem data-tooltip-id="assistant-select-tooltip">
|
||||
<AssistantSelect />
|
||||
<ToolTip id="assistant-select-tooltip" place="top">
|
||||
Select Assistant
|
||||
</ToolTip>
|
||||
</HoverItem>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue