Skip to content

Commit

Permalink
chore: Move action redesign to GA (#38659)
Browse files Browse the repository at this point in the history
  • Loading branch information
hetunandu authored Jan 16, 2025
1 parent 5a98f55 commit 1963a9a
Show file tree
Hide file tree
Showing 51 changed files with 79 additions and 4,107 deletions.
1 change: 0 additions & 1 deletion app/client/cypress/support/Objects/FeatureFlags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import produce from "immer";
const defaultFlags = {
release_side_by_side_ide_enabled: true,
rollout_remove_feature_walkthrough_enabled: false, // remove this flag from here when it's removed from code
release_actions_redesign_enabled: true,
release_git_modularisation_enabled: true,
};

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,29 +1,4 @@
export const sortedDatasourcesHandler = (
// TODO: Fix this the next time the file is edited
// eslint-disable-next-line @typescript-eslint/no-explicit-any
datasources: Record<string, any>,
currentDatasourceId: string,
) => {
// this function sorts the datasources list, with the current action's datasource first, followed by others.
let sortedArr = [];

sortedArr = datasources.filter(
(d: { id: string }) => d?.id === currentDatasourceId,
);

sortedArr = [
...sortedArr,
...datasources.filter((d: { id: string }) => d?.id !== currentDatasourceId),
];

return sortedArr;
};

export interface AutoGeneratedHeader {
key: string;
value: string;
isInvalid: boolean;
}
import type { AutoGeneratedHeader } from "entities/Action";

// TODO: Fix this the next time the file is edited
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React, { useCallback, useMemo, useState } from "react";
import { isArray, isString } from "lodash";
import { isHtml } from "../utils";
import ReadOnlyEditor from "components/editorComponents/ReadOnlyEditor";
import { SegmentedControlContainer } from "pages/Editor/QueryEditor/EditorJSONtoForm";
import { Flex, SegmentedControl } from "@appsmith/ads";
import type { ActionResponse } from "api/ActionAPI";
import { setActionResponseDisplayFormat } from "actions/pluginActionActions";
Expand All @@ -12,6 +11,16 @@ import { useDispatch } from "react-redux";
import styled from "styled-components";
import { ResponseFormatTabs } from "./ResponseFormatTabs";

const SegmentedControlContainer = styled.div`
padding: 0 var(--ads-v2-spaces-7);
padding-top: var(--ads-v2-spaces-4);
display: flex;
flex-direction: column;
gap: var(--ads-v2-spaces-4);
overflow-y: clip;
overflow-x: scroll;
`;

const ResponseBodyContainer = styled.div`
overflow-y: clip;
height: 100%;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import pluralize from "pluralize";
import { Callout, Tooltip, type CalloutLinkProps } from "@appsmith/ads";

import type { ActionResponse } from "api/ActionAPI";
import ActionExecutionInProgressView from "components/editorComponents/ActionExecutionInProgressView";
import type { EditorTheme } from "components/editorComponents/CodeEditor/EditorConfig";
import { type Action } from "entities/Action";
import { PluginType } from "entities/Plugin";
Expand All @@ -16,14 +15,7 @@ import { setActionResponseDisplayFormat } from "actions/pluginActionActions";
import { actionResponseDisplayDataFormats } from "pages/Editor/utils";
import { scrollbarWidth } from "utils/helpers";

import { FEATURE_FLAG } from "ee/entities/FeatureFlag";
import {
openPluginActionSettings,
setPluginActionEditorSelectedTab,
} from "PluginActionEditor/store";
import { useFeatureFlag } from "utils/hooks/useFeatureFlag";

import { EDITOR_TABS } from "constants/QueryEditorConstants";
import { openPluginActionSettings } from "../../../../store";
import {
createMessage,
PREPARED_STATEMENT_WARNING,
Expand All @@ -39,6 +31,7 @@ import { RESPONSE_TABLE_HEIGHT_OFFSET } from "./constants";

import * as Styled from "./styles";
import { checkForPreparedStatement, parseActionResponse } from "./utils";
import ActionExecutionInProgressView from "./components/ActionExecutionInProgressView";

interface ResponseProps {
action: Action;
Expand All @@ -51,10 +44,6 @@ interface ResponseProps {
}

export function Response(props: ResponseProps) {
const isActionRedesignEnabled = useFeatureFlag(
FEATURE_FLAG.release_actions_redesign_enabled,
);

const {
action,
actionResponse,
Expand Down Expand Up @@ -148,11 +137,7 @@ export function Response(props: ResponseProps) {

const preparedStatementCalloutLinks: CalloutLinkProps[] = useMemo(() => {
const navigateToSettings = () => {
if (isActionRedesignEnabled) {
dispatch(openPluginActionSettings(true));
} else {
dispatch(setPluginActionEditorSelectedTab(EDITOR_TABS.SETTINGS));
}
dispatch(openPluginActionSettings(true));
};

return [
Expand All @@ -161,7 +146,7 @@ export function Response(props: ResponseProps) {
children: createMessage(PREPARED_STATEMENT_WARNING.LINK),
},
];
}, [dispatch, isActionRedesignEnabled]);
}, [dispatch]);

const handleContentTypeChange = useEventCallback((e?: Event) => {
if (e?.target && e.target instanceof HTMLElement) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
import ActionAPI from "api/ActionAPI";
import { Button, Spinner, Text } from "@appsmith/ads";
import styled from "styled-components";
import type { EditorTheme } from "./CodeEditor/EditorConfig";
import LoadingOverlayScreen from "./LoadingOverlayScreen";
import type { EditorTheme } from "components/editorComponents/CodeEditor/EditorConfig";
import LoadingOverlayScreen from "components/editorComponents/LoadingOverlayScreen";

const Wrapper = styled.div`
position: relative;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useCallback, useEffect, useState } from "react";
import { Link } from "@appsmith/ads";
import ActionSettings from "pages/Editor/ActionSettings";
import ActionSettings from "../PluginActionToolbar/components/ActionSettings";
import { usePluginActionContext } from "../../PluginActionContext";
import styled from "styled-components";
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from "react";
import type { ControlProps } from "components/formControls/BaseControl";
import FormControl from "./FormControl";
import FormControl from "pages/Editor/FormControl";
import log from "loglevel";
import type { EditorTheme } from "components/editorComponents/CodeEditor/EditorConfig";
import styled from "styled-components";
import { Text } from "@appsmith/ads";
import CenteredWrapper from "../../components/designSystems/appsmith/CenteredWrapper";
import CenteredWrapper from "components/designSystems/appsmith/CenteredWrapper";

interface ActionSettingsProps {
// TODO: Fix this the next time the file is edited
Expand Down
2 changes: 0 additions & 2 deletions app/client/src/ce/entities/FeatureFlag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export const FEATURE_FLAG = {
"ab_one_click_learning_popover_enabled",
release_side_by_side_ide_enabled: "release_side_by_side_ide_enabled",
ab_appsmith_ai_query: "ab_appsmith_ai_query",
release_actions_redesign_enabled: "release_actions_redesign_enabled",
rollout_remove_feature_walkthrough_enabled:
"rollout_remove_feature_walkthrough_enabled",
rollout_eslint_enabled: "rollout_eslint_enabled",
Expand Down Expand Up @@ -82,7 +81,6 @@ export const DEFAULT_FEATURE_FLAG_VALUE: FeatureFlags = {
ab_one_click_learning_popover_enabled: false,
release_side_by_side_ide_enabled: false,
ab_appsmith_ai_query: false,
release_actions_redesign_enabled: false,
rollout_remove_feature_walkthrough_enabled: true,
rollout_eslint_enabled: false,
rollout_side_by_side_enabled: false,
Expand Down
Loading

0 comments on commit 1963a9a

Please sign in to comment.