From bb2bf36481f1371ca827abb3460a2d79604ea558 Mon Sep 17 00:00:00 2001 From: Ankita Kinger Date: Tue, 29 Aug 2023 14:21:29 +0530 Subject: [PATCH] fix: App card layout shifting & dropdown options for longer labels (#26722) ## Description Fixing: - App cards layout shifting on Firefox browser - Dropdown options for longer labels not showing ellipsis - On leave workspace, the page should not reload. Flow should be same as delete workspace action - Remove tooktip on loader workspaces on left pane. #### PR fixes following issue(s) Fixes [#16706](https://github.com/appsmithorg/appsmith/issues/16706) [#16873](https://github.com/appsmithorg/appsmith/issues/16873) [#16416](https://github.com/appsmithorg/appsmith/issues/16416) [#24736](https://github.com/appsmithorg/appsmith/issues/24736) #### Type of change - Bug fix (non-breaking change which fixes an issue) ## 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 --------- Co-authored-by: Aishwarya UR --- app/client/src/ce/pages/Applications/index.tsx | 4 +++- .../ce/pages/workspace/WorkspaceInviteUsersForm.tsx | 13 +++++++++++-- app/client/src/ce/sagas/userSagas.tsx | 4 +++- .../src/pages/AdminSettings/config/advanced.ts | 2 +- .../src/pages/Applications/ApplicationCard.tsx | 3 ++- 5 files changed, 20 insertions(+), 6 deletions(-) diff --git a/app/client/src/ce/pages/Applications/index.tsx b/app/client/src/ce/pages/Applications/index.tsx index 3f3344e19d..a39fb675ec 100644 --- a/app/client/src/ce/pages/Applications/index.tsx +++ b/app/client/src/ce/pages/Applications/index.tsx @@ -373,7 +373,9 @@ export function WorkspaceMenuItem({ containerClassName={ isFetchingApplications ? BlueprintClasses.SKELETON : "" } - ellipsize={19} + ellipsize={ + isFetchingApplications ? 100 : 19 + } /* this is to avoid showing tooltip for loaders */ href={`${window.location.pathname}#${workspace.workspace.id}`} icon="workspace" key={workspace.workspace.id} diff --git a/app/client/src/ce/pages/workspace/WorkspaceInviteUsersForm.tsx b/app/client/src/ce/pages/workspace/WorkspaceInviteUsersForm.tsx index 31489ba9f5..e895e9155d 100644 --- a/app/client/src/ce/pages/workspace/WorkspaceInviteUsersForm.tsx +++ b/app/client/src/ce/pages/workspace/WorkspaceInviteUsersForm.tsx @@ -201,6 +201,15 @@ export const StyledCheckbox = styled(Checkbox)` } `; +export const OptionLabel = styled(Text)` + overflow: hidden; + word-break: break-all; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; +`; + const validateFormValues = (values: { users: string; role?: string; @@ -548,12 +557,12 @@ function WorkspaceInviteUsersForm(props: any) { /> )}
- {role.value} - + {role.description && ( {role.description} )} diff --git a/app/client/src/ce/sagas/userSagas.tsx b/app/client/src/ce/sagas/userSagas.tsx index baac439e63..d9c1879e94 100644 --- a/app/client/src/ce/sagas/userSagas.tsx +++ b/app/client/src/ce/sagas/userSagas.tsx @@ -557,11 +557,13 @@ export function* leaveWorkspaceSaga( ) { try { const request: LeaveWorkspaceRequest = action.payload; + const { workspaceId } = action.payload; const response: ApiResponse = yield call(UserApi.leaveWorkspace, request); const isValidResponse: boolean = yield validateResponse(response); if (isValidResponse) { yield put({ - type: ReduxActionTypes.GET_ALL_APPLICATION_INIT, + type: ReduxActionTypes.DELETE_WORKSPACE_SUCCESS, + payload: workspaceId, }); toast.show(`You have successfully left the workspace`, { kind: "success", diff --git a/app/client/src/pages/AdminSettings/config/advanced.ts b/app/client/src/pages/AdminSettings/config/advanced.ts index 94ed3a1369..dfab8254ce 100644 --- a/app/client/src/pages/AdminSettings/config/advanced.ts +++ b/app/client/src/pages/AdminSettings/config/advanced.ts @@ -30,7 +30,7 @@ export const config: AdminConfigType = { controlSubType: SettingSubtype.TEXT, label: "Redis URL", subText: - "* Appsmith internally uses redis for session storage. Change this to an external redis for clustering", + "* Appsmith internally uses Redis for session storage. Change this to an external redis for clustering", }, { id: "APPSMITH_CUSTOM_DOMAIN", diff --git a/app/client/src/pages/Applications/ApplicationCard.tsx b/app/client/src/pages/Applications/ApplicationCard.tsx index 74745d099d..778ed6f355 100644 --- a/app/client/src/pages/Applications/ApplicationCard.tsx +++ b/app/client/src/pages/Applications/ApplicationCard.tsx @@ -294,7 +294,8 @@ const CardFooter = styled.div` display: flex; justify-content: space-between; align-items: center; - margin-top: 4px; + margin: 4px auto 0; + width: ${(props) => props.theme.card.minWidth - 8}px; `; const IconScrollWrapper = styled.div`