Skip to content

Conversation

@sfc-gh-nbellante
Copy link
Contributor

@sfc-gh-nbellante sfc-gh-nbellante commented Jan 7, 2026

Describe your changes

Updated the chat input button colors to use.

  • Changed from using cleanIconColor/dirtyIconColor to fadedText40/fadedText60
  • Updated hover and active states to use bodyText and primary colors
  • Removed background color changes on focus-visible
  • Standardized disabled state colors

Screenshot or video (only for visual changes)

The PR updates several snapshot test images for the chat input component in different themes and browsers.

Here's request from design:
image

Testing Plan

  • E2E Tests: The existing snapshot tests have been updated to reflect the new styling
  • Manual Testing: Verified the send button appearance in both light and dark themes, checking disabled, hover, active, and focus states

Contribution License Agreement

By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

@snyk-io
Copy link
Contributor

snyk-io bot commented Jan 7, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2026

✅ PR preview is ready!

Name Link
📦 Wheel file https://core-previews.s3-us-west-2.amazonaws.com/pr-13535/streamlit-1.52.2-py3-none-any.whl
📦 @streamlit/component-v2-lib Download from artifacts
🕹️ Preview app pr-13535.streamlit.app (☁️ Deploy here if not accessible)

Copy link
Contributor Author

sfc-gh-nbellante commented Jan 7, 2026

@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2026

📉 Frontend coverage change detected

The frontend unit test (vitest) coverage has decreased by 0.0000%

  • Current PR: 86.5900% (12826 lines, 1719 missed)
  • Latest develop: 86.5900% (12828 lines, 1719 missed)

✅ Coverage change is within normal range.

📊 View detailed coverage comparison

@sfc-gh-nbellante sfc-gh-nbellante force-pushed the fixit/ghost-button-colors branch from 65f67cf to 7d9c0bd Compare January 7, 2026 21:49
@sfc-gh-nbellante sfc-gh-nbellante force-pushed the fixit/file-chip-x-button-color branch 2 times, most recently from 76ca246 to c85e841 Compare January 7, 2026 22:01
@sfc-gh-nbellante sfc-gh-nbellante force-pushed the fixit/ghost-button-colors branch from 7d9c0bd to 0462d95 Compare January 7, 2026 22:01
@sfc-gh-nbellante sfc-gh-nbellante force-pushed the fixit/file-chip-x-button-color branch from c85e841 to 74e44bd Compare January 7, 2026 22:22
@sfc-gh-nbellante sfc-gh-nbellante force-pushed the fixit/ghost-button-colors branch from 0462d95 to f3d251e Compare January 7, 2026 22:22
@sfc-gh-nbellante sfc-gh-nbellante force-pushed the fixit/file-chip-x-button-color branch from 74e44bd to cbafd5a Compare January 8, 2026 17:05
@sfc-gh-nbellante sfc-gh-nbellante force-pushed the fixit/ghost-button-colors branch from f3d251e to 836e83b Compare January 8, 2026 17:05
@sfc-gh-nbellante sfc-gh-nbellante force-pushed the fixit/file-chip-x-button-color branch from cbafd5a to 247b832 Compare January 8, 2026 17:18
@sfc-gh-nbellante sfc-gh-nbellante force-pushed the fixit/ghost-button-colors branch from 836e83b to 2a58dcf Compare January 8, 2026 17:18
@sfc-gh-nbellante sfc-gh-nbellante force-pushed the fixit/file-chip-x-button-color branch from 247b832 to 76ffa70 Compare January 8, 2026 17:40
@sfc-gh-nbellante sfc-gh-nbellante force-pushed the fixit/ghost-button-colors branch from 2a58dcf to 3e179cc Compare January 8, 2026 17:40
@sfc-gh-nbellante sfc-gh-nbellante force-pushed the fixit/file-chip-x-button-color branch from 76ffa70 to 7648bfc Compare January 8, 2026 17:48
@sfc-gh-nbellante sfc-gh-nbellante force-pushed the fixit/ghost-button-colors branch from 3e179cc to 1f97bec Compare January 8, 2026 17:48
@sfc-gh-nbellante sfc-gh-nbellante force-pushed the fixit/file-chip-x-button-color branch from 7648bfc to a6c02fc Compare January 8, 2026 20:56
@sfc-gh-nbellante sfc-gh-nbellante force-pushed the fixit/ghost-button-colors branch from 1f97bec to 30542a4 Compare January 8, 2026 20:56
@sfc-gh-nbellante sfc-gh-nbellante marked this pull request as ready for review January 8, 2026 20:56
@sfc-gh-nbellante sfc-gh-nbellante marked this pull request as draft January 8, 2026 21:33
@sfc-gh-nbellante sfc-gh-nbellante force-pushed the fixit/file-chip-x-button-color branch from a6c02fc to 8746ed6 Compare January 9, 2026 03:10
@sfc-gh-nbellante sfc-gh-nbellante force-pushed the fixit/ghost-button-colors branch from 30542a4 to c499bc6 Compare January 9, 2026 03:10
@sfc-gh-nbellante sfc-gh-nbellante force-pushed the fixit/file-chip-x-button-color branch from 8746ed6 to 4b244a8 Compare January 9, 2026 03:14
@sfc-gh-nbellante sfc-gh-nbellante force-pushed the fixit/ghost-button-colors branch from c499bc6 to adb9c8f Compare January 9, 2026 03:15
@sfc-gh-nbellante sfc-gh-nbellante force-pushed the fixit/file-chip-x-button-color branch from 4b244a8 to 7e513dc Compare January 9, 2026 03:17
@sfc-gh-nbellante sfc-gh-nbellante force-pushed the fixit/ghost-button-colors branch from adb9c8f to 08b362e Compare January 9, 2026 03:17
@sfc-gh-nbellante sfc-gh-nbellante changed the base branch from fixit/file-chip-x-button-color to graphite-base/13535 January 9, 2026 03:26
@sfc-gh-nbellante sfc-gh-nbellante force-pushed the fixit/ghost-button-colors branch from 08b362e to 558aa1f Compare January 9, 2026 03:26
@sfc-gh-nbellante sfc-gh-nbellante changed the base branch from graphite-base/13535 to develop January 9, 2026 03:26
@sfc-gh-nbellante sfc-gh-nbellante added security-assessment-completed Security assessment has been completed for PR change:chore PR contains maintenance or housekeeping change impact:users PR changes affect end users labels Jan 9, 2026
@sfc-gh-nbellante sfc-gh-nbellante force-pushed the fixit/ghost-button-colors branch from 558aa1f to 50aeedc Compare January 10, 2026 21:46
@sfc-gh-nbellante sfc-gh-nbellante changed the title fix: update ghost button colors to match Figma design [fix] Update chat input send button colors for better theme consistency Jan 11, 2026
@sfc-gh-nbellante sfc-gh-nbellante marked this pull request as ready for review January 11, 2026 18:17
Copilot AI review requested due to automatic review settings January 11, 2026 18:17
@sfc-gh-nbellante sfc-gh-nbellante added the ai-review If applied to PR or issue will run AI review workflow label Jan 11, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the chat input send button colors to improve theme consistency by replacing hardcoded conditional color logic with semantic theme variables.

Changes:

  • Replaced light/dark theme conditional color logic with theme-agnostic fadedText40 and fadedText60 variables
  • Updated hover state to use bodyText instead of primary color for better visual hierarchy
  • Added active state styling with primary color
  • Removed background color change on focus-visible state
  • Updated E2E snapshot tests to reflect the new button appearance

Reviewed changes

Copilot reviewed 1 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
frontend/lib/src/components/widgets/ChatInput/styled-components.ts Simplified send button color logic by removing hasLightBackgroundColor dependency and using semantic theme colors (fadedText40, fadedText60, bodyText, primary)
e2e_playwright/snapshots/linux/st_chat_input_test/st_chat_input-column_audio_with_files[light_theme-firefox].png Updated snapshot for light theme Firefox to reflect new button colors
e2e_playwright/snapshots/linux/st_chat_input_test/st_chat_input-column_audio_with_files[dark_theme-webkit].png Updated snapshot for dark theme WebKit to reflect new button colors
e2e_playwright/snapshots/linux/st_chat_input_test/st_chat_input-column_audio_with_files[dark_theme-firefox].png Updated snapshot for dark theme Firefox to reflect new button colors
e2e_playwright/snapshots/linux/st_chat_input_test/st_chat_input-column_audio_with_files[dark_theme-chromium].png Updated snapshot for dark theme Chromium to reflect new button colors

@github-actions github-actions bot removed the ai-review If applied to PR or issue will run AI review workflow label Jan 11, 2026
@github-actions
Copy link
Contributor

Summary

This PR updates the chat input send button (ghost button) colors to use theme-consistent semantic colors instead of hardcoded gray values that required light/dark theme detection. The changes:

  • Replace conditional gray60/gray80/gray40 colors with fadedText40/fadedText60
  • Change hover state from primary to bodyText color
  • Add new active state that shows primary color
  • Remove background color change on focus-visible (keeping focus ring)
  • Standardize disabled state color to fadedText40

Code Quality

Positive changes:

  1. Better theme consistency (lines 163-167 in styled-components.ts): The new implementation uses fadedText40 and fadedText60, which are derived from bodyText with transparency. This makes the colors automatically adapt to any custom theme's text color, rather than relying on hardcoded gray values.

  2. Simplified logic: Removed the hasLightBackgroundColor import and conditional logic for determining colors. The code is now more declarative and easier to maintain.

  3. Clearer interaction states (lines 190-195): Added explicit &:active state that shows primary color, providing better user feedback during click interactions.

Minor observations:

  • The removal of backgroundColor change on focus-visible (line 188) is acceptable since the boxShadow focus ring (via getPrimaryFocusBoxShadow) is retained, maintaining keyboard accessibility.

  • The hover color change from primary to bodyText (line 191) is a design decision that follows the Figma design specification mentioned in the PR.

Test Coverage

E2E Snapshot Tests:

  • ✅ Updated snapshots for st_chat_input-column_audio_with_files across multiple browsers and themes:
    • dark_theme-chromium
    • dark_theme-firefox
    • dark_theme-webkit
    • light_theme-firefox

Observations:

  • The snapshot tests capture the visual appearance of the chat input with audio and files, which includes the ghost buttons being modified.
  • The existing unit tests in ChatInput.test.tsx focus on behavior (keyboard interactions, state management, file uploads) rather than styling, which is appropriate. CSS styling is best verified through visual snapshot tests.
  • No new tests are required as the existing snapshot tests adequately cover the visual changes.

Backwards Compatibility

Low Risk:

  • This is a pure styling change with no API modifications
  • No changes to component props, behavior, or protobuf definitions
  • The change actually improves compatibility with custom themes since:
    • fadedText40/fadedText60 are derived from the theme's bodyText color
    • Previously hardcoded gray values (gray60, gray80, gray40) would not adapt to custom themes

Visual Change:

  • Users will notice the ghost button hover state now shows bodyText (high contrast) instead of primary (accent color)
  • The primary color now appears on click/active state
  • This aligns with the Figma design specification shown in the PR

Security & Risk

No security concerns identified:

  • Pure CSS styling changes with no logic modifications
  • No user input handling changes
  • No data flow modifications

Low regression risk:

  • The change uses established theme color variables (fadedText40, fadedText60, bodyText, primary) that are already used extensively throughout the codebase
  • The getPrimaryFocusBoxShadow helper is retained for accessibility

Recommendations

No blocking issues identified. Minor suggestions:

  1. Consider adding light_theme-chromium snapshot (optional): The PR updates light_theme-firefox but not light_theme-chromium. If both are typically updated together, ensure the chromium snapshot is also regenerated. However, this may be expected if there were no visual differences.

  2. Documentation (optional): Consider adding a brief comment in the styled-components file explaining the color scheme for ghost buttons (default → hover → active → disabled states) for future maintainers.

Verdict

APPROVED: The PR successfully improves theme consistency by replacing hardcoded gray color logic with semantic theme colors. The changes are well-scoped, follow existing patterns in the codebase, and the visual changes are covered by updated E2E snapshot tests. The removal of hasLightBackgroundColor dependency simplifies the code while making it more adaptable to custom themes.


This is an automated AI review. Please verify the feedback and use your judgment.

@sfc-gh-nbellante sfc-gh-nbellante changed the title [fix] Update chat input send button colors for better theme consistency [fix] Update ghost button colors for st.chat_input buttons Jan 11, 2026
Updated ghost button (+ and mic) colors:
- Default: fadedText60 (was gray60/gray80)
- Hover: bodyText (was primary)
- Active/Selected: primary
- Disabled: fadedText40 (was gray60)
Copy link
Collaborator

@lukasmasuch lukasmasuch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@sfc-gh-nbellante sfc-gh-nbellante force-pushed the fixit/ghost-button-colors branch from 28465f2 to b1326d6 Compare January 11, 2026 19:50
@sfc-gh-nbellante sfc-gh-nbellante merged commit 0d7118a into develop Jan 11, 2026
45 checks passed
@sfc-gh-nbellante sfc-gh-nbellante deleted the fixit/ghost-button-colors branch January 11, 2026 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:chore PR contains maintenance or housekeeping change impact:users PR changes affect end users security-assessment-completed Security assessment has been completed for PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants