Skip to content

Implement Updated Prompt Button Tone#401

Open
PauloMFJ wants to merge 4 commits into
datacommonsorg:mainfrom
madebypxlp:paulo/update-prompt-button
Open

Implement Updated Prompt Button Tone#401
PauloMFJ wants to merge 4 commits into
datacommonsorg:mainfrom
madebypxlp:paulo/update-prompt-button

Conversation

@PauloMFJ

@PauloMFJ PauloMFJ commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Overview

Reworks button tones to add an explicit active state and simplifies the prompt submit button's visual behavior.

Changes

  • Button component: Added an isActive prop (default false) that sets a data-is-active attribute; removed the unused prominent tone.
  • Button styles: Split hover vs. active states — hover only applies when not active, and added dedicated active-state base/content/border styling per tone.
  • Design tokens: Dropped the button-prominent-* tokens, added *-active color tokens for all remaining tones, and introduced a new accent-strong color (used for accent hover).
  • Canvas tools: Tool buttons now use the subtle tone with isActive instead of swapping to the accent tone.
  • Prompt submit button: Switches variant/tone based on whether there's input — flat/accent when filled, border/subtle when empty (replacing the removed prominent tone).

Video:
https://github.com/user-attachments/assets/aee55409-7046-4cc9-8093-674893af4682

Ticket:
image

@PauloMFJ PauloMFJ self-assigned this Jul 7, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the button component by removing the "prominent" tone, introducing active state styling, and adding an isActive prop. It also updates button usages across several components and adds new color tokens for active states. Feedback on these changes highlights a copy-paste error in button.module.scss where active variables for the subtle-highlight tone incorrectly reference subtle tokens. Additionally, it is recommended to restrict the isActive prop to internal tones in TypeScript to prevent unsupported usage on external tones.

Comment thread dataweaver/apps/web/src/components/elements/button.module.scss Outdated
Comment thread dataweaver/apps/web/src/components/elements/button.tsx
Comment thread dataweaver/apps/web/src/components/elements/button.tsx

@nick-nlb nick-nlb left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants