Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/main/resources/META-INF/frontend/react/animated-fab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Badge from '@mui/material/Badge';
import { createTheme, ThemeProvider } from '@mui/material/styles';
import { ReactAdapterElement, type RenderHooks } from 'Frontend/generated/flow/ReactAdapter';

const lumoTheme = createTheme({
const animatedFabTheme = createTheme({
palette: {
primary: {
main: 'var(--lumo-primary-color)',
Expand All @@ -16,10 +16,10 @@ const lumoTheme = createTheme({
contrastText: 'rgb(var(--lumo-primary-contrast-color))',
},
warning: {
main: 'var(--lumo-warning-color)',
main: 'var(--lumo-warning-color, var(--aura-yellow))',
light: 'var(--lumo-warning-color-50pct)',
dark: 'var(--lumo-warning-color-20pct)',
contrastText: 'rgb(var(--lumo-warning-contrast-color))',
contrastText: 'rgb(var(--lumo-warning-contrast-color, var(--aura-accent-color-light)))',
}
},
components: {
Expand Down Expand Up @@ -55,7 +55,7 @@ class AnimatedFABElement extends ReactAdapterElement {
}
}
return (
<ThemeProvider theme={lumoTheme}>
<ThemeProvider theme={animatedFabTheme}>
<Draggable
nodeRef={this.draggableNodeRef}
onDrag={eventControl}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* #%L
* Chat Assistant Add-on
* %%
* Copyright (C) 2023 - 2024 Flowing Code
* Copyright (C) 2023 - 2026 Flowing Code
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -31,7 +31,7 @@ vaadin-vertical-layout.chat-assistant-resizable-vertical-layout {

vaadin-vertical-layout.chat-assistant-container-vertical-layout {
flex-grow: 1;
gap: var(--lumo-space-s);
gap: var(--lumo-space-s, var(--vaadin-gap-s));
transform: rotate(180deg); /* This second rotation completes the "double rotation trick."
Together, these two rotations position the resize handle in the upper-left corner.
This new position is more suitable for resizing the chat window because the chat bubble
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* #%L
* Chat Assistant Add-on
* %%
* Copyright (C) 2023 - 2024 Flowing Code
* Copyright (C) 2023 - 2026 Flowing Code
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -83,10 +83,9 @@

.chat-assistant-who-is-typing {
width: 100%;
padding: var(--lumo-space-xs);
font-size: var(--lumo-font-size-xs);
font-family: var(--lumo-font-family);
color: var(--lumo-secondary-text-color);
padding: var(--lumo-space-xs, var(--vaadin-padding-xs, 0.25rem));
font-size: var(--lumo-font-size-xs, var(--aura-font-size-s, small));
color: var(--lumo-secondary-text-color, var(--vaadin-text-color-secondary));
}

.wmde-markdown {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* #%L
* Chat Assistant Add-on
* %%
* Copyright (C) 2023 - 2024 Flowing Code
* Copyright (C) 2023 - 2026 Flowing Code
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -19,11 +19,20 @@
*/
package com.flowingcode.vaadin.addons;

import com.flowingcode.vaadin.addons.demo.DynamicTheme;
import com.vaadin.flow.component.page.AppShellConfigurator;
import com.vaadin.flow.component.page.Push;
import com.vaadin.flow.server.AppShellSettings;

@SuppressWarnings("serial")
@Push
public class AppShellConfiguratorImpl implements AppShellConfigurator {

@Override
public void configurePage(AppShellSettings settings) {
if (DynamicTheme.isFeatureSupported()) {
DynamicTheme.LUMO.initialize(settings);
}
}

}