feat: Add tooltip for paperclip attach button when no files are parsed (#5139)
* fix broken tooltip * fix tooltip not showing on homepage * fix tooltip rendering behind input on homepage --------- Co-authored-by: shatfield4 <seanhatfield5@gmail.com>
This commit is contained in:
parent
179a823ab1
commit
113df6d013
@ -90,6 +90,12 @@ export function ChatTooltips() {
|
|||||||
delayShow={300}
|
delayShow={300}
|
||||||
className="tooltip !text-xs"
|
className="tooltip !text-xs"
|
||||||
/>
|
/>
|
||||||
|
<Tooltip
|
||||||
|
id="attach-item-btn"
|
||||||
|
place="top"
|
||||||
|
delayShow={300}
|
||||||
|
className="tooltip !text-xs"
|
||||||
|
/>
|
||||||
<DocumentLevelTooltip />
|
<DocumentLevelTooltip />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -88,7 +88,12 @@ export default function AttachItem({
|
|||||||
<>
|
<>
|
||||||
<button
|
<button
|
||||||
id="attach-item-btn"
|
id="attach-item-btn"
|
||||||
data-tooltip-id="tooltip-attach-item-btn"
|
data-tooltip-id={
|
||||||
|
showTooltip ? "tooltip-attach-item-btn" : "attach-item-btn"
|
||||||
|
}
|
||||||
|
data-tooltip-content={
|
||||||
|
!showTooltip ? t("chat_window.attach_file") : undefined
|
||||||
|
}
|
||||||
aria-label={t("chat_window.attach_file")}
|
aria-label={t("chat_window.attach_file")}
|
||||||
type="button"
|
type="button"
|
||||||
onClick={handleClick}
|
onClick={handleClick}
|
||||||
|
|||||||
@ -23,6 +23,7 @@ import { safeJsonParse } from "@/utils/request";
|
|||||||
import QuickActions from "@/components/lib/QuickActions";
|
import QuickActions from "@/components/lib/QuickActions";
|
||||||
import SuggestedMessages from "@/components/lib/SuggestedMessages";
|
import SuggestedMessages from "@/components/lib/SuggestedMessages";
|
||||||
import useUser from "@/hooks/useUser";
|
import useUser from "@/hooks/useUser";
|
||||||
|
import { ChatTooltips } from "@/components/WorkspaceChat/ChatContainer/ChatTooltips";
|
||||||
|
|
||||||
async function getTargetWorkspace() {
|
async function getTargetWorkspace() {
|
||||||
const lastVisited = safeJsonParse(
|
const lastVisited = safeJsonParse(
|
||||||
@ -301,6 +302,7 @@ function HomeContent({ workspace, setWorkspace, threadSlug, setThreadSlug }) {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</DnDFileUploaderWrapper>
|
</DnDFileUploaderWrapper>
|
||||||
|
<ChatTooltips />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user