PromucFlow_constructor/app/client/src/api
Jacques Ikot 0118051301
feat: implement dropping building blocks on canvas (#31857)
## Description
> [!TIP]  
**Goal**
To drag any building blocks from the explorer and drop at any position
on the users canvas with full implementation.

**Implementation**
- Show skeleton widget when building block is initially dragged unto the
canvas.
- Make API call to add datasources, queries, and JS to existing page of
users app
- Get returned widget DSL and use existing copy paste logic to display
widgets on the canvas
- Remove loading state, handle clean up for copy paste
- Run all queries newly created by the dropped building block

**Limitations**
- There is a loading state and the process is not instant like dropping
a widget

This PR is followed by this one
[here](https://github.com/appsmithorg/appsmith/pull/31406), which
displays the loading state when a building block is dragged unto the
canvas.

Fixes #31856
## Automation

/ok-to-test tags="@tag.Templates, @tag.MainContainer, @tag.Visual,
@tag.Widget"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/8701664455>
> Commit: 456a7a0a322e76974a7f5c41a6c1e274ef82e4ea
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=8701664455&attempt=1"
target="_blank">Click here!</a>

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















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

- **New Features**
- Introduced a new "Building Blocks" category in the widget sidebar for
enhanced organization and accessibility.
- Added functionality to resize building blocks with new horizontal and
vertical limits.
- Implemented a "see more" button for "Building Blocks" to display all
associated widgets.
- Enhanced drag and drop functionality for building blocks on the
canvas.

- **Enhancements**
- Improved sorting logic for widgets, prioritizing "Building Blocks".
    - Enhanced widget search functionality within the sidebar.

- **Bug Fixes**
- Adjusted default rows and columns settings for explorer building
blocks to improve layout and usability.

- **Documentation**
- Updated messages and constants related to new features for clarity and
consistency.

- **Refactor**
- Refactored drag and drop handling logic to support new building block
constraints and features.
- Updated application state management to include building blocks
related data.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Anagh Hegde <anagh@appsmith.com>
Co-authored-by: Rahul Barwal <rahul.barwal@appsmith.com>
2024-04-16 09:41:09 +01:00
..
ActionAPI.tsx feat: workflow queries/actions rename code split (#31300) 2024-03-05 10:28:34 +05:30
Api.ts chore:add eslint rules (#27878) 2023-10-09 16:54:06 +03:00
ApiResponses.tsx chore: add consistent-type-definitions rule (#27907) 2023-10-11 10:35:24 +03:00
AppThemingApi.tsx chore: Remove "Save theme" functionality (#31481) 2024-03-12 18:54:39 +05:30
CloudServicesApi.ts
ConsolidatedPageLoadApi.tsx feat: Frontend changes for consolidated-api with EE test case support (#30506) 2024-01-24 12:14:16 +05:30
DatasourcesApi.ts chore:add eslint rules (#27878) 2023-10-09 16:54:06 +03:00
GitSyncAPI.tsx chore: remove git release feature flags (#30962) 2024-02-09 10:22:47 +05:30
ImportApi.ts chore: refactor curl import API to support context type (#30934) 2024-02-14 12:18:30 +05:30
LibraryAPI.tsx chore: remove xml parser v3 as a default library (#28012) 2023-10-20 11:08:47 +05:30
OAuthApi.ts chore: change saas authentication to context based (#31064) 2024-03-07 15:36:31 +05:30
PageApi.tsx feat: Frontend changes for consolidated-api with EE test case support (#30506) 2024-01-24 12:14:16 +05:30
PluginApi.ts feat: Add knowledge retrieval in Appsmith AI (#30725) 2024-02-05 17:15:45 +05:30
ReleasesAPI.tsx chore:add eslint rules (#27878) 2023-10-09 16:54:06 +03:00
SaasApi.ts chore:add eslint rules (#27878) 2023-10-09 16:54:06 +03:00
SearchApi.tsx feat: Homepage experience v2 changes (#29282) 2024-01-25 19:11:48 +05:30
TemplatesApi.ts feat: implement dropping building blocks on canvas (#31857) 2024-04-16 09:41:09 +01:00
WidgetConfigsApi.tsx chore:add eslint rules (#27878) 2023-10-09 16:54:06 +03:00
WidgetSidebarApi.tsx chore:add eslint rules (#27878) 2023-10-09 16:54:06 +03:00