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: Widget Overflow and Show Binding issue #35651

Merged
merged 1 commit into from
Aug 13, 2024

Conversation

hetunandu
Copy link
Member

@hetunandu hetunandu commented Aug 13, 2024

Description

Fix side effect introduced in #35611 that caused the widget pane to not be scrollable and extend beyond the IDE
Also fixes the show bindings issue not rendering correctly

Fixes #35584

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/10364931153
Commit: db587d1
Cypress dashboard.
Tags: @tag.IDE
Spec:


Tue, 13 Aug 2024 07:11:51 UTC

Communication

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

  • Yes
  • No

Copy link
Contributor

coderabbitai bot commented Aug 13, 2024

Walkthrough

The recent updates enhance the EntityProperties component's responsiveness by dynamically calculating its position based on the widths of the sidebar and explorer pane. Additionally, the EntityProperties component was removed from the EditorPaneExplorer, while a new import and usage were introduced in the EditorPane. These changes aim to refine the user interface and address a bug related to displaying bindings.

Changes

Files Change Summary
app/client/src/pages/Editor/Explorer/Entity/EntityProperties.tsx Updated the left style property calculation to be dynamic based on APP_SIDEBAR_WIDTH and DEFAULT_EXPLORER_PANE_WIDTH.
app/client/src/pages/Editor/IDE/EditorPane/Explorer.tsx Removed EntityProperties component and added overflow style to the main container.
app/client/src/pages/Editor/IDE/EditorPane/index.tsx Added import statement for EntityProperties and included it in the JSX structure with a note indicating it is a temporary addition for future updates.

Assessment against linked issues

Objective Addressed Explanation
Properly display bindings menu when Show Bindings is clicked (35584)

Poem

In the realm of code, we dance and play,
Adjusting positions to brighten the day.
With bindings revealed, a menu to show,
A seamless experience, watch productivity grow!
As we refine and explore, our UI shines bright,
In the world of components, we bring forth delight! ✨


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>.
    • 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 show all the console.log statements in this repository.
    • @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 as 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.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • 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

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 Bug Something isn't working High This issue blocks a user from building or impacts a lot of users labels Aug 13, 2024
@github-actions github-actions bot added Javascript Product Issues related to users writing javascript in appsmith JS Objects Issues related to JS Objects labels Aug 13, 2024
@github-actions github-actions bot added Needs Triaging Needs attention from maintainers to triage Production Query & JS Pod Issues related to the query & JS Pod Release Blocker This issue must be resolved before the release Verified When issue is retested post its fixed labels Aug 13, 2024
@hetunandu
Copy link
Member Author

/build-deplpy-preview

@hetunandu
Copy link
Member Author

/build-deploy-preview

@hetunandu hetunandu added the ok-to-test Required label for CI label Aug 13, 2024
Copy link

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

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

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 31be835 and db587d1.

Files selected for processing (3)
  • app/client/src/pages/Editor/Explorer/Entity/EntityProperties.tsx (2 hunks)
  • app/client/src/pages/Editor/IDE/EditorPane/Explorer.tsx (2 hunks)
  • app/client/src/pages/Editor/IDE/EditorPane/index.tsx (2 hunks)
Additional context used
Learnings (3)
app/client/src/pages/Editor/IDE/EditorPane/index.tsx (4)
Learnt from: ankitakinger
PR: appsmithorg/appsmith#29573
File: app/client/src/pages/Editor/Explorer/Entity/EntityProperties.tsx:46-65
Timestamp: 2023-12-14T12:09:37.028Z
Learning: The use of `any` for the `entityProperties` parameter in the `getJSActionBindings` function within `EntityProperties.tsx` is intentional and should not be suggested for refactoring to improve type safety.
Learnt from: ankitakinger
PR: appsmithorg/appsmith#29573
File: app/client/src/pages/Editor/Explorer/Entity/EntityProperties.tsx:46-65
Timestamp: 2023-12-14T12:09:37.028Z
Learning: The use of `any` for the `entityProperties` parameter in the `getJSActionBindings` function within `EntityProperties.tsx` is intentional and should not be suggested for refactoring to improve type safety.
Learnt from: ankitakinger
PR: appsmithorg/appsmith#29573
File: app/client/src/pages/Editor/Explorer/Entity/EntityProperties.tsx:237-0
Timestamp: 2023-12-13T11:42:57.497Z
Learning: The similar logic across different cases in the `EntityProperties` function, particularly for `ENTITY_TYPE.MODULE_INSTANCE`, is intentional and should not be suggested for refactoring to avoid duplication.
Learnt from: ankitakinger
PR: appsmithorg/appsmith#29573
File: app/client/src/pages/Editor/Explorer/Entity/EntityProperties.tsx:240-0
Timestamp: 2023-12-13T11:41:36.990Z
Learning: The `ENTITY_TYPE.MODULE_INSTANCE` case in `EntityProperties.tsx` is intentionally a combination of the logic from both `ENTITY_TYPE.ACTION` and `ENTITY_TYPE.JSACTION`, which explains the presence of what might seem like duplicated code.
app/client/src/pages/Editor/IDE/EditorPane/Explorer.tsx (3)
Learnt from: ankitakinger
PR: appsmithorg/appsmith#29573
File: app/client/src/pages/Editor/Explorer/Entity/EntityProperties.tsx:237-0
Timestamp: 2023-12-13T11:42:57.497Z
Learning: The similar logic across different cases in the `EntityProperties` function, particularly for `ENTITY_TYPE.MODULE_INSTANCE`, is intentional and should not be suggested for refactoring to avoid duplication.
Learnt from: ankitakinger
PR: appsmithorg/appsmith#29573
File: app/client/src/pages/Editor/Explorer/Entity/EntityProperties.tsx:46-65
Timestamp: 2023-12-14T12:09:37.028Z
Learning: The use of `any` for the `entityProperties` parameter in the `getJSActionBindings` function within `EntityProperties.tsx` is intentional and should not be suggested for refactoring to improve type safety.
Learnt from: ankitakinger
PR: appsmithorg/appsmith#29573
File: app/client/src/pages/Editor/Explorer/Entity/EntityProperties.tsx:46-65
Timestamp: 2023-12-14T12:09:37.028Z
Learning: The use of `any` for the `entityProperties` parameter in the `getJSActionBindings` function within `EntityProperties.tsx` is intentional and should not be suggested for refactoring to improve type safety.
app/client/src/pages/Editor/Explorer/Entity/EntityProperties.tsx (3)
Learnt from: ankitakinger
PR: appsmithorg/appsmith#29573
File: app/client/src/pages/Editor/Explorer/Entity/EntityProperties.tsx:237-0
Timestamp: 2023-12-13T11:42:57.497Z
Learning: The similar logic across different cases in the `EntityProperties` function, particularly for `ENTITY_TYPE.MODULE_INSTANCE`, is intentional and should not be suggested for refactoring to avoid duplication.
Learnt from: ankitakinger
PR: appsmithorg/appsmith#29573
File: app/client/src/pages/Editor/Explorer/Entity/EntityProperties.tsx:46-65
Timestamp: 2023-12-14T12:09:37.028Z
Learning: The use of `any` for the `entityProperties` parameter in the `getJSActionBindings` function within `EntityProperties.tsx` is intentional and should not be suggested for refactoring to improve type safety.
Learnt from: ankitakinger
PR: appsmithorg/appsmith#29573
File: app/client/src/pages/Editor/Explorer/Entity/EntityProperties.tsx:46-65
Timestamp: 2023-12-14T12:09:37.028Z
Learning: The use of `any` for the `entityProperties` parameter in the `getJSActionBindings` function within `EntityProperties.tsx` is intentional and should not be suggested for refactoring to improve type safety.
Additional comments not posted (4)
app/client/src/pages/Editor/IDE/EditorPane/index.tsx (2)

9-9: New Import: EntityProperties Component

The EntityProperties component is imported to enhance the UI functionality by rendering the Bindings popover. This aligns with the PR's objective to address the "Show Bindings" issue. Ensure this import is removed when the component is no longer needed.


31-34: Temporary Integration of EntityProperties

The EntityProperties component is integrated to render the Bindings popover, as indicated by the comment. This is a temporary solution, so ensure future updates address its removal or refactoring.

app/client/src/pages/Editor/IDE/EditorPane/Explorer.tsx (1)

36-36: Addition of Overflow Style Property

The overflow="hidden" style property is added to manage content display, ensuring that overflowing content is hidden. This change enhances the UI by preventing widget overflow issues.

app/client/src/pages/Editor/Explorer/Entity/EntityProperties.tsx (1)

134-135: Dynamic Calculation of Left Style Property

The left style property is dynamically calculated using APP_SIDEBAR_WIDTH and DEFAULT_EXPLORER_PANE_WIDTH. This enhances UI responsiveness by adjusting the element's position based on component widths. Ensure these constants are correctly defined and updated as needed.

Copy link

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

@hetunandu hetunandu merged commit 7c1be75 into release Aug 13, 2024
46 checks passed
@hetunandu hetunandu deleted the fix/widget-overflow-bindings-show branch August 13, 2024 07:33
@coderabbitai coderabbitai bot mentioned this pull request Dec 20, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working High This issue blocks a user from building or impacts a lot of users Javascript Product Issues related to users writing javascript in appsmith JS Objects Issues related to JS Objects Needs Triaging Needs attention from maintainers to triage ok-to-test Required label for CI Production Query & JS Pod Issues related to the query & JS Pod Release Blocker This issue must be resolved before the release Verified When issue is retested post its fixed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Clicking on Show Bindings for a JS Object/Widgets/Queries does not display the bindings menu
2 participants