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 <aishwarya@appsmith.com>
This commit is contained in:
Ankita Kinger 2023-08-29 14:21:29 +05:30 committed by GitHub
parent 5b0ae2a842
commit bb2bf36481
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 6 deletions

View File

@ -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}

View File

@ -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) {
/>
)}
<div className="flex flex-col gap-1">
<Text
<OptionLabel
color="var(--ads-v2-color-fg-emphasis)"
kind={role.description && "heading-xs"}
>
{role.value}
</Text>
</OptionLabel>
{role.description && (
<Text kind="body-s">{role.description}</Text>
)}

View File

@ -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",

View File

@ -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",

View File

@ -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`