Skip to content

Commit

Permalink
Merge branch 'refs/heads/staging' into preview/NU-1778-activities
Browse files Browse the repository at this point in the history
  • Loading branch information
Dzuming committed Oct 28, 2024
2 parents d6eb659 + d88bc8b commit a2d868a
Show file tree
Hide file tree
Showing 35 changed files with 39 additions and 855 deletions.
3 changes: 2 additions & 1 deletion designer/client/cypress/support/process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,12 +310,13 @@ function layoutScenario(waitTime = 600) {
function deployScenario(comment = "issues/123", withScreenshot?: boolean) {
cy.contains(/^deploy$/i).click();
cy.intercept("POST", "/api/processManagement/deploy/*").as("deploy");
cy.intercept("GET", "/api/processes/*/activity/activities").as("activities");
if (withScreenshot) {
cy.get("[data-testid=window]").matchImage();
}
cy.get("[data-testid=window] textarea").click().type(comment);
cy.contains(/^ok$/i).should("be.enabled").click();
cy.wait(["@deploy", "@fetch"], {
cy.wait(["@deploy", "@activities"], {
timeout: 20000,
log: true,
}).each((res) => {
Expand Down
1 change: 0 additions & 1 deletion designer/client/src/actions/actionTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export type ActionTypes =
| "UPDATE_TEST_CAPABILITIES"
| "UPDATE_TEST_FORM_PARAMETERS"
| "DISPLAY_PROCESS"
| "DISPLAY_PROCESS_ACTIVITY"
| "GET_SCENARIO_ACTIVITIES"
| "UPDATE_SCENARIO_ACTIVITIES"
| "PROCESS_FETCH"
Expand Down
20 changes: 0 additions & 20 deletions designer/client/src/actions/nk/comment.ts

This file was deleted.

21 changes: 0 additions & 21 deletions designer/client/src/actions/nk/displayProcessActivity.ts

This file was deleted.

2 changes: 0 additions & 2 deletions designer/client/src/actions/nk/fetchVisualizationData.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { ThunkAction } from "../reduxTypes";
import { displayCurrentProcessVersion } from "./process";
import { displayProcessActivity } from "./displayProcessActivity";
import { fetchProcessDefinition } from "./processDefinitionData";
import { loadProcessToolbarsConfiguration } from "./loadProcessToolbarsConfiguration";
import { ProcessName } from "../../components/Process/types";
Expand All @@ -11,7 +10,6 @@ export function fetchVisualizationData(processName: ProcessName, onSuccess: () =
const scenario = await dispatch(displayCurrentProcessVersion(processName));
const { name, isFragment, processingType } = scenario;
await dispatch(loadProcessToolbarsConfiguration(name));
dispatch(displayProcessActivity(name));
const processDefinitionData = await dispatch(fetchProcessDefinition(processingType, isFragment));
dispatch({ type: "CORRECT_INVALID_SCENARIO", processDefinitionData });
onSuccess();
Expand Down
2 changes: 0 additions & 2 deletions designer/client/src/actions/nk/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
export * from "./assignSettings";
export * from "./assignUser";
export * from "./comment";
export * from "./displayProcessActivity";
export * from "./displayProcessCounts";
export * from "./editNode";
export * from "./importExport";
Expand Down
22 changes: 0 additions & 22 deletions designer/client/src/actions/nk/loadProcessVersions.ts

This file was deleted.

6 changes: 0 additions & 6 deletions designer/client/src/actions/nk/process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { getProcessDefinitionData } from "../../reducers/selectors/settings";
import { ProcessDefinitionData, ScenarioGraph } from "../../types";
import { ThunkAction } from "../reduxTypes";
import HttpService from "./../../http/HttpService";
import { displayProcessActivity } from "./displayProcessActivity";

export type ScenarioActions =
| { type: "CORRECT_INVALID_SCENARIO"; processDefinitionData: ProcessDefinitionData }
Expand Down Expand Up @@ -80,8 +79,3 @@ export function hideRunProcessDetails() {
replaceSearchQuery(omit(["from", "to", "refresh"]));
return { type: "HIDE_RUN_PROCESS_DETAILS" };
}

export function addAttachment(processName: ProcessName, processVersionId: ProcessVersionId, file: File) {
return (dispatch) =>
HttpService.addAttachment(processName, processVersionId, file).then(() => dispatch(displayProcessActivity(processName)));
}
6 changes: 1 addition & 5 deletions designer/client/src/actions/reduxTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,19 @@ import { AnyAction, Reducer as ReduxReducer } from "redux";
import { ThunkAction as TA, ThunkDispatch as TD } from "redux-thunk";

import { ActionTypes } from "./actionTypes";
import { CountsActions, DisplayProcessActivityAction, NodeActions, ScenarioActions, SelectionActions } from "./nk";
import { CountsActions, NodeActions, ScenarioActions, SelectionActions, NodeDetailsActions } from "./nk";
import { UserSettingsActions } from "./nk/userSettings";
import { UiActions } from "./nk/ui/uiActions";
import { SettingsActions } from "./settingsActions";
import { ToolbarActions } from "./nk/toolbars";
import { RootState } from "../reducers";
import { NodeDetailsActions } from "./nk/nodeDetails";
import { NotificationActions } from "./nk/notifications";
import { DisplayTestResultsDetailsAction } from "./nk/displayTestResults";
import { LoadProcessVersionsAction } from "./nk/loadProcessVersions";
import { GetScenarioActivitiesAction, UpdateScenarioActivitiesAction } from "./nk/scenarioActivities";

type TypedAction =
| UiActions
| SettingsActions
| DisplayProcessActivityAction
| GetScenarioActivitiesAction
| UpdateScenarioActivitiesAction
| NodeActions
Expand All @@ -28,7 +25,6 @@ type TypedAction =
| NotificationActions
| DisplayTestResultsDetailsAction
| CountsActions
| LoadProcessVersionsAction
| ScenarioActions;

interface UntypedAction extends AnyAction {
Expand Down
16 changes: 0 additions & 16 deletions designer/client/src/components/button/NkButton.tsx

This file was deleted.

43 changes: 0 additions & 43 deletions designer/client/src/components/comment/CommentsList.tsx

This file was deleted.

15 changes: 0 additions & 15 deletions designer/client/src/components/comment/CommentsPanel.tsx

This file was deleted.

64 changes: 0 additions & 64 deletions designer/client/src/components/comment/ProcessComments.tsx

This file was deleted.

59 changes: 1 addition & 58 deletions designer/client/src/components/comment/StyledComment.tsx
Original file line number Diff line number Diff line change
@@ -1,61 +1,4 @@
import { lighten, styled } from "@mui/material";
import { NkButton } from "../button/NkButton";
import { StyledCloseIcon } from "../toolbarComponents/toolbarWrapper/ToolbarStyled";

export const ProcessCommentsWrapper = styled("div")`
padding: 0 13px 10px;
`;

export const ProcessCommentsList = styled("div")`
font-size: 10px;
margin: 15px 0;
padding: 0;
`;

export const RemoveButton = styled(StyledCloseIcon)`
float: right;
&:hover {
cursor: pointer;
opacity: 0.5;
}
`;

export const AddCommentPanel = styled("div")(
({ theme }) => `
font-size: 12px !important;
display: flex;
flex-direction: column !important;
textarea {
width: 100% !important;
height: ${theme.custom.spacing.controlHeight} !important;
font-size: 12px;
font-weight: 400;
border-radius: 3px;
border: none;
background-color: ${lighten(theme.palette.background.paper, 0.1)};
padding: 4px 6px;
resize: none;
}
`,
);

export const CommentButton = styled(NkButton)(
({ theme }) => `
font-size: 12px !important;
background-color: ${lighten(theme.palette.background.paper, 0.2)} !important;
border: none !important;
width: 20% !important;
height: 30px !important;
align-self: flex-end !important;
margin: 5px 0 10px !important;
padding: 3px 0 !important;
border-radius: 3px !important;
cursor: pointer;
&:hover {
background-color: ${theme.palette.action.hover} !important;
}
`,
);
import { styled } from "@mui/material";

export const PanelComment = styled("div")(({ theme }) => ({
marginTop: "1px",
Expand Down
Loading

0 comments on commit a2d868a

Please sign in to comment.