Skip to content

chore: Adjust agent chat code elements#40230

Merged
ichik merged 4 commits intoreleasefrom
chore/adjust-agent-chat-code-elements
Apr 14, 2025
Merged

chore: Adjust agent chat code elements#40230
ichik merged 4 commits intoreleasefrom
chore/adjust-agent-chat-code-elements

Conversation

@ichik
Copy link
Contributor

@ichik ichik commented Apr 11, 2025

Description

Fixes #39836

Before After
image image

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/14445809985
Commit: 713a98e
Cypress dashboard.
Tags: @tag.Sanity
Spec:


Mon, 14 Apr 2025 13:21:07 UTC

Communication

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

  • Yes
  • No

Summary by CodeRabbit

  • Style
    • Enhanced dark mode visuals for a more consistent and refined appearance.
    • Upgraded code block styling with improved typography, spacing, and clearer syntax highlighting.
    • Adjusted the appearance of the code-copy button with a neutral color scheme.
    • Optimized the responsive design for the sidebar to deliver a smoother mobile experience.
    • Updated styling for list items and code components, including margin adjustments and font size specifications.

@ichik ichik self-assigned this Apr 11, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Apr 11, 2025

Walkthrough

This pull request modifies theming and styling across several design-system components. In the dark mode theme file, the elevation color calculations are simplified by using fixed lightness adjustments. The code block component now applies the "body" typography class with an additional custom styling class, and the clipboard button gains a neutral color property. CSS adjustments update various code element styles including margins, font-size, text color, outline, and border-radius. Additionally, the sidebar breakpoint constant is lowered from 768 to 720 to adjust responsive behavior.

Changes

Files Change Summary
design-system/theming/.../DarkModeTheme.ts Simplified elevation color calculations: removed conditional checks and applied fixed lightness adjustments (bdElevation1: -0.39, bdElevation2: +0.07, bdElevation3: +0.05).
design-system/widgets/.../CodeBlock.tsx,
design-system/widgets/.../mdComponents/Code.tsx
Updated code block components: changed typography class from "caption" to "body" and added "wds-codeblock" class for CodeBlock; introduced a new color="neutral" property for the copy button in Code.
design-system/widgets/.../styles.module.css Refined code element styling: updated outline colors, set margins for .wds-codeblock, applied font-size of 0.85em, changed text color from var(--color-fg-negative) to var(--color-fg-accent), and adjusted border-radius.
design-system/widgets/.../Sidebar/src/constants.ts Updated the MOBILE_BREAKPOINT constant in the sidebar configuration from 768 to 720.

Sequence Diagram(s)

(No sequence diagram generated as the changes do not alter control flow or introduce new interactive features.)

Assessment against linked issues

Objective Addressed Explanation
Inline code styling (size, color, corner radius) [#39836: items 1-3]
Block code theming and layout (text size, scrolling, viewport space, indentation) [#39836: items 4-7] Text size is improved via typography change, but layout issues (scrolling, space, indentation) are not clearly addressed.

Suggested labels

Enhancement, Bug

Suggested reviewers

  • hetunandu
  • jsartisan

Poem

In lines of code, a fresh design is spun,
Where dark mode hues and fonts now run.
Elevated colors with fixed measures gleam,
And code blocks shine with a brand new theme.
With tweaks that spark a subtle art,
CodeRabbit cheers—a masterpiece at heart!


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro (Legacy)

📥 Commits

Reviewing files that changed from the base of the PR and between d93e974 and 713a98e.

📒 Files selected for processing (1)
  • app/client/packages/design-system/widgets/src/components/Markdown/src/styles.module.css (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/client/packages/design-system/widgets/src/components/Markdown/src/styles.module.css
⏰ Context from checks skipped due to timeout of 90000ms (10)
  • GitHub Check: perform-test / client-build / client-build
  • GitHub Check: perform-test / rts-build / build
  • GitHub Check: perform-test / server-build / server-unit-tests
  • GitHub Check: client-lint / client-lint
  • GitHub Check: client-prettier / prettier-check
  • GitHub Check: client-unit-tests / client-unit-tests
  • GitHub Check: client-build / client-build
  • GitHub Check: storybook-tests
  • GitHub Check: chromatic-deployment
  • GitHub Check: chromatic-deployment

🪧 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 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 skip-changelog Adding this label to a PR prevents it from being listed in the changelog labels Apr 11, 2025
hetunandu
hetunandu previously approved these changes Apr 14, 2025
@ichik ichik force-pushed the chore/adjust-agent-chat-code-elements branch from 2d619d3 to 8b0f400 Compare April 14, 2025 11:04
@ichik ichik marked this pull request as ready for review April 14, 2025 12:24
@ichik ichik requested a review from a team as a code owner April 14, 2025 12:24
@ichik ichik added the ok-to-test Required label for CI label Apr 14, 2025
@ichik ichik enabled auto-merge (squash) April 14, 2025 12:26
@ichik ichik requested a review from hetunandu April 14, 2025 12:26
@ichik ichik merged commit 15dec53 into release Apr 14, 2025
52 checks passed
@ichik ichik deleted the chore/adjust-agent-chat-code-elements branch April 14, 2025 13:29

li {
margin-bottom: var(--inner-spacing-2);
margin-left: 1em;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This

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: Adjust code block theming in Agent chat widget

2 participants