Skip to content

fix: adapt the styles to Aura, the base styles and dark mode - #76

Merged
paodb merged 1 commit into
masterfrom
issue-75
Oct 15, 2026
Merged

paodb merged 1 commit into
masterfrom
issue-75

Conversation

@Totremont

@Totremont Totremont commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

This PR fixes the two spots reported in #75, plus other places where the styles were not adapted to Aura, the Vaadin 25 base styles or dark mode. Lumo tokens stay first in every fallback chain, so Lumo only changes where noted below.

Reported in #75

  • Typing indicator: the dots had a fixed #1c4c5b, barely visible in dark mode. They now take the theme's secondary text color, with the old color as the last fallback. In light Lumo this turns them from teal to gray, the same color as the "is typing" text.
  • Demo small class: its font size had no Aura fallback, and now has one. The class is also renamed to compact, since small was easy to mistake for FabVariant.SMALL, which resizes the FAB.

Also fixed

  • Popover corners: the radius fell back to --aura-base-radius, a unitless multiplier (3). That made the declaration invalid and left the chat window with square corners in Aura. It now uses --vaadin-radius-l.
  • Unread badge: it fell back to --aura-accent-yellow, which is a class, not a custom property, so Aura showed a fixed orange with white text. The badge now carries the aura-accent-yellow class and uses --aura-accent-color, so Aura renders it yellow with dark text, as Lumo does.
  • Resize arrows: --aura-border-color does not exist, so they fell back to a fixed 20% black, nearly invisible in dark mode. They now use --vaadin-border-color.
  • FAB shadow: falls back to Aura's --aura-shadow-s / --aura-shadow-m, which adapt to dark mode, before the literal shadows.
  • Mobile dialog: in Aura and the base styles the dialog's content part is content-box, so its padding pushed the close button and the message input 32px past the dialog. It is now border-box.
  • Who-is-typing line: it overflowed the footer by twice its padding, in every theme including Lumo. It is now border-box.
  • Markdown spacing: gets --vaadin-gap-s as its Aura and base fallback.

Demo

  • Bot avatar: chatbot.png is a dark icon on a transparent background, barely visible in dark mode. It now gets a white background in dark mode and keeps the theme's background in light mode. The rule replaces two custom properties left over from the old chat-bot element, which nothing read anymore.

Not covered

These predate this PR:

  • In Vaadin 24 the popover content is moved to <body>, so the demo's animated-fab.compact vaadin-message selector is not expected to match there. Not tested on Vaadin 24.
  • The anchored FAB is portaled to <body>, so it does not pick up a theme applied to only part of the page. Switching the theme of the whole page works.

Testing

Checked in the demo on Vaadin 25 (-Pv25) with Lumo, Aura and the base styles. The widths of the dialog and the footer and the avatar background were measured with Playwright. Not tested on Vaadin 24, and unit tests were not run locally; CI runs both profiles.

Summary by CodeRabbit

  • Style
    • Improved chat assistant styling across Aura and Lumo themes, including badge accents, shadows, borders, and popover corners.
    • Updated message loading and typing indicators, markdown spacing, and dialog sizing for more consistent layouts.
    • Adjusted demo avatar backgrounds and compact chat assistant styling for light and dark themes.

The typing indicator had a fixed teal that was barely visible in dark
mode; it now takes the theme's secondary text color. Several fallbacks
named Aura tokens that do not exist or do not fit: the popover radius
took the unitless --aura-base-radius, which left it square, the resize
arrows fell back to a fixed 20% black and the unread badge to a fixed
orange with white text. They now use --vaadin-radius-l,
--vaadin-border-color and Aura's yellow accent class, and the FAB
shadow uses Aura's shadow tokens.

The content of the mobile dialog is content-box in Aura and the base
styles, so its padding pushed the close button and the message input
past the dialog. The who-is-typing line had the same problem in every
theme and overflowed the footer. Both are now border-box.

In the demo, the "small" class of the lazy loading demo, easy to mistake
for FabVariant.SMALL, is now "compact" and has an Aura fallback, and the
chatbot avatar gets a white background in dark mode, where its dark icon
was barely visible.

Close #75
@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e26c673f-605f-424b-bb7c-ac908cef5326
📥 Commits

Reviewing files that changed from the base of the PR and between b2a8fcb and e2e8a24.

📒 Files selected for processing: 5
  • src/main/java/com/flowingcode/vaadin/addons/chatassistant/ChatAssistant.java
  • src/main/resources/META-INF/resources/frontend/styles/fc-chat-assistant-style.css
  • src/main/resources/META-INF/resources/frontend/styles/fc-chat-message-styles.css
  • src/test/java/com/flowingcode/vaadin/addons/chatassistant/ChatAssistantLazyLoadingDemo.java
  • src/test/resources/META-INF/frontend/styles/chat-assistant-styles-demo.css

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

The chat assistant updates theme-token fallbacks and sizing rules. The demo switches from the small class to compact and changes avatar styling.

Changes

Chat assistant styling

Layer / File(s) Summary
Assistant badge and component styles
src/main/java/com/flowingcode/vaadin/addons/chatassistant/ChatAssistant.java, src/main/resources/META-INF/resources/frontend/styles/fc-chat-assistant-style.css
The unread badge uses an Aura accent class and fallback. Component styles update shadow, radius, and border fallbacks, and add box-sizing: border-box to dialog content.
Message and demo styling
src/main/resources/META-INF/resources/frontend/styles/fc-chat-message-styles.css, src/test/java/com/flowingcode/vaadin/addons/chatassistant/ChatAssistantLazyLoadingDemo.java, src/test/resources/META-INF/frontend/styles/chat-assistant-styles-demo.css
Message styles update color and gap fallbacks and add box-sizing: border-box to the typing indicator. The demo uses the compact class and changes avatar backgrounds and font-size styling.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to e2e8a

No specific regression was established in the theme, sizing, or demo changes. The PR is mergeable with respect to the reviewed changes.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (3 skipped: 3… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly summarizes the main changes: adapting styles for Aura, base styles, and dark mode. It is concise and related to the changeset.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (3 skipped: 3 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

@paodb
paodb merged commit 9f9cf07 into master Oct 15, 2026
7 checks passed
@paodb
paodb deleted the issue-75 branch October 15, 2026 20:54
@github-project-automation github-project-automation Bot moved this from To Do to Pending release in Flowing Code Addons Oct 15, 2026
@paodb paodb moved this from Pending release to Done in Flowing Code Addons Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants