-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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: Revert "chore: Remove empty canvas prompts and improve widget editor header (#33993)" #34035
fix: Revert "chore: Remove empty canvas prompts and improve widget editor header (#33993)" #34035
Conversation
WalkthroughThe recent updates enhance the functionality of forking templates into Git-connected apps, improving the user interface interactions and adding new constants for better messaging. Key changes include replacing function calls with Cypress commands for UI interactions, adding new constants for template and page generation descriptions, and updating the Changes
Poem
Warning Review ran into problemsProblems (1)
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (5)
- app/client/cypress/e2e/Regression/ClientSide/Templates/ForkTemplateToGitConnectedApp.js (1 hunks)
- app/client/cypress/e2e/Regression/ClientSide/Templates/Fork_Template_To_App_spec.ts (1 hunks)
- app/client/src/ce/constants/messages.ts (2 hunks)
- app/client/src/pages/Editor/WidgetsEditor/WidgetEditorHeader.tsx (2 hunks)
- app/client/src/pages/Editor/WidgetsEditor/components/EmptyCanvasPrompts.tsx (1 hunks)
Additional context used
Learnings (1)
app/client/cypress/e2e/Regression/ClientSide/Templates/ForkTemplateToGitConnectedApp.js (1)
User: dipyamanbiswas07 PR: appsmithorg/appsmith#29282 File: app/client/cypress/e2e/Regression/ClientSide/Templates/Fork_Template_spec.js:11-17 Timestamp: 2024-01-09T08:39:59.723Z Learning: The user has clarified that intercepts are called in end-to-end tests, and therefore resetting the feature flag in an `afterEach` hook is not required in their test setup.
Additional comments not posted (6)
app/client/src/pages/Editor/WidgetsEditor/WidgetEditorHeader.tsx (2)
2-8
: Ensure that all new imports are used appropriately within the component.
20-32
: The conditional rendering logic forEmptyCanvasPrompts
is clear and well-implemented. However, ensure that theisPreviewMode
andisAppSettingsPaneWithNavigationTabOpen
states are correctly managed across the application to prevent unintended UI behavior.#!/bin/bash # Description: Verify the usage of `isPreviewMode` and `isAppSettingsPaneWithNavigationTabOpen` across the application. # Test: Search for the usage of these states. Expect: Consistent usage across the application. rg --type typescript $'isPreviewMode|isAppSettingsPaneWithNavigationTabOpen'app/client/cypress/e2e/Regression/ClientSide/Templates/Fork_Template_To_App_spec.ts (1)
36-36
: The refactoring to useagHelper.GetNClick
for interacting with the template card simplifies the test code and makes it more readable. Ensure that thetemplate.startFromTemplateCard
selector is robust and correctly identifies the template card across different test environments.#!/bin/bash # Description: Verify the robustness of the `template.startFromTemplateCard` selector. # Test: Search for the usage of this selector. Expect: Consistent and correct identification in all environments. rg --type typescript $'template.startFromTemplateCard'app/client/cypress/e2e/Regression/ClientSide/Templates/ForkTemplateToGitConnectedApp.js (1)
35-40
: The update to use Cypress commands for UI interactions enhances the readability and maintainability of the test code. Ensure that these commands are consistently used in similar contexts throughout the test suite.#!/bin/bash # Description: Verify the consistent use of Cypress commands in similar test contexts. # Test: Search for the usage of Cypress commands in the test suite. Expect: Consistent usage. rg --type javascript $'cy.get|cy.click'app/client/src/pages/Editor/WidgetsEditor/components/EmptyCanvasPrompts.tsx (2)
1-28
: The new imports and hooks are well-integrated into the component. Ensure that these dependencies are properly managed and do not introduce side effects that could affect the component's performance.
85-168
: The refactoring of theEmptyCanvasPrompts
component enhances its functionality and makes it more modular. However, ensure that the new event handlers and state management logic are thoroughly tested, especially in edge cases where the canvas might transition between states.#!/bin/bash # Description: Verify the robustness of the new event handlers and state management logic. # Test: Search for the usage of `showCanvasTopSection` and `isPreview`. Expect: Robust handling in all states. rg --type typescript $'showCanvasTopSection|isPreview'
export const TEMPLATE_CARD_TITLE = () => "Start from a template"; | ||
export const TEMPLATE_CARD_DESCRIPTION = () => | ||
"Create app from template by selecting pages"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using consistent naming for constants related to similar functionalities.
- export const TEMPLATE_CARD_TITLE = () => "Start from a template";
- export const TEMPLATE_CARD_DESCRIPTION = () =>
- "Create app from template by selecting pages";
- export const GENERATE_PAGE = () => "Generate page from data table";
- export const GENERATE_PAGE_DESCRIPTION = () =>
- "Start app with a simple CRUD UI and customize it";
+ export const TEMPLATE_CARD_TITLE = () => "Start From a Template";
+ export const TEMPLATE_CARD_DESCRIPTION = () => "Create App From Template by Selecting Pages";
+ export const GENERATE_PAGE = () => "Generate Page From Data Table";
+ export const GENERATE_PAGE_DESCRIPTION = () => "Start App With a Simple CRUD UI and Customize It";
This change ensures that the function names and return strings are more readable and maintain a consistent format across similar functionalities.
Also applies to: 1829-1831
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
export const TEMPLATE_CARD_TITLE = () => "Start from a template"; | |
export const TEMPLATE_CARD_DESCRIPTION = () => | |
"Create app from template by selecting pages"; | |
export const TEMPLATE_CARD_TITLE = () => "Start From a Template"; | |
export const TEMPLATE_CARD_DESCRIPTION = () => "Create App From Template by Selecting Pages"; | |
export const GENERATE_PAGE = () => "Generate Page From Data Table"; | |
export const GENERATE_PAGE_DESCRIPTION = () => "Start App With a Simple CRUD UI and Customize It"; |
Not needed anymore, it is fixed here #34037 |
Description
This reverts commit 8d0091e.
Cypress specs are failing due to this.
Fixes #
Issue Number
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.Templates, @tag.Visual"
🔍 Cypress test results
Caution
🔴 🔴 🔴 Some tests have failed.
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/9400055069
Commit: 2c7077a
Cypress dashboard: Click here!
The following are new failures, please fix them before merging the PR:
Communication
Should the DevRel and Marketing teams inform users about this change?
Summary by CodeRabbit
New Features
Bug Fixes
Refactor
Documentation