Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove custom actions #7379

Merged
merged 2 commits into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
157 changes: 0 additions & 157 deletions designer/client/src/components/modals/CustomActionDialog.tsx

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export enum CustomButtonTypes {
customLink = "custom-link",
customAction = "custom-action",
adhocTesting = "adhoc-testing",
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import PDFButton from "../../toolbars/process/buttons/PDFButton";
import SaveButton from "../../toolbars/process/buttons/SaveButton";
import UnArchiveButton from "../../toolbars/process/buttons/UnArchiveButton";
import { LinkButton } from "./LinkButton";
import { ActionButton } from "./ActionButton";
import CancelDeployButton from "../../toolbars/scenarioActions/buttons/CancelDeployButton";
import DeployButton from "../../toolbars/scenarioActions/buttons/DeployButton";
import PropertiesButton from "../../toolbars/scenarioActions/buttons/PropertiesButton";
Expand Down Expand Up @@ -68,7 +67,6 @@ export const TOOLBAR_BUTTONS_MAP: ToolbarButtonsMap = {
[BuiltinButtonTypes.testGenerate]: GenerateButton,
[BuiltinButtonTypes.testCounts]: CountsButton,
[BuiltinButtonTypes.testHide]: HideButton,
[CustomButtonTypes.customAction]: ActionButton,
[CustomButtonTypes.customLink]: LinkButton,
[CustomButtonTypes.adhocTesting]: AdhocTestingButton,
[BuiltinButtonTypes.generateAndTest]: GenerateAndTestButton,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ export * from "./BuiltinButtonTypes";
export * from "./CustomButtonTypes";
export * from "./types";
export * from "./TOOLBAR_BUTTONS_MAP";
export * from "./ActionButton";
export * from "./LinkButton";
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { ActionButtonProps } from "./ActionButton";
import { BuiltinButtonTypes } from "./BuiltinButtonTypes";
import { CustomButtonTypes } from "./CustomButtonTypes";
import { LinkButtonProps } from "./LinkButton";
Expand All @@ -11,7 +10,6 @@ type GenericButton<T, P = unknown> = {

type Button =
| GenericButton<BuiltinButtonTypes>
| GenericButton<CustomButtonTypes.customAction, ActionButtonProps>
| GenericButton<CustomButtonTypes.customLink, LinkButtonProps>
| GenericButton<CustomButtonTypes.adhocTesting, AdhocTestingButtonProps>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,16 @@ import i18next from "i18next";
import React, { memo } from "react";
import { useSelector } from "react-redux";
import { RootState } from "../../../reducers";
import { getCustomActions } from "../../../reducers/selectors/settings";
import { ToolbarPanelProps } from "../../toolbarComponents/DefaultToolbarPanel";
import { ToolbarButtons } from "../../toolbarComponents/toolbarButtons";
import { ToolbarWrapper } from "../../toolbarComponents/toolbarWrapper/ToolbarWrapper";
import { ActionButton } from "../../toolbarSettings/buttons";
import ProcessStateIcon from "../../Process/ProcessStateIcon";
import { Box, Typography } from "@mui/material";
import ProcessStateUtils from "../../Process/ProcessStateUtils";
import { getScenario } from "../../../reducers/selectors/graph";
import { getProcessState } from "../../../reducers/selectors/scenarioState";

const ProcessActions = memo(({ buttonsVariant, children, ...props }: ToolbarPanelProps) => {
const customActions = useSelector((state: RootState) => getCustomActions(state));
const scenario = useSelector((state: RootState) => getScenario(state));
const processState = useSelector((state: RootState) => getProcessState(state));

Expand All @@ -30,13 +27,7 @@ const ProcessActions = memo(({ buttonsVariant, children, ...props }: ToolbarPane
{description}
</Typography>
</Box>
<ToolbarButtons variant={buttonsVariant}>
{children}
{customActions.map((action) => (
//TODO: to be replaced by toolbar config
<ActionButton name={action.name} key={action.name} />
))}
</ToolbarButtons>
<ToolbarButtons variant={buttonsVariant}>{children}</ToolbarButtons>
</ToolbarWrapper>
);
});
Expand Down

This file was deleted.

3 changes: 0 additions & 3 deletions designer/client/src/containers/event-tracking/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,6 @@ export const mapToolbarButtonToStatisticsEvent = (
case BuiltinButtonTypes.processUnarchive: {
return EventTrackingSelector.ScenarioUnarchive;
}
case CustomButtonTypes.customAction: {
return EventTrackingSelector.ScenarioCustomAction;
}
case CustomButtonTypes.customLink: {
return EventTrackingSelector.ScenarioCustomLink;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ enum ClickEventsSelector {
ScenarioRunOffSchedule = "SCENARIO_RUN_OFF_SCHEDULE",
ScenarioArchiveToggle = "SCENARIO_ARCHIVE_TOGGLE",
ScenarioUnarchive = "SCENARIO_UNARCHIVE",
ScenarioCustomAction = "SCENARIO_CUSTOM_ACTION",
ScenarioCustomLink = "SCENARIO_CUSTOM_LINK",
ScenarioActivitiesAddAttachment = "SCENARIO_ACTIVITIES_ADD_ATTACHMENT",
ScenarioActivitiesAddComment = "SCENARIO_ACTIVITIES_ADD_COMMENT",
Expand Down
4 changes: 0 additions & 4 deletions designer/client/src/containers/theme/darkModePalette.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,6 @@ export const darkModePalette: PaletteOptions = {
backgroundColor: "#1ba1af",
color: "white",
},
customAction: {
backgroundColor: "white",
color: "black",
},
editProperties: {
backgroundColor: "#46ca94",
color: "white",
Expand Down
1 change: 0 additions & 1 deletion designer/client/src/containers/theme/lightModePalette.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ export const lightModePalette: PaletteOptions = {
},
windows: {
compareVersions: { backgroundColor: "#1ba1af", color: "white" },
customAction: { backgroundColor: "white", color: "black" },
editProperties: {
backgroundColor: "#46ca94",
color: "white",
Expand Down
2 changes: 0 additions & 2 deletions designer/client/src/containers/theme/nuTheme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ const extendWithHelpers = (custom: CustomPalette) => ({
return this.windows.compareVersions;
case WindowKind.editProperties:
return this.windows.editProperties;
case WindowKind.customAction:
return this.windows.customAction;
default:
return this.windows.default;
}
Expand Down
Loading
Loading