From 0d8c0226a78d97b2c6c8c7da0e3e19dbee810093 Mon Sep 17 00:00:00 2001 From: Ankita Kinger Date: Fri, 15 Sep 2023 11:51:18 +0530 Subject: [PATCH] chore: Updating share modal title on app editor and viewer (#27321) ## Description Updating share modal title on app editor and viewer #### PR fixes following issue(s) Fixes # (issue number) #### Type of change - Chore (housekeeping or task changes that don't impact user perception) ## Testing #### How Has This Been Tested? - [x] Manual - [ ] JUnit - [ ] Jest - [ ] Cypress ## Checklist: #### Dev activity - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] 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 +- .../editorComponents/form/FormDialogComponent.tsx | 2 +- .../pages/AppViewer/Navigation/components/ShareButton.tsx | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/client/src/ce/constants/messages.ts b/app/client/src/ce/constants/messages.ts index 52caaa6ab6..97c791b21e 100644 --- a/app/client/src/ce/constants/messages.ts +++ b/app/client/src/ce/constants/messages.ts @@ -164,7 +164,7 @@ export const INVITE_TAB = () => "Invite"; export const INVITE_USERS_VALIDATION_EMAIL_LIST = () => `Invalid email address(es) found`; export const INVITE_USERS_VALIDATION_ROLE_EMPTY = () => `Please select a role`; -export const APPLICATION_INVITE = (name: string) => name; +export const APPLICATION_INVITE = (name: string) => `Invite users to ${name}`; export const INVITE_USERS_EMAIL_LIST_PLACEHOLDER = () => `Comma separated emails`; export const INVITE_USERS_ROLE_SELECT_PLACEHOLDER = () => `Select role`; diff --git a/app/client/src/components/editorComponents/form/FormDialogComponent.tsx b/app/client/src/components/editorComponents/form/FormDialogComponent.tsx index 7adb4cc6eb..a5d4874519 100644 --- a/app/client/src/components/editorComponents/form/FormDialogComponent.tsx +++ b/app/client/src/components/editorComponents/form/FormDialogComponent.tsx @@ -56,7 +56,7 @@ export function FormDialogComponent(props: FormDialogComponentProps) {
- {props.title || `Invite Users to ${props.workspace.name}`} + {props.title || `Invite users to ${props.workspace.name}`}
diff --git a/app/client/src/pages/AppViewer/Navigation/components/ShareButton.tsx b/app/client/src/pages/AppViewer/Navigation/components/ShareButton.tsx index b3f2505d13..ebff48c0f4 100644 --- a/app/client/src/pages/AppViewer/Navigation/components/ShareButton.tsx +++ b/app/client/src/pages/AppViewer/Navigation/components/ShareButton.tsx @@ -16,6 +16,7 @@ import { SHARE_APP, } from "@appsmith/constants/messages"; import FormDialogComponent from "components/editorComponents/form/FormDialogComponent"; +import { getCurrentAppWorkspace } from "@appsmith/selectors/workspaceSelectors"; const { cloudHosting } = getAppsmithConfigs(); @@ -36,6 +37,7 @@ const ShareButton = (props: ShareButtonProps) => { } = props; const selectedTheme = useSelector(getSelectedAppTheme); + const currentWorkspace = useSelector(getCurrentAppWorkspace); const navColorStyle = currentApplicationDetails?.applicationDetail?.navigationSetting @@ -83,10 +85,10 @@ const ShareButton = (props: ShareButtonProps) => { placeholder={createMessage(INVITE_USERS_PLACEHOLDER, cloudHosting)} title={createMessage( APPLICATION_INVITE, - currentApplicationDetails?.name, + currentWorkspace?.name, cloudHosting, )} - workspace={{ id: currentWorkspaceId }} + workspace={currentWorkspace} /> )}