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: remove building blocks on canvas #33761

Merged
merged 8 commits into from
May 31, 2024

Conversation

rahulbarwal
Copy link
Contributor

@rahulbarwal rahulbarwal commented May 27, 2024

Description

Removes building blocks on canvas feature.

Fixes #33756
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.All"

🔍 Cypress test results

Tip

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

Communication

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

  • Yes
  • No

@rahulbarwal rahulbarwal self-assigned this May 27, 2024
Copy link
Contributor

coderabbitai bot commented May 27, 2024

Walkthrough

Walkthrough

The changes remove the starter building blocks and related logic from the application. This includes deleting imports, action handlers, state properties, and conditional logic associated with starter building blocks. The aim is to simplify the codebase and improve user experience by eliminating confusing elements.

Changes

File Path Change Summary
app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Page_Load_Spec.js Removed imports and simplified test setup by directly asserting the page load message.
app/client/src/actions/templateActions.ts Removed functions and action types related to starter building blocks, added getTemplateFilters function.
app/client/src/ce/constants/ReduxActionConstants.tsx Removed declarations related to starter building block actions.
app/client/src/ce/constants/messages.ts Removed properties related to template layouts and starter building block messages.
app/client/src/ce/sagas/index.tsx Removed buildingBlockSagas import and usage.
app/client/src/components/editorComponents/PartialImportExport/PartialExportModal/unitTestUtils.ts Removed declarations related to starter building block states in defaultAppState.
app/client/src/constants/TemplatesConstants.tsx Removed imports, definitions, and configurations for starter building block templates.
app/client/src/layoutSystems/common/dropTarget/OnBoarding/index.tsx Removed imports and logic related to starter building blocks and refactored onboarding logic.
app/client/src/layoutSystems/common/dropTarget/OnBoarding/OnBoarding.test.tsx Removed references to STARTER_TEMPLATE_PAGE_LAYOUTS and adjusted tests to use EMPTY_CANVAS_HINTS.DRAG_DROP_WIDGET_HINT.
app/client/src/layoutSystems/common/dropTarget/unitTestUtils.ts Removed isImportingStarterBuildingBlockToApp from unitTestBaseMockStore.
app/client/src/pages/Editor/FirstTimeUserOnboarding/Overlay.tsx Removed check for isImportingStarterBuildingBlockToApp and simplified conditional logic.
app/client/src/pages/Editor/IDE/Sidebar/SidebarButton.tsx Removed import and usage of DatasourceStarterLayoutPrompt component.
app/client/src/reducers/uiReducers/templateReducer.ts Removed starterBuildingBlockDatasourcePrompt state and related action handlers from the reducer.
app/client/src/sagas/BuildingBlockSagas/index.ts Refactored saga functions, removed unused imports and simplified the flow by consolidating actions.
app/client/src/selectors/templatesSelectors.tsx Removed starterBuildingBlockDatasourcePromptSelector from exported entities.

Assessment against linked issues

Objective (Issue #33756) Addressed Explanation
Remove building blocks on canvas
Simplify user experience by eliminating confusing elements
Refactor related logic and clean up codebase

Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 2e3fae1 and f8059cc.

Files selected for processing (1)
  • app/client/src/components/editorComponents/PartialImportExport/PartialExportModal/unitTestUtils.ts (1 hunks)
Files not reviewed due to errors (1)
  • app/client/src/components/editorComponents/PartialImportExport/PartialExportModal/unitTestUtils.ts (no review received)
Additional context used
Biome
app/client/src/components/editorComponents/PartialImportExport/PartialExportModal/unitTestUtils.ts

[error] 176-176: Unexpected any. Specify a different type.


[error] 178-178: Unexpected any. Specify a different type.


[error] 179-179: Unexpected any. Specify a different type.


[error] 224-224: Unexpected any. Specify a different type.


[error] 226-226: Unexpected any. Specify a different type.


[error] 227-227: Unexpected any. Specify a different type.


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 Configration 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 Building blocks Building blocks on cavas, on templates listing or drag and drop of building blocks. Task A simple Todo Templates Pod Issues related to Templates labels May 27, 2024
@github-actions github-actions bot added the Bug Something isn't working label May 27, 2024
@rahulbarwal
Copy link
Contributor Author

/build-deploy-preview

Copy link

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

@rahulbarwal rahulbarwal added the ok-to-test Required label for CI label May 27, 2024
Copy link

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

Remove unused fields `isImportingStarterBuildingBlockToAppSelector` and `starterBuildingBlockDatasourcePromptSelector` from `templatesSelectors` to clean up the codebase and improve maintainability.
@rahulbarwal rahulbarwal added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels May 27, 2024
@rahulbarwal
Copy link
Contributor Author

/build-deploy-preview skip-tests=true

Copy link

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/9256298026.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 33761.
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

Outside diff range and nitpick comments (5)
app/client/src/selectors/templatesSelectors.tsx (1)

Line range hint 241-243: Consider using a for...of loop instead of forEach for better performance and readability when iterating over templates.

- templates.forEach((template) => {
+ for (const template of templates) {
    filterFilters(FUNCTIONS_FILTER, allFunctions, template);
- });
+ }
app/client/src/ce/constants/ReduxActionConstants.tsx (1)

Line range hint 1186-1187: Replace any with more specific types to enhance type safety.

-  applications: any[];
+  applications: ApplicationPayload[];

-  cards: { [id: string]: WidgetCardProps[] };
+  cards: { [id: string]: WidgetCardProps[] };

Also applies to: 1279-1279

app/client/src/ce/constants/messages.ts (3)

Line range hint 4-4: Consider specifying a more explicit type instead of any for strArgs in the createMessage function to enhance type safety and code maintainability.

- format: (...strArgs: any[]) => string,
+ format: (...strArgs: string[]) => string,

Line range hint 5-5: Consider specifying a more explicit type instead of any for args in the createMessage function to enhance type safety and code maintainability.

- ...args: any[]
+ ...args: string[]

Line range hint 16-47: Avoid using template literals when there is no string interpolation or special character handling required. This can improve code readability and performance.

- export const APPSMITH_DISPLAY_VERSION = (edition: string, version: string) =>
-   `Appsmith ${edition} ${version}`;
+ export const APPSMITH_DISPLAY_VERSION = (edition: string, version: string) =>
+   "Appsmith " + edition + " " + version;

Apply similar changes to all other instances where template literals are used unnecessarily.

Copy link

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

jacquesikot
jacquesikot previously approved these changes May 27, 2024
@rahulbarwal rahulbarwal added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels May 28, 2024
@pratapaprasanna
Copy link
Contributor

DP is failing here

…gBlockExplorerDropTarget

This commit refactors the OnBoarding component to conditionally render the BuildingBlockExplorerDropTarget based on certain conditions. The conditions include the instance being airgapped, the editor state, the UI segment, and the releaseDragDropBuildingBlocksEnabled flag. This change improves the codebase by removing unnecessary code and improving maintainability.
@rahulbarwal rahulbarwal added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels May 28, 2024
@rahulbarwal
Copy link
Contributor Author

/build-deploy-preview skip-tests=true

Copy link

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

@rahulbarwal
Copy link
Contributor Author

DP is failing here

@pratapaprasanna just saw this. What can we do about this? Is this a concern?
I can still access the DP.

Copy link

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

@rahulbarwal rahulbarwal added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels May 30, 2024
@rahulbarwal rahulbarwal added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels May 30, 2024
@rahulbarwal rahulbarwal added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels May 31, 2024
@rahulbarwal rahulbarwal merged commit c72433d into release May 31, 2024
112 of 152 checks passed
@rahulbarwal rahulbarwal deleted the feat/33756/remove-bbs-on-canvas branch May 31, 2024 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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 Task A simple Todo Templates Pod Issues related to Templates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Task: remove building blocks on canvas
3 participants