Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix chat ui bugs #38105

Merged
merged 1 commit into from
Dec 12, 2024
Merged

chore: fix chat ui bugs #38105

merged 1 commit into from
Dec 12, 2024

Conversation

jsartisan
Copy link
Contributor

@jsartisan jsartisan commented Dec 11, 2024

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

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/12275840983
Commit: 558f468
Cypress dashboard.
Tags: @tag.Anvil
Spec:


Wed, 11 Dec 2024 12:19:21 UTC

Summary by CodeRabbit

  • New Features

    • Enhanced button styling in the sidebar for non-mobile view.
    • Introduced a new expand button for the sidebar header.
  • Bug Fixes

    • Improved layout and visibility of sidebar elements, ensuring proper alignment and display.
  • Style

    • Added minimum height to the sidebar header.
    • Implemented styles to hide empty sidebar headers.
    • Adjusted margin for the sidebar header expand button.
    • Removed horizontal overflow property from sidebar content.

Copy link
Contributor

coderabbitai bot commented Dec 11, 2024

Walkthrough

The changes in this pull request involve updates to the SidebarContent.tsx and styles.module.css files. A new class name is added to a button in the _SidebarContent component, which is conditionally rendered based on the mobile state. Additionally, several CSS modifications enhance the sidebar's layout, including a minimum height for the header, the introduction of a new button class, and the removal of horizontal overflow from the sidebar content.

Changes

File Change Summary
.../Sidebar/src/SidebarContent.tsx Added a className property to the Button component based on isMobile state.
.../Sidebar/src/styles.module.css - Added min-height: var(--sizing-13); to .sidebarHeader.
- Introduced .sidebarHeader:empty to hide empty headers.
- Added .sidebarHeaderExpandButton class with margin.
- Removed overflow-x from .sidebarContentInner.

Possibly related PRs

Suggested labels

Bug, Design System Product, IDE Product, IDE Pod, ADS Visual Styles, ok-to-test

Suggested reviewers

  • KelvinOm
  • znamenskii-ilia

🎨 In the sidebar, where styles align,
A button now shines, oh how divine!
With headers that stand, and margins that play,
The layout's a dance, in a stylish ballet.
So here's to the code, with flair and with grace,
Enhancing our UI, a beautiful space! 🌟


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 61c90ce and 558f468.

📒 Files selected for processing (2)
  • app/client/packages/design-system/widgets/src/components/Sidebar/src/SidebarContent.tsx (1 hunks)
  • app/client/packages/design-system/widgets/src/components/Sidebar/src/styles.module.css (1 hunks)
🔇 Additional comments (4)
app/client/packages/design-system/widgets/src/components/Sidebar/src/SidebarContent.tsx (1)

49-49: LGTM! Verify style integration.

The className addition aligns with the new CSS class for proper button positioning.

✅ Verification successful

Style integration verified and properly defined

The sidebarHeaderExpandButton class is correctly defined in the styles.module.css with margin-inline-start: auto property, ensuring proper button positioning in the sidebar header.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify the className is used consistently across the codebase
rg -l "sidebarHeaderExpandButton" --type css

Length of output: 131


Script:

#!/bin/bash
# Check the content of the CSS file to verify the class definition
cat app/client/packages/design-system/widgets/src/components/Sidebar/src/styles.module.css

Length of output: 3907

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

165-165: LGTM! Good layout fix.

Adding min-height ensures consistent header sizing, preventing layout shifts.


170-172: LGTM! Clean UI improvement.

Hiding empty headers prevents unnecessary whitespace.


181-183: LGTM! Proper button alignment.

The margin-inline-start: auto properly aligns the expand button to the end of the header.


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 generate docstrings to generate docstrings for this PR. (Experiment)
  • @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.

@jsartisan jsartisan added the ok-to-test Required label for CI label Dec 11, 2024
@github-actions github-actions bot added the skip-changelog Adding this label to a PR prevents it from being listed in the changelog label Dec 11, 2024
@jsartisan jsartisan merged commit 2754698 into release Dec 12, 2024
103 checks passed
@jsartisan jsartisan deleted the chore/fix-chat-ui-bugs-2 branch December 12, 2024 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test Required label for CI 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