Skip to content

chore: Adjust WDS buttons#39967

Merged
ichik merged 2 commits intoreleasefrom
chore/adjust-wds-buttons
Mar 28, 2025
Merged

chore: Adjust WDS buttons#39967
ichik merged 2 commits intoreleasefrom
chore/adjust-wds-buttons

Conversation

@ichik
Copy link
Contributor

@ichik ichik commented Mar 28, 2025

Description

Fixes #39952 and #39953

Before After
Screenshot 2025-03-28 at 10 43 02 Screenshot 2025-03-28 at 10 46 03

Automation

/ok-to-test tags="@tag.Sanity"

🔍 Cypress test results

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/14127447165
Commit: c0ce65e
Cypress dashboard.
Tags: @tag.Sanity
Spec:


Fri, 28 Mar 2025 11:39:28 UTC

Communication

Should the DevRel and Marketing teams inform users about this change?

  • Yes
  • No

Summary by CodeRabbit

  • Style
    • Light Mode Enhancements: Updated the brightness of subtle UI elements in light mode, offering a more refined and balanced visual appearance.
    • Button Design Updates: Adjusted button text sizing so that buttons designated as smaller now display a caption style, improving readability and visual consistency.

@ichik ichik requested a review from a team as a code owner March 28, 2025 10:57
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 28, 2025

Walkthrough

This pull request updates UI theming and button component behavior. The LightModeTheme file now uses adjusted lightness values for subtle color properties and includes a corrected comment for a border method. In addition, the Button component’s text size logic now accounts for both "xSmall" and "small" sizes—rendering them as "caption"—to better align with the intended design specifications.

Changes

File(s) Change Summary
app/client/.../theming/src/color/.../LightModeTheme.ts Increased lightness increments for bdAccentSubtle (0.35→0.42), bdNeutralSubtle (0.35→0.47), and bdWarningSubtle (0.05→0.06); updated comment for bdPositiveSubtle.
app/client/.../widgets/src/components/Button/.../Button.tsx Modified _Button component: now checks if size is "xSmall" or "small" to render text as "caption"; defaults to "body" otherwise.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant ButtonComponent
    participant TextRenderer

    User->>ButtonComponent: Render button
    ButtonComponent->>TextRenderer: Check button size
    alt size is "xSmall" or "small"
        TextRenderer-->>ButtonComponent: Return "caption" size
    else
        TextRenderer-->>ButtonComponent: Return "body" size
    end
Loading

Assessment against linked issues

Objective (Linked Issues) Addressed Explanation
Swap to caption text size token (#39952)

Possibly related PRs

Suggested labels

Task, skip-changelog, Anvil Pod, WDS team, ok-to-test, ADS Components

Suggested reviewers

  • KelvinOm
  • danielmorris-as

Poem

In the code’s bright realm, tweaks take flight,
Colors adjust to a softer light.
Buttons now whisper with captioned tone,
A subtle change, seamlessly shown.
Lines of change, a joy to behold,
Our UI sings in hues of gold!


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 300e7d7 and c0ce65e.

📒 Files selected for processing (2)
  • app/client/packages/design-system/theming/src/color/src/LightModeTheme.ts (4 hunks)
  • app/client/packages/design-system/widgets/src/components/Button/src/Button.tsx (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (10)
  • GitHub Check: perform-test / rts-build / build
  • GitHub Check: perform-test / client-build / client-build
  • GitHub Check: perform-test / server-build / server-unit-tests
  • GitHub Check: client-unit-tests / client-unit-tests
  • GitHub Check: client-build / client-build
  • GitHub Check: client-lint / client-lint
  • GitHub Check: client-prettier / prettier-check
  • GitHub Check: chromatic-deployment
  • GitHub Check: chromatic-deployment
  • GitHub Check: storybook-tests
🔇 Additional comments (6)
app/client/packages/design-system/widgets/src/components/Button/src/Button.tsx (2)

39-39: Updated text sizing for consistency across small button variants.

This change makes the text size consistent for both "xSmall" and "small" buttons by using "caption" size, enhancing visual coherence.


51-51: Applied matching text size update to empty text placeholder.

Good work ensuring the empty text placeholder follows the same sizing logic as the visible text component, maintaining consistent rendering regardless of content presence.

app/client/packages/design-system/theming/src/color/src/LightModeTheme.ts (4)

993-993: Increased lightness value for subtle accent borders.

Adjusting from 0.35 to 0.42 creates a more subtle, softer appearance for accent borders in the light mode theme.


1056-1056: Increased lightness for neutral subtle borders.

The lightness increase from 0.35 to 0.47 further differentiates neutral subtle borders from their standard variants, improving visual hierarchy.


1098-1098: Fixed incorrect comment documentation.

Corrected the misleading comment to accurately reflect that this method deals with positive borders, not negative ones.


1193-1193: Slightly increased lightness for warning subtle borders.

The minor adjustment from 0.05 to 0.06 provides a more refined appearance of warning subtle borders, maintaining the warning context while being less visually disruptive.

✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added AI Agents Issues related to agentic solutions on Appsmith Anvil Pod Issue related to Anvil project Task A simple Todo labels Mar 28, 2025
@ichik ichik added the ok-to-test Required label for CI label Mar 28, 2025
@ichik ichik self-assigned this Mar 28, 2025
@github-actions github-actions bot added the skip-changelog Adding this label to a PR prevents it from being listed in the changelog label Mar 28, 2025
@ichik ichik merged commit 77dffef into release Mar 28, 2025
55 checks passed
@ichik ichik deleted the chore/adjust-wds-buttons branch March 28, 2025 11:42
github-actions bot pushed a commit to Zeral-Zhang/appsmith that referenced this pull request Apr 12, 2025
## Description

Fixes appsmithorg#39952 and appsmithorg#39953

| Before | After |
|--------|--------|
| <img width="303" alt="Screenshot 2025-03-28 at 10 43 02"
src="https://github.com/user-attachments/assets/b9b19214-66ee-42f0-a376-9f1c8ce88d7e"
/> | <img width="307" alt="Screenshot 2025-03-28 at 10 46 03"
src="https://github.com/user-attachments/assets/16248fbe-8bb2-4c22-aee4-8cd55c7ed53e"
/> |

## Automation

/ok-to-test tags="@tag.Sanity"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/14127447165>
> Commit: c0ce65e
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=14127447165&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Fri, 28 Mar 2025 11:39:28 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Style**
- **Light Mode Enhancements:** Updated the brightness of subtle UI
elements in light mode, offering a more refined and balanced visual
appearance.
- **Button Design Updates:** Adjusted button text sizing so that buttons
designated as smaller now display a caption style, improving readability
and visual consistency.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Agents Issues related to agentic solutions on Appsmith Anvil Pod Issue related to Anvil project ok-to-test Required label for CI skip-changelog Adding this label to a PR prevents it from being listed in the changelog Task A simple Todo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: WDS small buttons adjustments

2 participants