From c6b251ea0e195041a4a4673319fb0fade7615f8f Mon Sep 17 00:00:00 2001 From: Martin Lopez Date: Fri, 13 Sep 2024 19:57:17 -0300 Subject: [PATCH] feat(demo): reduce font size of the chat assistant Reduce font size of the chat assistant window because of large messages --- .../addons/chatassistant/ChatAssistantLazyLoadingDemo.java | 2 ++ .../META-INF/frontend/styles/chat-assistant-styles-demo.css | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/test/java/com/flowingcode/vaadin/addons/chatassistant/ChatAssistantLazyLoadingDemo.java b/src/test/java/com/flowingcode/vaadin/addons/chatassistant/ChatAssistantLazyLoadingDemo.java index 9e09518..10847ac 100644 --- a/src/test/java/com/flowingcode/vaadin/addons/chatassistant/ChatAssistantLazyLoadingDemo.java +++ b/src/test/java/com/flowingcode/vaadin/addons/chatassistant/ChatAssistantLazyLoadingDemo.java @@ -124,6 +124,7 @@ public class ChatAssistantLazyLoadingDemo extends VerticalLayout { public ChatAssistantLazyLoadingDemo() { ChatAssistant chatAssistant = new ChatAssistant(); + chatAssistant.setClassName("small"); Span lazyLoadingData = new Span(); DataProvider dataProvider = DataProvider.fromCallbacks(query->{ lazyLoadingData.setText("Loading messages from: " + query.getOffset() + ", with limit: " + query.getLimit()); @@ -170,4 +171,5 @@ public ChatAssistantLazyLoadingDemo() { add(message, lazyLoadingData, chat, chatAssistant); } + } diff --git a/src/test/resources/META-INF/frontend/styles/chat-assistant-styles-demo.css b/src/test/resources/META-INF/frontend/styles/chat-assistant-styles-demo.css index d69ef15..4e1a016 100644 --- a/src/test/resources/META-INF/frontend/styles/chat-assistant-styles-demo.css +++ b/src/test/resources/META-INF/frontend/styles/chat-assistant-styles-demo.css @@ -21,3 +21,7 @@ --chatbot-avatar-img: url(chatbot.png); --chatbot-avatar-bg-color: white; } + + chat-bot.small vaadin-message { + font-size: var(--lumo-font-size-xxs); + }