From 3e8d98a3e3df4fb29d3019993803bfa55d7ad22a Mon Sep 17 00:00:00 2001 From: ashit-rath Date: Thu, 12 Oct 2023 23:04:30 +0530 Subject: [PATCH] chore: No apps message changes in workspace home page (#27986) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description Change in no apps message in home page #### PR fixes following issue(s) Fixes #27775 > if no issue exists, please create an issue and ask the maintainers about this first > > #### Media > A video or a GIF is preferred. when using Loom, don’t embed because it looks like it’s a GIF. instead, just link to the video > > #### Type of change - Chore (housekeeping or task changes that don't impact user perception) ## Testing > #### How Has This Been Tested? > Please describe the tests that you ran to verify your changes. Also list any relevant details for your test configuration. > Delete anything that is not relevant - [ ] Manual - [ ] JUnit - [ ] Jest - [ ] Cypress > > #### Test Plan > Add Testsmith test cases links that relate to this PR > > #### Issues raised during DP testing > Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR) > > > ## Checklist: #### Dev activity - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] PR is being merged under a feature flag #### QA activity: - [ ] [Speedbreak features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-) have been covered - [ ] Test plan covers all impacted features and [areas of interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-) - [ ] Test plan has been peer reviewed by project stakeholders and other QA members - [ ] Manually tested functionality on DP - [ ] We had an implementation alignment call with stakeholders post QA Round 2 - [ ] Cypress test cases have been added and approved by SDET/manual QA - [ ] Added `Test Plan Approved` label after Cypress tests were reviewed - [ ] Added `Test Plan Approved` label after JUnit tests were reviewed --- app/client/src/ce/constants/messages.ts | 2 ++ .../src/ce/pages/Applications/ApplicationCardList.tsx | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/client/src/ce/constants/messages.ts b/app/client/src/ce/constants/messages.ts index 14980d1184..8267044a88 100644 --- a/app/client/src/ce/constants/messages.ts +++ b/app/client/src/ce/constants/messages.ts @@ -269,6 +269,8 @@ export const WORKSPACES_HEADING = () => `Workspaces`; export const WELCOME_TOUR = () => `Welcome tour`; export const NO_APPS_FOUND = () => `Whale! Whale! This name doesn't ring a bell!`; +export const APPLICATION_CARD_LIST_ZERO_STATE = () => + `There are no apps in this workspace.`; // Lightning menu export const LIGHTNING_MENU_DATA_API = () => `Use data from an API`; diff --git a/app/client/src/ce/pages/Applications/ApplicationCardList.tsx b/app/client/src/ce/pages/Applications/ApplicationCardList.tsx index e26e67f0a7..9d03ab288d 100644 --- a/app/client/src/ce/pages/Applications/ApplicationCardList.tsx +++ b/app/client/src/ce/pages/Applications/ApplicationCardList.tsx @@ -13,6 +13,10 @@ import { NoAppsFound } from "@appsmith/pages/Applications"; import ApplicationCard from "pages/Applications/ApplicationCard"; import type { ApplicationPayload } from "@appsmith/constants/ReduxActionConstants"; import type { UpdateApplicationPayload } from "@appsmith/api/ApplicationApi"; +import { + APPLICATION_CARD_LIST_ZERO_STATE, + createMessage, +} from "@appsmith/constants/messages"; const NoAppsFoundIcon = importSvg( async () => import("assets/svg/no-apps-icon.svg"), @@ -81,7 +85,7 @@ function ApplicationCardList({ {applications.length === 0 && ( - There’s nothing inside this workspace + {createMessage(APPLICATION_CARD_LIST_ZERO_STATE)} {/* below component is duplicate. This is because of cypress test were failing */} {hasCreateNewApplicationPermission && (