From 12a61e5474a373b3524aacc430f194c63fbd5447 Mon Sep 17 00:00:00 2001 From: Christoph Proeschel Date: Tue, 20 Jul 2021 12:48:12 +0200 Subject: [PATCH] [#2187] Hotfix chatplugin bundle loading (#2188) --- VERSION | 2 +- frontend/chat-plugin/image/BUILD | 4 +++- frontend/chat-plugin/image/index.tsx | 1 + frontend/chat-plugin/image/nginx.conf | 2 +- frontend/chat-plugin/lib/src/AiryChatPlugin.tsx | 1 + .../airyRenderProps/AiryInputBar/index.module.scss | 11 ++++++++--- .../lib/src/airyRenderProps/AiryInputBar/index.tsx | 4 ++-- 7 files changed, 17 insertions(+), 8 deletions(-) diff --git a/VERSION b/VERSION index 30f6cf8d98..894542aa24 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.26.1 +0.26.2 diff --git a/frontend/chat-plugin/image/BUILD b/frontend/chat-plugin/image/BUILD index daf923dac2..7d115d35de 100644 --- a/frontend/chat-plugin/image/BUILD +++ b/frontend/chat-plugin/image/BUILD @@ -26,7 +26,9 @@ web_library( module_deps = ["//frontend/chat-plugin/lib:chat-plugin"] + module_deps, output = { "libraryExport": "AiryWidget", - "publicPath": "/chatplugin/ui", + # Automatically detects script host and uses it for further loading + # https://webpack.js.org/guides/public-path/#automatic-publicpath + "publicPath": "auto", "filename": "s.js", }, ) diff --git a/frontend/chat-plugin/image/index.tsx b/frontend/chat-plugin/image/index.tsx index a6b2010b6f..541c524b4b 100644 --- a/frontend/chat-plugin/image/index.tsx +++ b/frontend/chat-plugin/image/index.tsx @@ -10,6 +10,7 @@ anchor.style.cssText = ` position: fixed; width: -webkit-fill-available; width: -moz-available; +height: 100%; right: 0; bottom: 0; z-index: 9999; diff --git a/frontend/chat-plugin/image/nginx.conf b/frontend/chat-plugin/image/nginx.conf index 6f1bf275ae..9178a34a28 100644 --- a/frontend/chat-plugin/image/nginx.conf +++ b/frontend/chat-plugin/image/nginx.conf @@ -31,7 +31,7 @@ http { server { listen 80; root /usr/share/nginx/html; - expires 15min; + expires 15m; location = /example { diff --git a/frontend/chat-plugin/lib/src/AiryChatPlugin.tsx b/frontend/chat-plugin/lib/src/AiryChatPlugin.tsx index 35cb50d2dc..27e6e828f2 100644 --- a/frontend/chat-plugin/lib/src/AiryChatPlugin.tsx +++ b/frontend/chat-plugin/lib/src/AiryChatPlugin.tsx @@ -13,6 +13,7 @@ export const AiryChatPlugin = (props: AiryChatPluginProps) => { const customStyle = { background: 'transparent', + height: '100%', ...(config.config?.primaryColor && { '--color-airy-blue': config.config?.primaryColor, }), diff --git a/frontend/chat-plugin/lib/src/airyRenderProps/AiryInputBar/index.module.scss b/frontend/chat-plugin/lib/src/airyRenderProps/AiryInputBar/index.module.scss index 7dfa4a66ab..8592b44c7d 100644 --- a/frontend/chat-plugin/lib/src/airyRenderProps/AiryInputBar/index.module.scss +++ b/frontend/chat-plugin/lib/src/airyRenderProps/AiryInputBar/index.module.scss @@ -4,6 +4,7 @@ .inputBar { display: flex; justify-content: space-between; + align-items: center; padding: 8px 0; margin: 0 8px; border-top: 1px solid var(--color-template-gray); @@ -17,7 +18,7 @@ min-height: 32px; width: 100%; padding: 4px 4px 0 8px; - margin-right: 8px; + margin: 0 8px 0 0; font-family: 'Lato', sans-serif; font-size: 16px; letter-spacing: 0; @@ -32,6 +33,7 @@ width: 100%; justify-content: center; margin: 0 0 8px 0px; + a { display: flex; color: var(--color-text-gray); @@ -40,11 +42,13 @@ font-family: 'Lato', sans-serif; font-size: 12px; align-items: center; + svg { height: 20px; width: 20px; transform: scale(0.7); margin-top: 1px; + path { fill: var(--color-text-gray); } @@ -106,7 +110,7 @@ max-height: 28px; width: auto; height: auto; - padding: 0px 1px 1px 0px; + padding: 0 1px 1px 0; } svg { @@ -120,7 +124,6 @@ justify-content: center; align-items: flex-end; height: 100%; - margin-bottom: 10px; } .emojiDrawer { @@ -144,6 +147,7 @@ svg { width: 22px; pointer-events: none; + path { fill: #a0abb2; } @@ -174,6 +178,7 @@ .iconButton:hover { background-color: var(--color-background-blue); border-radius: 50%; + svg { path { fill: #4bb3fd; diff --git a/frontend/chat-plugin/lib/src/airyRenderProps/AiryInputBar/index.tsx b/frontend/chat-plugin/lib/src/airyRenderProps/AiryInputBar/index.tsx index ae86e312ad..a5f86dadf7 100644 --- a/frontend/chat-plugin/lib/src/airyRenderProps/AiryInputBar/index.tsx +++ b/frontend/chat-plugin/lib/src/airyRenderProps/AiryInputBar/index.tsx @@ -134,7 +134,7 @@ const AiryInputBar = (props: AiryInputBarProps) => { ref={textInputRef} className={style.textArea} placeholder={'Start typing...'} - autoFocus={!config.showMode ? true : false} + autoFocus={!config.showMode} onChange={handleChange} onKeyDown={handleKeyDown} value={props.messageString} @@ -143,7 +143,7 @@ const AiryInputBar = (props: AiryInputBarProps) => {