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

fix: [ADS] Entity Tree node overflow #38651

Merged
merged 1 commit into from
Jan 14, 2025
Merged

Conversation

hetunandu
Copy link
Member

@hetunandu hetunandu commented Jan 14, 2025

Description

Fixes the overflow of Entity item node that happens in deeply nested items

Before
Screenshot 2025-01-14 at 4 22 10 PM

After
Screenshot 2025-01-14 at 4 21 42 PM

Automation

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

🔍 Cypress test results

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/12766145527
Commit: 5966a75
Cypress dashboard.
Tags: @tag.IDE
Spec:


Tue, 14 Jan 2025 11:29:02 UTC

Communication

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

  • Yes
  • No

Summary by CodeRabbit

  • Style
    • Updated component styling to prevent horizontal scrolling in the entity list tree.

@hetunandu hetunandu added the ok-to-test Required label for CI label Jan 14, 2025
Copy link
Contributor

coderabbitai bot commented Jan 14, 2025

Walkthrough

This pull request introduces a minor styling modification to the PaddingOverrider styled component in the Entity Explorer's list tree. Specifically, the change adds overflow-x: hidden; to prevent horizontal scrolling, which impacts how child elements are displayed when their combined width exceeds the component's width.

Changes

File Change Summary
app/client/packages/design-system/ads/src/Templates/EntityExplorer/EntityListTree/EntityListTree.styles.ts Added overflow-x: hidden; to PaddingOverrider styled component to control horizontal overflow

Possibly related PRs

Suggested Labels

bug, production, ide-product, needs-triaging, release-blocker

Suggested Reviewers

  • ankitakinger

Poem

🌊 Overflow hidden, scrollbars at bay
No horizontal wandering today
CSS magic with just one line
Keeping our components neat and fine!
A styling fix, simple and bright 🎨

Finishing Touches

  • 📝 Generate Docstrings (Beta)

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. (Beta)
  • @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.

@github-actions github-actions bot added the Bug Something isn't working label Jan 14, 2025
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

🧹 Nitpick comments (1)
app/client/packages/design-system/ads/src/Templates/EntityExplorer/EntityListTree/EntityListTree.styles.ts (1)

Line range hint 11-21: Consider enhancing the overflow handling.

While hiding overflow works, consider adding these properties for better UX:

 export const PaddingOverrider = styled.div`
   width: 100%;
   overflow-x: hidden;
+  white-space: nowrap;
+  text-overflow: ellipsis;

   & > div {
     padding-left: 4px;
+    text-overflow: ellipsis;
+    overflow: hidden;
   }
 `;
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between d187854 and 5966a75.

📒 Files selected for processing (1)
  • app/client/packages/design-system/ads/src/Templates/EntityExplorer/EntityListTree/EntityListTree.styles.ts (1 hunks)
⏰ 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-unit-tests / client-unit-tests
  • GitHub Check: client-prettier / prettier-check
  • GitHub Check: client-build / client-build
  • GitHub Check: chromatic-deployment
  • GitHub Check: chromatic-deployment
  • GitHub Check: storybook-tests
🔇 Additional comments (1)
app/client/packages/design-system/ads/src/Templates/EntityExplorer/EntityListTree/EntityListTree.styles.ts (1)

14-14: LGTM with verification needed.

The overflow fix looks appropriate for preventing horizontal scrolling in deeply nested items. However, please verify that no critical UI elements are inadvertently hidden in these scenarios:

  1. Long entity names
  2. RTL language support
  3. Deeply nested items with icons
✅ Verification successful

Overflow handling implementation verified as safe

The overflow-x: hidden is complemented by proper text handling:

  • Text truncation with ellipsis
  • Tooltips for accessing full text
  • No elements at risk of being clipped
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for potential long text content or RTL-specific styles
rg -g '*.{ts,tsx}' --type-add 'style:*.styles.{ts,tsx}' -t style 'direction:\s*rtl|text-overflow|ellipsis' ./app/client/packages/design-system/

Length of output: 3416


Script:

#!/bin/bash
# Check EntityItem implementation for absolute positioning and text handling
ast-grep --pattern 'position:\s*absolute' app/client/packages/design-system/ads/src/Templates/EntityExplorer/

# Check if there are any tooltips or popovers for long text
rg -g '*.{ts,tsx}' 'Tooltip|Popover' app/client/packages/design-system/ads/src/Templates/EntityExplorer/

Length of output: 573

@hetunandu hetunandu merged commit d5551aa into release Jan 14, 2025
57 checks passed
@hetunandu hetunandu deleted the fix/ads/entity-tree-overflow branch January 14, 2025 11:33
github-actions bot pushed a commit to Zeral-Zhang/appsmith that referenced this pull request Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working ok-to-test Required label for CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants