From c750832d19677c1b8d1b0404aa0e831e261427b0 Mon Sep 17 00:00:00 2001 From: Max Pumperla Date: Wed, 22 May 2024 10:00:13 +0200 Subject: [PATCH] [docs] fix ray assistant Signed-off-by: Max Pumperla --- doc/source/_static/css/assistant.css | 32 ++-- doc/source/_static/js/assistant.js | 255 ++++++++++++++------------- 2 files changed, 147 insertions(+), 140 deletions(-) diff --git a/doc/source/_static/css/assistant.css b/doc/source/_static/css/assistant.css index b161292b3083..f8af636412e4 100644 --- a/doc/source/_static/css/assistant.css +++ b/doc/source/_static/css/assistant.css @@ -1,11 +1,15 @@ /* Kapa Ask AI button */ #kapa-widget-container figure { - padding: 0 !important; - } + padding: 0 !important; +} + +.mantine-Modal-root figure { + padding: 0 !important; +} - .mantine-Modal-root figure { - padding: 0 !important; - } +.assistant-title { + margin-top: 1em; +} .container-xl.blurred { filter: blur(5px); @@ -24,8 +28,8 @@ top: 20%; left: 50%; transform: translate(-50%, -20%); - width: 50%; - height: 70%; + width: 55%; + height: 75%; background-color: var(--pst-color-background); border: 1px solid var(--pst-color-border); border-radius: 10px; @@ -88,9 +92,9 @@ } .chatContentContainer { - padding: 15px; - max-height: calc(100% - 100px); - overflow-y: auto; + padding: 15px; + max-height: calc(100% - 100px); + overflow-y: auto; } .chatContentContainer input { @@ -115,13 +119,13 @@ hr { height: 1px; } -#result{ +#result { padding: 15px; border-radius: 10px; margin-top: 10px; margin-bottom: 10px; background-color: var(--pst-color-surface); - max-height: calc(100% - 20px); + max-height: 50vh; /* Ensure the result area does not take too much vertical space */ overflow-y: auto; } @@ -138,8 +142,8 @@ hr { } .input-group { - display: flex; - align-items: stretch; + display: flex; + align-items: stretch; } #blurDiv { diff --git a/doc/source/_static/js/assistant.js b/doc/source/_static/js/assistant.js index 44542ed2aee4..d01a0569ecc6 100644 --- a/doc/source/_static/js/assistant.js +++ b/doc/source/_static/js/assistant.js @@ -1,20 +1,20 @@ // Create chat-widget div -var chatWidgetDiv = document.createElement("div"); -chatWidgetDiv.className = "chat-widget"; +var chatWidgetDiv = document.createElement('div'); +chatWidgetDiv.className = 'chat-widget'; chatWidgetDiv.innerHTML = ` -` +`; document.body.appendChild(chatWidgetDiv); // Create chat-popup div -const date = new Date() -var chatPopupDiv = document.createElement("div"); -chatPopupDiv.className = "chat-popup"; -chatPopupDiv.id = "chatPopup"; +const date = new Date(); +var chatPopupDiv = document.createElement('div'); +chatPopupDiv.className = 'chat-popup'; +chatPopupDiv.id = 'chatPopup'; chatPopupDiv.innerHTML = `
-

Ray Docs AI - Ask a question

+

Ray Docs AI - Ask a question