Skip to content

Conversation

a6hishekpandey
Copy link
Contributor

@a6hishekpandey a6hishekpandey commented Sep 16, 2024

Description

Issue: Show bindings sub-menu position has been displaced.

This PR addresses issue #36285 by removing the extra space from left style property of EntityProperties.tsx as Explorer div has position as relative and entity properties container is inside the Explorer div, so we need to calculate the value of left style based on the Explorer div.

Fixes #36285

Automation

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

🔍 Cypress test results

Caution

If you modify the content in this section, you are likely to disrupt the CI result for your PR.

Communication

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

  • Yes
  • No

Summary by CodeRabbit

  • Bug Fixes
    • Simplified the positioning of UI components by removing unnecessary dependencies, which may improve layout consistency.

Copy link
Contributor

coderabbitai bot commented Sep 16, 2024

Walkthrough

The changes in this pull request involve modifications to the EntityProperties.tsx file, specifically focusing on the calculation of the left style property for a reference element. The APP_SIDEBAR_WIDTH constant has been removed from this calculation, simplifying the positioning logic. The left property is now determined solely by the DEFAULT_EXPLORER_PANE_WIDTH, which may affect the layout of the UI component but reduces complexity in style assignment.

Changes

File Change Summary
app/client/src/pages/Editor/Explorer/Entity/EntityProperties.tsx Removed APP_SIDEBAR_WIDTH from the left style calculation, relying only on DEFAULT_EXPLORER_PANE_WIDTH.

Assessment against linked issues

Objective Addressed Explanation
The menu should be placed next to the border of the left section (#[36285]) The change does not specifically address the menu positioning issue.

Possibly related PRs

  • fix: IDE Header Height usage #36297: This PR involves adjustments to CSS properties in a related component, which may impact the overall layout and positioning of UI elements, similar to the changes made in EntityProperties.tsx.

Suggested labels

Bug, Regressed, IDE Product, IDE Navigation, ok-to-test

Poem

In the realm of code, a change took flight,
Removing the width, making it right.
The sidebar's embrace, now simpler and neat,
A layout refined, a UI complete!
With every adjustment, we strive for the best,
In the world of coding, we never rest! 🌟


Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 996e26b and 5573768.

Files selected for processing (1)
  • app/client/src/pages/Editor/Explorer/Entity/EntityProperties.tsx (2 hunks)
Additional comments not posted (2)
app/client/src/pages/Editor/Explorer/Entity/EntityProperties.tsx (2)

16-16: Excellent work importing the necessary constant!

The import statement for DEFAULT_EXPLORER_PANE_WIDTH is syntactically correct and will be useful in the subsequent code changes. Keep up the good work!


119-119: Great job simplifying the positioning logic!

The change to set the left style solely based on the DEFAULT_EXPLORER_PANE_WIDTH constant is a clever solution to fix the incorrect positioning of the "Show bindings" sub-menu. By removing the dependency on the APP_SIDEBAR_WIDTH constant, you've effectively reduced the complexity of the style assignment.

However, it's important to note that this change may affect the layout of the UI component by potentially shifting its position relative to the sidebar, depending on the value of DEFAULT_EXPLORER_PANE_WIDTH. Make sure to thoroughly test the UI to ensure that the sub-menu is positioned correctly and aligns with the desired user experience.

Overall, this is a well-thought-out change that addresses the issue at hand. Keep up the excellent work!


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 generate interesting stats about this repository and render them as a table.
    -- @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.

@hetunandu
Copy link
Member

/build-deploy-preview

Copy link

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/10897875475.
Workflow: On demand build Docker image and deploy preview.
skip-tests: . env: .
PR: 36340.
recreate: .

Copy link

Deploy-Preview-URL: https://ce-36340.dp.appsmith.com

@hetunandu
Copy link
Member

LGTM. Thanks for the quick fix @a6hishekpandey

@hetunandu hetunandu merged commit a6b7644 into appsmithorg:release Sep 17, 2024
20 checks passed
@a6hishekpandey
Copy link
Contributor Author

a6hishekpandey commented Sep 17, 2024

@hetunandu thanks for the review. I have fixed one more issue 3-4 days ago. If someone can help me with the review, it will be helpful.

@hetunandu
Copy link
Member

Please share the PR here

@a6hishekpandey
Copy link
Contributor Author

This is the PR: #36320

Shivam-z pushed a commit to Shivam-z/appsmith that referenced this pull request Sep 26, 2024
…36340)

## Description
Issue: Show bindings sub-menu position has been displaced.

This PR addresses issue appsmithorg#36285 by removing the extra space from `left`
style property of EntityProperties.tsx as Explorer div has position as
relative and entity properties container is inside the Explorer div, so
we need to calculate the value of `left` style based on the Explorer
div.

Fixes appsmithorg#36285

## Automation

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

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!CAUTION]  
> If you modify the content in this section, you are likely to disrupt
the CI result for your PR.

<!-- end of auto-generated comment: Cypress test results  -->


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


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

## Summary by CodeRabbit

- **Bug Fixes**
- Simplified the positioning of UI components by removing unnecessary
dependencies, which may improve layout 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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Show bindings sub-menu position has been displaced
2 participants