PromucFlow_constructor/app/client/src/components/common/Card.tsx

453 lines
11 KiB
TypeScript
Raw Normal View History

chore: Workspace home page refactor for packages (#26654) ## Description This is a refactor PR that helps introducing the packages section in EE. Apart from refactor there are some design changes that are made (refer figma design and the `Design changes` list). Refactor list - - Applications list extracted from the index file to it's own component (`ApplicationCardList.tsx`) - Extracted `+ New` button to a new component to override in EE (`WorkspaceAction.tsx`). - Created and moved workspace context menu just de-clutter the main Application page (`WorkspaceMenu.tsx`) - Mixed packages into the fuzzy search logic with dummy package selector logic (EE will have the main logic) - Extracted common Card logic from ApplicationCard component to reuse for packages. (`Card.tsx`) - Design changes - - Search bar increased width to `500px` - Workspace heading font size decreased to 16px - Workspace heading text color - Application card name font size decreased to 16px - Gap between application cards decreased to 12px - Added a horizontal divider between each workspace [Figma Design](https://www.figma.com/file/Z0QsSdGOydURn6WIMQ3rHM/Solution-Design?type=design&node-id=1171-91563&mode=design&t=GTnV1fZa5ODy8xGD-0) Fixes #26497 #### 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 - [x] Manual - [ ] JUnit - [x] 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 - [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: Ankita Kinger <ankita@appsmith.com>
2023-08-31 08:21:04 +00:00
import React from "react";
import styled from "styled-components";
import { Card as BlueprintCard, Classes } from "@blueprintjs/core";
import { omit } from "lodash";
chore: Workspace home page refactor for packages (#26654) ## Description This is a refactor PR that helps introducing the packages section in EE. Apart from refactor there are some design changes that are made (refer figma design and the `Design changes` list). Refactor list - - Applications list extracted from the index file to it's own component (`ApplicationCardList.tsx`) - Extracted `+ New` button to a new component to override in EE (`WorkspaceAction.tsx`). - Created and moved workspace context menu just de-clutter the main Application page (`WorkspaceMenu.tsx`) - Mixed packages into the fuzzy search logic with dummy package selector logic (EE will have the main logic) - Extracted common Card logic from ApplicationCard component to reuse for packages. (`Card.tsx`) - Design changes - - Search bar increased width to `500px` - Workspace heading font size decreased to 16px - Workspace heading text color - Application card name font size decreased to 16px - Gap between application cards decreased to 12px - Added a horizontal divider between each workspace [Figma Design](https://www.figma.com/file/Z0QsSdGOydURn6WIMQ3rHM/Solution-Design?type=design&node-id=1171-91563&mode=design&t=GTnV1fZa5ODy8xGD-0) Fixes #26497 #### 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 - [x] Manual - [ ] JUnit - [x] 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 - [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: Ankita Kinger <ankita@appsmith.com>
2023-08-31 08:21:04 +00:00
import { AppIcon, Size, TextType, Text } from "design-system-old";
import type { PropsWithChildren } from "react";
import type { HTMLDivProps, ICardProps } from "@blueprintjs/core";
import { Button, Checkbox, type MenuItemProps } from "design-system";
chore: Workspace home page refactor for packages (#26654) ## Description This is a refactor PR that helps introducing the packages section in EE. Apart from refactor there are some design changes that are made (refer figma design and the `Design changes` list). Refactor list - - Applications list extracted from the index file to it's own component (`ApplicationCardList.tsx`) - Extracted `+ New` button to a new component to override in EE (`WorkspaceAction.tsx`). - Created and moved workspace context menu just de-clutter the main Application page (`WorkspaceMenu.tsx`) - Mixed packages into the fuzzy search logic with dummy package selector logic (EE will have the main logic) - Extracted common Card logic from ApplicationCard component to reuse for packages. (`Card.tsx`) - Design changes - - Search bar increased width to `500px` - Workspace heading font size decreased to 16px - Workspace heading text color - Application card name font size decreased to 16px - Gap between application cards decreased to 12px - Added a horizontal divider between each workspace [Figma Design](https://www.figma.com/file/Z0QsSdGOydURn6WIMQ3rHM/Solution-Design?type=design&node-id=1171-91563&mode=design&t=GTnV1fZa5ODy8xGD-0) Fixes #26497 #### 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 - [x] Manual - [ ] JUnit - [x] 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 - [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: Ankita Kinger <ankita@appsmith.com>
2023-08-31 08:21:04 +00:00
import GitConnectedBadge from "./GitConnectedBadge";
import { noop } from "utils/AppsmithUtils";
chore: Workspace home page refactor for packages (#26654) ## Description This is a refactor PR that helps introducing the packages section in EE. Apart from refactor there are some design changes that are made (refer figma design and the `Design changes` list). Refactor list - - Applications list extracted from the index file to it's own component (`ApplicationCardList.tsx`) - Extracted `+ New` button to a new component to override in EE (`WorkspaceAction.tsx`). - Created and moved workspace context menu just de-clutter the main Application page (`WorkspaceMenu.tsx`) - Mixed packages into the fuzzy search logic with dummy package selector logic (EE will have the main logic) - Extracted common Card logic from ApplicationCard component to reuse for packages. (`Card.tsx`) - Design changes - - Search bar increased width to `500px` - Workspace heading font size decreased to 16px - Workspace heading text color - Application card name font size decreased to 16px - Gap between application cards decreased to 12px - Added a horizontal divider between each workspace [Figma Design](https://www.figma.com/file/Z0QsSdGOydURn6WIMQ3rHM/Solution-Design?type=design&node-id=1171-91563&mode=design&t=GTnV1fZa5ODy8xGD-0) Fixes #26497 #### 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 - [x] Manual - [ ] JUnit - [x] 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 - [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: Ankita Kinger <ankita@appsmith.com>
2023-08-31 08:21:04 +00:00
type CardProps = PropsWithChildren<{
backgroundColor: string;
contextMenu: React.ReactNode;
editedByText: string;
handleMultipleSelection?: (e: any) => void;
chore: Workspace home page refactor for packages (#26654) ## Description This is a refactor PR that helps introducing the packages section in EE. Apart from refactor there are some design changes that are made (refer figma design and the `Design changes` list). Refactor list - - Applications list extracted from the index file to it's own component (`ApplicationCardList.tsx`) - Extracted `+ New` button to a new component to override in EE (`WorkspaceAction.tsx`). - Created and moved workspace context menu just de-clutter the main Application page (`WorkspaceMenu.tsx`) - Mixed packages into the fuzzy search logic with dummy package selector logic (EE will have the main logic) - Extracted common Card logic from ApplicationCard component to reuse for packages. (`Card.tsx`) - Design changes - - Search bar increased width to `500px` - Workspace heading font size decreased to 16px - Workspace heading text color - Application card name font size decreased to 16px - Gap between application cards decreased to 12px - Added a horizontal divider between each workspace [Figma Design](https://www.figma.com/file/Z0QsSdGOydURn6WIMQ3rHM/Solution-Design?type=design&node-id=1171-91563&mode=design&t=GTnV1fZa5ODy8xGD-0) Fixes #26497 #### 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 - [x] Manual - [ ] JUnit - [x] 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 - [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: Ankita Kinger <ankita@appsmith.com>
2023-08-31 08:21:04 +00:00
hasReadPermission: boolean;
icon: string;
isEnabledMultipleSelection: boolean;
chore: Workspace home page refactor for packages (#26654) ## Description This is a refactor PR that helps introducing the packages section in EE. Apart from refactor there are some design changes that are made (refer figma design and the `Design changes` list). Refactor list - - Applications list extracted from the index file to it's own component (`ApplicationCardList.tsx`) - Extracted `+ New` button to a new component to override in EE (`WorkspaceAction.tsx`). - Created and moved workspace context menu just de-clutter the main Application page (`WorkspaceMenu.tsx`) - Mixed packages into the fuzzy search logic with dummy package selector logic (EE will have the main logic) - Extracted common Card logic from ApplicationCard component to reuse for packages. (`Card.tsx`) - Design changes - - Search bar increased width to `500px` - Workspace heading font size decreased to 16px - Workspace heading text color - Application card name font size decreased to 16px - Gap between application cards decreased to 12px - Added a horizontal divider between each workspace [Figma Design](https://www.figma.com/file/Z0QsSdGOydURn6WIMQ3rHM/Solution-Design?type=design&node-id=1171-91563&mode=design&t=GTnV1fZa5ODy8xGD-0) Fixes #26497 #### 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 - [x] Manual - [ ] JUnit - [x] 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 - [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: Ankita Kinger <ankita@appsmith.com>
2023-08-31 08:21:04 +00:00
isContextMenuOpen: boolean;
isFetching: boolean;
isMobile?: boolean;
moreActionItems: ModifiedMenuItemProps[];
primaryAction: (e: any) => void;
setShowOverlay: (show: boolean) => void;
showGitBadge: boolean;
showOverlay: boolean;
testId: string;
title: string;
titleTestId: string;
isSelected?: boolean;
chore: Workspace home page refactor for packages (#26654) ## Description This is a refactor PR that helps introducing the packages section in EE. Apart from refactor there are some design changes that are made (refer figma design and the `Design changes` list). Refactor list - - Applications list extracted from the index file to it's own component (`ApplicationCardList.tsx`) - Extracted `+ New` button to a new component to override in EE (`WorkspaceAction.tsx`). - Created and moved workspace context menu just de-clutter the main Application page (`WorkspaceMenu.tsx`) - Mixed packages into the fuzzy search logic with dummy package selector logic (EE will have the main logic) - Extracted common Card logic from ApplicationCard component to reuse for packages. (`Card.tsx`) - Design changes - - Search bar increased width to `500px` - Workspace heading font size decreased to 16px - Workspace heading text color - Application card name font size decreased to 16px - Gap between application cards decreased to 12px - Added a horizontal divider between each workspace [Figma Design](https://www.figma.com/file/Z0QsSdGOydURn6WIMQ3rHM/Solution-Design?type=design&node-id=1171-91563&mode=design&t=GTnV1fZa5ODy8xGD-0) Fixes #26497 #### 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 - [x] Manual - [ ] JUnit - [x] 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 - [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: Ankita Kinger <ankita@appsmith.com>
2023-08-31 08:21:04 +00:00
}>;
interface NameWrapperProps {
chore: Workspace home page refactor for packages (#26654) ## Description This is a refactor PR that helps introducing the packages section in EE. Apart from refactor there are some design changes that are made (refer figma design and the `Design changes` list). Refactor list - - Applications list extracted from the index file to it's own component (`ApplicationCardList.tsx`) - Extracted `+ New` button to a new component to override in EE (`WorkspaceAction.tsx`). - Created and moved workspace context menu just de-clutter the main Application page (`WorkspaceMenu.tsx`) - Mixed packages into the fuzzy search logic with dummy package selector logic (EE will have the main logic) - Extracted common Card logic from ApplicationCard component to reuse for packages. (`Card.tsx`) - Design changes - - Search bar increased width to `500px` - Workspace heading font size decreased to 16px - Workspace heading text color - Application card name font size decreased to 16px - Gap between application cards decreased to 12px - Added a horizontal divider between each workspace [Figma Design](https://www.figma.com/file/Z0QsSdGOydURn6WIMQ3rHM/Solution-Design?type=design&node-id=1171-91563&mode=design&t=GTnV1fZa5ODy8xGD-0) Fixes #26497 #### 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 - [x] Manual - [ ] JUnit - [x] 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 - [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: Ankita Kinger <ankita@appsmith.com>
2023-08-31 08:21:04 +00:00
hasReadPermission: boolean;
showOverlay: boolean;
isContextMenuOpen: boolean;
testId: string;
}
chore: Workspace home page refactor for packages (#26654) ## Description This is a refactor PR that helps introducing the packages section in EE. Apart from refactor there are some design changes that are made (refer figma design and the `Design changes` list). Refactor list - - Applications list extracted from the index file to it's own component (`ApplicationCardList.tsx`) - Extracted `+ New` button to a new component to override in EE (`WorkspaceAction.tsx`). - Created and moved workspace context menu just de-clutter the main Application page (`WorkspaceMenu.tsx`) - Mixed packages into the fuzzy search logic with dummy package selector logic (EE will have the main logic) - Extracted common Card logic from ApplicationCard component to reuse for packages. (`Card.tsx`) - Design changes - - Search bar increased width to `500px` - Workspace heading font size decreased to 16px - Workspace heading text color - Application card name font size decreased to 16px - Gap between application cards decreased to 12px - Added a horizontal divider between each workspace [Figma Design](https://www.figma.com/file/Z0QsSdGOydURn6WIMQ3rHM/Solution-Design?type=design&node-id=1171-91563&mode=design&t=GTnV1fZa5ODy8xGD-0) Fixes #26497 #### 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 - [x] Manual - [ ] JUnit - [x] 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 - [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: Ankita Kinger <ankita@appsmith.com>
2023-08-31 08:21:04 +00:00
type ModifiedMenuItemProps = MenuItemProps & {
key?: string;
"data-testid"?: string;
};
const ApplicationImage = styled.div`
&& {
height: 100%;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
}
`;
const AppNameWrapper = styled.div<{ isFetching: boolean }>`
padding: 0;
padding-right: 12px;
${(props) =>
props.isFetching
? `
width: 119px;
height: 16px;
margin-left: 10px;
`
: null};
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3; /* number of lines to show */
-webkit-box-orient: vertical;
word-break: break-word;
color: ${(props) => props.theme.colors.text.heading};
flex: 1;
.bp3-popover-target {
display: inline;
}
`;
const Container = styled.div<{ isMobile?: boolean }>`
position: relative;
overflow: visible;
${({ isMobile }) => isMobile && `width: 100%;`}
`;
const CircleAppIcon = styled(AppIcon)`
padding: 12px;
background-color: #fff;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0px 2px 16px rgba(0, 0, 0, 0.07);
border-radius: 50%;
svg {
width: 100%;
height: 100%;
path {
fill: var(--ads-v2-color-fg);
}
}
`;
const NameWrapper = styled((props: HTMLDivProps & NameWrapperProps) => (
<div
chore: Optimizing code-split for mapStateToProps and mapDispatchToProps (#27726) ## Description Optimizing code-split for mapStateToProps and mapDispatchToProps #### PR fixes following issue(s) Fixes [#27727](https://github.com/appsmithorg/appsmith/issues/27727) #### Type of change - Chore (housekeeping or task changes that don't impact user perception) ## Testing #### How Has This Been Tested? - [x] Manual - [ ] JUnit - [ ] Jest - [x] 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
2023-09-30 06:28:05 +00:00
{...omit(props, [
"hasReadPermission",
"showOverlay",
"isContextMenuOpen",
"testId",
])}
chore: Workspace home page refactor for packages (#26654) ## Description This is a refactor PR that helps introducing the packages section in EE. Apart from refactor there are some design changes that are made (refer figma design and the `Design changes` list). Refactor list - - Applications list extracted from the index file to it's own component (`ApplicationCardList.tsx`) - Extracted `+ New` button to a new component to override in EE (`WorkspaceAction.tsx`). - Created and moved workspace context menu just de-clutter the main Application page (`WorkspaceMenu.tsx`) - Mixed packages into the fuzzy search logic with dummy package selector logic (EE will have the main logic) - Extracted common Card logic from ApplicationCard component to reuse for packages. (`Card.tsx`) - Design changes - - Search bar increased width to `500px` - Workspace heading font size decreased to 16px - Workspace heading text color - Application card name font size decreased to 16px - Gap between application cards decreased to 12px - Added a horizontal divider between each workspace [Figma Design](https://www.figma.com/file/Z0QsSdGOydURn6WIMQ3rHM/Solution-Design?type=design&node-id=1171-91563&mode=design&t=GTnV1fZa5ODy8xGD-0) Fixes #26497 #### 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 - [x] Manual - [ ] JUnit - [x] 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 - [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: Ankita Kinger <ankita@appsmith.com>
2023-08-31 08:21:04 +00:00
/>
))`
.bp3-card {
border-radius: var(--ads-v2-border-radius);
box-shadow: none;
padding: 16px;
display: flex;
align-items: center;
justify-content: center;
}
${(props) =>
props.showOverlay &&
`
{
justify-content: center;
align-items: center;
.overlay {
position: relative;
border-radius: var(--ads-v2-border-radius);
${
props.hasReadPermission &&
`text-decoration: none;
&:after {
left: 0;
top: 0;
content: "";
position: absolute;
height: 100%;
width: 100%;
}
& .control {
display: flex;
flex-direction: row;
z-index: 1;
}`
}
& div.overlay-blur {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: ${
props.hasReadPermission && !props.isContextMenuOpen
? `rgba(255, 255, 255, 0.5)`
: null
};
border-radius: var(--ads-v2-border-radius);
@supports ((-webkit-backdrop-filter: none) or (backdrop-filter: none)) {
background-color: transparent;
backdrop-filter: ${
props.hasReadPermission && !props.isContextMenuOpen
? `blur(6px)`
: null
};
}
}
}
}
`}
overflow: hidden;
border: 2px solid transparent;
padding: var(--ads-spaces-1);
border-radius: var(--ads-v2-border-radius);
&:hover {
border-color: var(--ads-v2-color-gray-100);
.t--app-multi-select-checkbox {
display: inline;
animation: multi-select-check 0.5s;
animation-fill-mode: forwards;
}
}
${(props) => `&.${props.testId}-selected {
border-color: var(--ads-v2-color-blue-300);
.t--app-multi-select-checkbox {
display: inline;
animation: multi-select-check 0.5s;
animation-fill-mode: forwards;
}
}`}
.t--app-multi-select-checkbox {
display: none;
height: 14px;
visibility: hidden;
opacity: 0;
margin-left: -24px;
&.t--app-multi-select-mode-checkbox {
display: inline;
animation: multi-select-check 0.5s;
animation-fill-mode: forwards;
}
}
@keyframes multi-select-check {
from {
margin-left: -24px;
visibility: hidden;
opacity: 0;
}
to {
visibility: visible;
opacity: 1;
margin-left: 4px;
}
}
chore: Workspace home page refactor for packages (#26654) ## Description This is a refactor PR that helps introducing the packages section in EE. Apart from refactor there are some design changes that are made (refer figma design and the `Design changes` list). Refactor list - - Applications list extracted from the index file to it's own component (`ApplicationCardList.tsx`) - Extracted `+ New` button to a new component to override in EE (`WorkspaceAction.tsx`). - Created and moved workspace context menu just de-clutter the main Application page (`WorkspaceMenu.tsx`) - Mixed packages into the fuzzy search logic with dummy package selector logic (EE will have the main logic) - Extracted common Card logic from ApplicationCard component to reuse for packages. (`Card.tsx`) - Design changes - - Search bar increased width to `500px` - Workspace heading font size decreased to 16px - Workspace heading text color - Application card name font size decreased to 16px - Gap between application cards decreased to 12px - Added a horizontal divider between each workspace [Figma Design](https://www.figma.com/file/Z0QsSdGOydURn6WIMQ3rHM/Solution-Design?type=design&node-id=1171-91563&mode=design&t=GTnV1fZa5ODy8xGD-0) Fixes #26497 #### 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 - [x] Manual - [ ] JUnit - [x] 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 - [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: Ankita Kinger <ankita@appsmith.com>
2023-08-31 08:21:04 +00:00
`;
const Wrapper = styled(
(
props: ICardProps & {
hasReadPermission?: boolean;
backgroundColor: string;
isMobile?: boolean;
},
) => (
<BlueprintCard
{...omit(props, ["hasReadPermission", "backgroundColor", "isMobile"])}
/>
),
)`
display: flex;
flex-direction: row-reverse;
justify-content: center;
width: ${(props) => props.theme.card.minWidth}px;
height: ${(props) => props.theme.card.minHeight}px;
position: relative;
background-color: ${(props) => props.backgroundColor};
border-radius: var(--ads-v2-border-radius);
.overlay {
display: block;
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 100%;
${(props) => !props.hasReadPermission && `pointer-events: none;`}
}
.bp3-card {
border-radius: var(--ads-v2-border-radius);
}
}
${({ isMobile }) =>
isMobile &&
`
width: 100% !important;
height: 126px !important;
`}
`;
const Control = styled.div<{ fixed?: boolean }>`
outline: none;
border: none;
cursor: pointer;
display: flex;
flex-direction: row;
justify-content: space-between;
gap: 8px;
align-items: center;
.${Classes.BUTTON} {
margin-top: 7px;
div {
width: auto;
height: auto;
}
}
.${Classes.BUTTON_TEXT} {
font-size: 12px;
color: white;
}
.more {
position: absolute;
right: ${(props) => props.theme.spaces[6]}px;
top: ${(props) => props.theme.spaces[4]}px;
}
`;
const CardFooter = styled.div`
display: flex;
align-items: center;
margin: 4px 0 0 0;
chore: Workspace home page refactor for packages (#26654) ## Description This is a refactor PR that helps introducing the packages section in EE. Apart from refactor there are some design changes that are made (refer figma design and the `Design changes` list). Refactor list - - Applications list extracted from the index file to it's own component (`ApplicationCardList.tsx`) - Extracted `+ New` button to a new component to override in EE (`WorkspaceAction.tsx`). - Created and moved workspace context menu just de-clutter the main Application page (`WorkspaceMenu.tsx`) - Mixed packages into the fuzzy search logic with dummy package selector logic (EE will have the main logic) - Extracted common Card logic from ApplicationCard component to reuse for packages. (`Card.tsx`) - Design changes - - Search bar increased width to `500px` - Workspace heading font size decreased to 16px - Workspace heading text color - Application card name font size decreased to 16px - Gap between application cards decreased to 12px - Added a horizontal divider between each workspace [Figma Design](https://www.figma.com/file/Z0QsSdGOydURn6WIMQ3rHM/Solution-Design?type=design&node-id=1171-91563&mode=design&t=GTnV1fZa5ODy8xGD-0) Fixes #26497 #### 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 - [x] Manual - [ ] JUnit - [x] 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 - [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: Ankita Kinger <ankita@appsmith.com>
2023-08-31 08:21:04 +00:00
width: ${(props) => props.theme.card.minWidth}px;
@media screen and (min-width: 1500px) {
width: ${(props) => props.theme.card.minWidth}px;
}
@media screen and (min-width: 1500px) and (max-width: 1512px) {
width: ${(props) => props.theme.card.minWidth - 5}px;
}
@media screen and (min-width: 1478px) and (max-width: 1500px) {
width: ${(props) => props.theme.card.minWidth - 8}px;
}
@media screen and (min-width: 1447px) and (max-width: 1477px) {
width: ${(props) => props.theme.card.minWidth - 8}px;
}
@media screen and (min-width: 1417px) and (max-width: 1446px) {
width: ${(props) => props.theme.card.minWidth - 11}px;
}
@media screen and (min-width: 1400px) and (max-width: 1417px) {
width: ${(props) => props.theme.card.minWidth - 15}px;
}
@media screen and (max-width: 1400px) {
width: ${(props) => props.theme.card.minWidth - 15}px;
}
`;
const ModifiedDataComponent = styled.div`
font-size: 13px;
color: var(--ads-v2-color-fg-muted);
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
flex-grow: 1;
chore: Workspace home page refactor for packages (#26654) ## Description This is a refactor PR that helps introducing the packages section in EE. Apart from refactor there are some design changes that are made (refer figma design and the `Design changes` list). Refactor list - - Applications list extracted from the index file to it's own component (`ApplicationCardList.tsx`) - Extracted `+ New` button to a new component to override in EE (`WorkspaceAction.tsx`). - Created and moved workspace context menu just de-clutter the main Application page (`WorkspaceMenu.tsx`) - Mixed packages into the fuzzy search logic with dummy package selector logic (EE will have the main logic) - Extracted common Card logic from ApplicationCard component to reuse for packages. (`Card.tsx`) - Design changes - - Search bar increased width to `500px` - Workspace heading font size decreased to 16px - Workspace heading text color - Application card name font size decreased to 16px - Gap between application cards decreased to 12px - Added a horizontal divider between each workspace [Figma Design](https://www.figma.com/file/Z0QsSdGOydURn6WIMQ3rHM/Solution-Design?type=design&node-id=1171-91563&mode=design&t=GTnV1fZa5ODy8xGD-0) Fixes #26497 #### 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 - [x] Manual - [ ] JUnit - [x] 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 - [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: Ankita Kinger <ankita@appsmith.com>
2023-08-31 08:21:04 +00:00
&::first-letter {
text-transform: uppercase;
}
& ~ * {
flex-shrink: 0;
}
`;
export const ContextMenuTrigger = styled(Button)<{ isHidden?: boolean }>`
${(props) => props.isHidden && "opacity: 0; visibility: hidden;"}
chore: Workspace home page refactor for packages (#26654) ## Description This is a refactor PR that helps introducing the packages section in EE. Apart from refactor there are some design changes that are made (refer figma design and the `Design changes` list). Refactor list - - Applications list extracted from the index file to it's own component (`ApplicationCardList.tsx`) - Extracted `+ New` button to a new component to override in EE (`WorkspaceAction.tsx`). - Created and moved workspace context menu just de-clutter the main Application page (`WorkspaceMenu.tsx`) - Mixed packages into the fuzzy search logic with dummy package selector logic (EE will have the main logic) - Extracted common Card logic from ApplicationCard component to reuse for packages. (`Card.tsx`) - Design changes - - Search bar increased width to `500px` - Workspace heading font size decreased to 16px - Workspace heading text color - Application card name font size decreased to 16px - Gap between application cards decreased to 12px - Added a horizontal divider between each workspace [Figma Design](https://www.figma.com/file/Z0QsSdGOydURn6WIMQ3rHM/Solution-Design?type=design&node-id=1171-91563&mode=design&t=GTnV1fZa5ODy8xGD-0) Fixes #26497 #### 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 - [x] Manual - [ ] JUnit - [x] 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 - [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: Ankita Kinger <ankita@appsmith.com>
2023-08-31 08:21:04 +00:00
`;
function Card({
backgroundColor,
children,
contextMenu,
editedByText,
handleMultipleSelection,
chore: Workspace home page refactor for packages (#26654) ## Description This is a refactor PR that helps introducing the packages section in EE. Apart from refactor there are some design changes that are made (refer figma design and the `Design changes` list). Refactor list - - Applications list extracted from the index file to it's own component (`ApplicationCardList.tsx`) - Extracted `+ New` button to a new component to override in EE (`WorkspaceAction.tsx`). - Created and moved workspace context menu just de-clutter the main Application page (`WorkspaceMenu.tsx`) - Mixed packages into the fuzzy search logic with dummy package selector logic (EE will have the main logic) - Extracted common Card logic from ApplicationCard component to reuse for packages. (`Card.tsx`) - Design changes - - Search bar increased width to `500px` - Workspace heading font size decreased to 16px - Workspace heading text color - Application card name font size decreased to 16px - Gap between application cards decreased to 12px - Added a horizontal divider between each workspace [Figma Design](https://www.figma.com/file/Z0QsSdGOydURn6WIMQ3rHM/Solution-Design?type=design&node-id=1171-91563&mode=design&t=GTnV1fZa5ODy8xGD-0) Fixes #26497 #### 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 - [x] Manual - [ ] JUnit - [x] 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 - [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: Ankita Kinger <ankita@appsmith.com>
2023-08-31 08:21:04 +00:00
hasReadPermission,
icon,
isContextMenuOpen,
isEnabledMultipleSelection,
chore: Workspace home page refactor for packages (#26654) ## Description This is a refactor PR that helps introducing the packages section in EE. Apart from refactor there are some design changes that are made (refer figma design and the `Design changes` list). Refactor list - - Applications list extracted from the index file to it's own component (`ApplicationCardList.tsx`) - Extracted `+ New` button to a new component to override in EE (`WorkspaceAction.tsx`). - Created and moved workspace context menu just de-clutter the main Application page (`WorkspaceMenu.tsx`) - Mixed packages into the fuzzy search logic with dummy package selector logic (EE will have the main logic) - Extracted common Card logic from ApplicationCard component to reuse for packages. (`Card.tsx`) - Design changes - - Search bar increased width to `500px` - Workspace heading font size decreased to 16px - Workspace heading text color - Application card name font size decreased to 16px - Gap between application cards decreased to 12px - Added a horizontal divider between each workspace [Figma Design](https://www.figma.com/file/Z0QsSdGOydURn6WIMQ3rHM/Solution-Design?type=design&node-id=1171-91563&mode=design&t=GTnV1fZa5ODy8xGD-0) Fixes #26497 #### 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 - [x] Manual - [ ] JUnit - [x] 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 - [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: Ankita Kinger <ankita@appsmith.com>
2023-08-31 08:21:04 +00:00
isFetching,
isMobile,
isSelected,
chore: Workspace home page refactor for packages (#26654) ## Description This is a refactor PR that helps introducing the packages section in EE. Apart from refactor there are some design changes that are made (refer figma design and the `Design changes` list). Refactor list - - Applications list extracted from the index file to it's own component (`ApplicationCardList.tsx`) - Extracted `+ New` button to a new component to override in EE (`WorkspaceAction.tsx`). - Created and moved workspace context menu just de-clutter the main Application page (`WorkspaceMenu.tsx`) - Mixed packages into the fuzzy search logic with dummy package selector logic (EE will have the main logic) - Extracted common Card logic from ApplicationCard component to reuse for packages. (`Card.tsx`) - Design changes - - Search bar increased width to `500px` - Workspace heading font size decreased to 16px - Workspace heading text color - Application card name font size decreased to 16px - Gap between application cards decreased to 12px - Added a horizontal divider between each workspace [Figma Design](https://www.figma.com/file/Z0QsSdGOydURn6WIMQ3rHM/Solution-Design?type=design&node-id=1171-91563&mode=design&t=GTnV1fZa5ODy8xGD-0) Fixes #26497 #### 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 - [x] Manual - [ ] JUnit - [x] 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 - [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: Ankita Kinger <ankita@appsmith.com>
2023-08-31 08:21:04 +00:00
moreActionItems,
primaryAction,
setShowOverlay,
showGitBadge,
showOverlay,
testId,
title,
titleTestId,
}: CardProps) {
return (
<Container
isMobile={isMobile}
onClick={
isEnabledMultipleSelection && handleMultipleSelection
? handleMultipleSelection
: primaryAction
}
>
chore: Workspace home page refactor for packages (#26654) ## Description This is a refactor PR that helps introducing the packages section in EE. Apart from refactor there are some design changes that are made (refer figma design and the `Design changes` list). Refactor list - - Applications list extracted from the index file to it's own component (`ApplicationCardList.tsx`) - Extracted `+ New` button to a new component to override in EE (`WorkspaceAction.tsx`). - Created and moved workspace context menu just de-clutter the main Application page (`WorkspaceMenu.tsx`) - Mixed packages into the fuzzy search logic with dummy package selector logic (EE will have the main logic) - Extracted common Card logic from ApplicationCard component to reuse for packages. (`Card.tsx`) - Design changes - - Search bar increased width to `500px` - Workspace heading font size decreased to 16px - Workspace heading text color - Application card name font size decreased to 16px - Gap between application cards decreased to 12px - Added a horizontal divider between each workspace [Figma Design](https://www.figma.com/file/Z0QsSdGOydURn6WIMQ3rHM/Solution-Design?type=design&node-id=1171-91563&mode=design&t=GTnV1fZa5ODy8xGD-0) Fixes #26497 #### 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 - [x] Manual - [ ] JUnit - [x] 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 - [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: Ankita Kinger <ankita@appsmith.com>
2023-08-31 08:21:04 +00:00
<NameWrapper
className={`${testId} ${isSelected ? `${testId}-selected` : ""}`}
chore: Workspace home page refactor for packages (#26654) ## Description This is a refactor PR that helps introducing the packages section in EE. Apart from refactor there are some design changes that are made (refer figma design and the `Design changes` list). Refactor list - - Applications list extracted from the index file to it's own component (`ApplicationCardList.tsx`) - Extracted `+ New` button to a new component to override in EE (`WorkspaceAction.tsx`). - Created and moved workspace context menu just de-clutter the main Application page (`WorkspaceMenu.tsx`) - Mixed packages into the fuzzy search logic with dummy package selector logic (EE will have the main logic) - Extracted common Card logic from ApplicationCard component to reuse for packages. (`Card.tsx`) - Design changes - - Search bar increased width to `500px` - Workspace heading font size decreased to 16px - Workspace heading text color - Application card name font size decreased to 16px - Gap between application cards decreased to 12px - Added a horizontal divider between each workspace [Figma Design](https://www.figma.com/file/Z0QsSdGOydURn6WIMQ3rHM/Solution-Design?type=design&node-id=1171-91563&mode=design&t=GTnV1fZa5ODy8xGD-0) Fixes #26497 #### 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 - [x] Manual - [ ] JUnit - [x] 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 - [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: Ankita Kinger <ankita@appsmith.com>
2023-08-31 08:21:04 +00:00
hasReadPermission={hasReadPermission}
isContextMenuOpen={isContextMenuOpen}
onMouseEnter={() => {
!isFetching && setShowOverlay(true);
}}
onMouseLeave={() => {
// If the menu is not open, then setOverlay false
// Set overlay false on outside click.
!isContextMenuOpen && setShowOverlay(false);
}}
showOverlay={showOverlay}
testId={testId}
chore: Workspace home page refactor for packages (#26654) ## Description This is a refactor PR that helps introducing the packages section in EE. Apart from refactor there are some design changes that are made (refer figma design and the `Design changes` list). Refactor list - - Applications list extracted from the index file to it's own component (`ApplicationCardList.tsx`) - Extracted `+ New` button to a new component to override in EE (`WorkspaceAction.tsx`). - Created and moved workspace context menu just de-clutter the main Application page (`WorkspaceMenu.tsx`) - Mixed packages into the fuzzy search logic with dummy package selector logic (EE will have the main logic) - Extracted common Card logic from ApplicationCard component to reuse for packages. (`Card.tsx`) - Design changes - - Search bar increased width to `500px` - Workspace heading font size decreased to 16px - Workspace heading text color - Application card name font size decreased to 16px - Gap between application cards decreased to 12px - Added a horizontal divider between each workspace [Figma Design](https://www.figma.com/file/Z0QsSdGOydURn6WIMQ3rHM/Solution-Design?type=design&node-id=1171-91563&mode=design&t=GTnV1fZa5ODy8xGD-0) Fixes #26497 #### 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 - [x] Manual - [ ] JUnit - [x] 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 - [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: Ankita Kinger <ankita@appsmith.com>
2023-08-31 08:21:04 +00:00
>
<Wrapper
backgroundColor={backgroundColor}
className={isFetching ? Classes.SKELETON : `${testId}-background`}
hasReadPermission={hasReadPermission}
isMobile={isMobile}
>
<CircleAppIcon name={icon} size={Size.large} />
<AppNameWrapper
className={isFetching ? Classes.SKELETON : ""}
isFetching={isFetching}
>
<Text data-testid={titleTestId} type={TextType.H4}>
{title}
</Text>
</AppNameWrapper>
{showOverlay && !isMobile && (
<div className="overlay">
<div className="overlay-blur" />
<ApplicationImage className="image-container">
<Control className="control">{children}</Control>
</ApplicationImage>
</div>
)}
</Wrapper>
<CardFooter>
{handleMultipleSelection && (
<div
onClick={
isEnabledMultipleSelection ? noop : handleMultipleSelection
}
>
<Checkbox
aria-label="Multiple Selection"
className={`t--app-multi-select-checkbox ${
isEnabledMultipleSelection
? "t--app-multi-select-mode-checkbox"
: ""
}`}
isSelected={isSelected}
/>
</div>
)}
<ModifiedDataComponent className="t--application-edited-text">
{editedByText}
</ModifiedDataComponent>
chore: Workspace home page refactor for packages (#26654) ## Description This is a refactor PR that helps introducing the packages section in EE. Apart from refactor there are some design changes that are made (refer figma design and the `Design changes` list). Refactor list - - Applications list extracted from the index file to it's own component (`ApplicationCardList.tsx`) - Extracted `+ New` button to a new component to override in EE (`WorkspaceAction.tsx`). - Created and moved workspace context menu just de-clutter the main Application page (`WorkspaceMenu.tsx`) - Mixed packages into the fuzzy search logic with dummy package selector logic (EE will have the main logic) - Extracted common Card logic from ApplicationCard component to reuse for packages. (`Card.tsx`) - Design changes - - Search bar increased width to `500px` - Workspace heading font size decreased to 16px - Workspace heading text color - Application card name font size decreased to 16px - Gap between application cards decreased to 12px - Added a horizontal divider between each workspace [Figma Design](https://www.figma.com/file/Z0QsSdGOydURn6WIMQ3rHM/Solution-Design?type=design&node-id=1171-91563&mode=design&t=GTnV1fZa5ODy8xGD-0) Fixes #26497 #### 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 - [x] Manual - [ ] JUnit - [x] 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 - [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: Ankita Kinger <ankita@appsmith.com>
2023-08-31 08:21:04 +00:00
{Boolean(moreActionItems.length) && !isMobile && contextMenu}
</CardFooter>
</NameWrapper>
{showGitBadge && <GitConnectedBadge />}
</Container>
);
}
export default Card;