Skip to content

chore: add neutral-subtle for text and update avatar sizes#36945

Merged
KelvinOm merged 2 commits intoreleasefrom
chore/chat-ui-fixes-2
Oct 17, 2024
Merged

chore: add neutral-subtle for text and update avatar sizes#36945
KelvinOm merged 2 commits intoreleasefrom
chore/chat-ui-fixes-2

Conversation

@jsartisan
Copy link
Contributor

No description provided.

@github-actions github-actions bot added the skip-changelog Adding this label to a PR prevents it from being listed in the changelog label Oct 17, 2024
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 17, 2024

Warning

.coderabbit.yaml has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

💥 Parsing errors (1)
bad indentation of a mapping entry in ".coderabbit.yaml" (4:229)

 1 |  ... 
 2 |  ... 
 3 |  ... 
 4 |  ...  in a concise fashion. You don't elaborate unless specifically  ...
-----------------------------------------^
 5 |  ... 
 6 |  ... 
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
📝 Walkthrough

Walkthrough

This pull request includes updates to the CSS styles for the Avatar and Text components within the design system. The Avatar component's sizing variables have been standardized to align with a new naming convention for icon sizes. Additionally, a new CSS rule has been added to the Text component to handle a specific case for the "neutral-subtle" color, and the TextProps interface has been modified to include this new color option.

Changes

File Change Summary
.../Avatar/src/styles.module.css Updated avatar sizes: default from var(--sizing-8) to var(--icon-size-3), small from var(--sizing-6) to var(--icon-size-2), large from var(--sizing-10) to var(--icon-size-4).
.../Text/src/styles.module.css Added a new rule for .text class to handle data-color="neutral-subtle".
.../Text/src/types.ts Updated TextProps interface to include "neutral-subtle" in the color property type.

Possibly related PRs

Suggested labels

ok-to-test

Suggested reviewers

  • KelvinOm
  • znamenskii-ilia

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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 resolve resolve all the CodeRabbit review comments.
  • @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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (2)
app/client/packages/design-system/widgets/src/components/Avatar/src/styles.module.css (1)

15-16: Approved: Standardized sizing for large avatar with suggestion

The change to var(--icon-size-4) completes the standardization of avatar sizes. Consider adding a comment explaining the relationship between icon sizes and avatar sizes for future maintainers.

app/client/packages/design-system/widgets/src/components/Text/src/types.ts (1)

16-16: LGTM. Consider using a union type for better type safety.

The addition of "neutral-subtle" to the color options is a valid enhancement. However, to improve type safety and maintainability, consider defining a union type for the color options.

Here's a suggested refactoring:

-  color?: keyof typeof COLORS | "neutral-subtle";
+  type TextColor = keyof typeof COLORS | "neutral-subtle";
+  color?: TextColor;

This change would make it easier to manage and extend color options in the future.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 44a9994 and a8703db.

📒 Files selected for processing (3)
  • app/client/packages/design-system/widgets/src/components/Avatar/src/styles.module.css (1 hunks)
  • app/client/packages/design-system/widgets/src/components/Text/src/styles.module.css (1 hunks)
  • app/client/packages/design-system/widgets/src/components/Text/src/types.ts (1 hunks)
🧰 Additional context used
🔇 Additional comments (4)
app/client/packages/design-system/widgets/src/components/Text/src/styles.module.css (1)

13-17: New CSS rule for "neutral-subtle" looks good.

The addition of a specific rule for "neutral-subtle" is appropriate and follows the existing pattern. The comment explains the rationale clearly.

app/client/packages/design-system/widgets/src/components/Avatar/src/styles.module.css (3)

5-6: Approved: Standardized sizing for default avatar

The change to var(--icon-size-3) aligns with the new naming convention for icon sizes, improving consistency across the design system.


10-11: Approved: Consistent sizing update for small avatar

The use of var(--icon-size-2) for the small avatar size maintains consistency with the new sizing convention.


5-16: Summary: Successful standardization of avatar sizes

The changes successfully standardize the avatar sizes using the new icon size naming convention. This update improves consistency across the design system and should make future maintenance easier. The implementation is clean and follows the intended objectives of the PR.

@KelvinOm KelvinOm merged commit 6a6ee9a into release Oct 17, 2024
@KelvinOm KelvinOm deleted the chore/chat-ui-fixes-2 branch October 17, 2024 11:45
github-actions bot pushed a commit to Zeral-Zhang/appsmith that referenced this pull request Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Adding this label to a PR prevents it from being listed in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants