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: Drag drop Building blocks prompt fixes #33093

Merged
merged 13 commits into from
May 1, 2024

Conversation

rahulbarwal
Copy link
Contributor

@rahulbarwal rahulbarwal commented May 1, 2024

Description

This PR fixes 2 issues:

  1. Building blocks after getting dropped had multiple seleciton on - now we not selecting anything
  2. BBs were visible in side by side nav. Now it will only be visible if UI widget is selected.

Fixes #33085
or
Fixes Issue URL

Warning

If no issue exists, please create an issue first, and check with the maintainers if the issue is valid.

Automation

/ok-to-test tags="@tag.Sanity, @tag.Templates"

🔍 Cypress test results

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/8909118563
Commit: 6603b5c
Cypress dashboard url: Click here!

Communication

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

  • Yes
  • No

@rahulbarwal rahulbarwal added Bug Something isn't working Templates Product Issues related to Templates labels May 1, 2024
@rahulbarwal rahulbarwal added the Building blocks Building blocks on cavas, on templates listing or drag and drop of building blocks. label May 1, 2024
@rahulbarwal rahulbarwal self-assigned this May 1, 2024
Copy link
Contributor

coderabbitai bot commented May 1, 2024

Walkthrough

The changes aim to enhance drag-and-drop functionality for building blocks, update UI rendering conditions, and introduce new components to improve the user experience. Text content settings in components are also adjusted based on specific conditions in the IDE environment.

Changes

File Path Change Summary
.../common/dropTarget/DropTargetComponent.tsx Removed getIsMobileCanvasLayout, updated component references to Onboarding.
.../common/dropTarget/OnBoarding/index.tsx Introduced Onboarding component for dynamic rendering based on IDE environment conditions.
.../common/dropTarget/buildingBlockExplorerDropTarget/index.tsx Imported constants for dynamic text content setting.
.../layoutSystems/common/dropTarget/OnBoarding/OnBoarding.test.tsx Added test cases for the Onboarding component.

Assessment against linked issues

Objective Addressed Explanation
Enhance drag-and-drop UX for building blocks (#33085) The changes aim to improve drag-and-drop functionality for building blocks.
Implement visual feedback post-building block drop (#31314) The skeleton loader widget for post-building block drop visual feedback is not implemented.
Streamline building block integration (#31314) The introduction of the Onboarding component supports the objective of integrating building blocks efficiently.
Address test failures caused by previous changes (#30378) The changes do not address test failures caused by previous changes.

Possibly related issues


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 removed the Bug Something isn't working label May 1, 2024
@rahulbarwal rahulbarwal changed the title Fix/33085/dragdropprompt-enabled-at-weird-times fix: Drag drop Building blocks prompt fixes May 1, 2024
@github-actions github-actions bot added the Bug Something isn't working label May 1, 2024
@rahulbarwal
Copy link
Contributor Author

/build-deploy-preview skip-tests=true

Copy link

github-actions bot commented May 1, 2024

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

Copy link

github-actions bot commented May 1, 2024

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

jacquesikot
jacquesikot previously approved these changes May 1, 2024
@rahulbarwal rahulbarwal marked this pull request as draft May 1, 2024 07:19
@rahulbarwal rahulbarwal marked this pull request as ready for review May 1, 2024 10:46
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: 3

app/client/src/ce/constants/messages.ts Outdated Show resolved Hide resolved
@@ -41,11 +42,13 @@ const BuildingBlockExplorerDropTarget = () => {

<TextContainer>
<Text kind="heading-s" style={{ marginBottom: "4px" }}>
Drag & drop a building block
{createMessage(EMPTY_CANVAS.DRAG_DROP_BUILDING_BLOCK_HINT.TITLE)}
Copy link
Contributor

Choose a reason for hiding this comment

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

Tip

Codebase Verification

The message key EMPTY_CANVAS.DRAG_DROP_BUILDING_BLOCK_HINT.TITLE used in the BuildingBlockExplorerDropTarget component does not appear to be defined in the messages.ts file located at app/client/src/layoutSystems/anvil/common/messages.ts. This could potentially lead to runtime errors if the key is indeed not defined anywhere in the codebase. It is recommended to check other messages.ts files or confirm the correct location and definition of this message key.

  • app/client/src/layoutSystems/anvil/common/messages.ts - Key not found
Analysis chain

Ensure the message key used here is correctly defined in the constants.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that the message key `EMPTY_CANVAS.DRAG_DROP_BUILDING_BLOCK_HINT.TITLE` is defined in the messages constants file.

# Search for the message key definition in the constants file.
rg --type ts 'DRAG_DROP_BUILDING_BLOCK_HINT.TITLE' src/constants/messages.ts

Length of output: 142



Script:

#!/bin/bash
# Description: Search for the file `messages.ts` in the entire repository to confirm its existence and location.

# Use fd to find the file named messages.ts
fd messages.ts

Length of output: 566



Script:

#!/bin/bash
# Description: Verify that the message key `EMPTY_CANVAS.DRAG_DROP_BUILDING_BLOCK_HINT.TITLE` is defined in the identified messages constants file.

# Search for the message key definition in the identified constants file.
rg --type ts 'DRAG_DROP_BUILDING_BLOCK_HINT.TITLE' app/client/src/layoutSystems/anvil/common/messages.ts

Length of output: 104

…nboarding component when drag and drop is enabled.
jacquesikot
jacquesikot previously approved these changes May 1, 2024
@rahulbarwal rahulbarwal added the ok-to-test Required label for CI label May 1, 2024
@rahulbarwal rahulbarwal merged commit c37aa0a into release May 1, 2024
13 checks passed
@rahulbarwal rahulbarwal deleted the fix/33085/dragdropprompt-enabled-at-weird-times branch May 1, 2024 12:40
@Nikhil-Nandagopal Nikhil-Nandagopal added Accelerators Product Issues related to app building accelerators and removed Templates Product Issues related to Templates labels Aug 6, 2024
@github-actions github-actions bot added QA Needs QA attention QA Pod Issues under the QA Pod Widgets & Accelerators Pod Issues related to widgets & Accelerators labels Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accelerators Product Issues related to app building accelerators Bug Something isn't working Building blocks Building blocks on cavas, on templates listing or drag and drop of building blocks. ok-to-test Required label for CI QA Pod Issues under the QA Pod QA Needs QA attention Widgets & Accelerators Pod Issues related to widgets & Accelerators
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Drag drop building blocks prompt, does not look good with side by side navigation
3 participants