Skip to content

Commit

Permalink
chore: removed occurrences of old flags
Browse files Browse the repository at this point in the history
  • Loading branch information
AmanAgarwal041 committed Sep 11, 2024
1 parent b5f4c65 commit 9c009d8
Show file tree
Hide file tree
Showing 13 changed files with 12 additions and 89 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import { featureFlagIntercept } from "../../../../support/Objects/FeatureFlags";
import {
agHelper,
locators,
entityExplorer,
propPane,
draggableWidgets,
apiPage,
entityItems,
homePage,
assertHelper,
} from "../../../../support/Objects/ObjectsCore";
Expand All @@ -15,12 +10,6 @@ import EditorNavigation, {
} from "../../../../support/Pages/EditorNavigation";

describe("Property Pane Suggestions", { tags: ["@tag.JS"] }, () => {
before(() => {
featureFlagIntercept({
ab_learnability_ease_of_initial_use_enabled: true,
});
});

before(function () {
agHelper.ClearLocalStorageCache();
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import OneClickBindingLocator from "../../../../locators/OneClickBindingLocator";
import { featureFlagIntercept } from "../../../../support/Objects/FeatureFlags";
import {
agHelper,
apiPage,
Expand All @@ -23,10 +22,6 @@ describe(
() => {
let datasourceName: string;
before(() => {
featureFlagIntercept({
rollout_js_enabled_one_click_binding_enabled: true,
});

dataSources.CreateDataSource("Postgres");

cy.get("@dsName").then((dsName) => {
Expand Down
2 changes: 0 additions & 2 deletions app/client/cypress/support/e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,6 @@ before(function () {
if (!Cypress.currentTest.titlePath[0].includes(WALKTHROUGH_TEST_PAGE)) {
// Adding key FEATURE_WALKTHROUGH (which is used to check if the walkthrough is already shown to the user or not) for non walkthrough cypress tests (to not show walkthrough)
addIndexedDBKey(FEATURE_WALKTHROUGH_INDEX_KEY, {
ab_ds_binding_enabled: true,
ab_ds_schema_enabled: true,
binding_widget: true,
});
}
Expand Down
6 changes: 0 additions & 6 deletions app/client/src/ce/entities/FeatureFlag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,7 @@ export const FEATURE_FLAG = {
"release_drag_drop_building_blocks_enabled",
release_table_cell_label_value_enabled:
"release_table_cell_label_value_enabled",
rollout_js_enabled_one_click_binding_enabled:
"rollout_js_enabled_one_click_binding_enabled",
rollout_side_by_side_enabled: "rollout_side_by_side_enabled",
ab_learnability_ease_of_initial_use_enabled:
"ab_learnability_ease_of_initial_use_enabled",
ab_learnability_discoverability_collapse_all_except_data_enabled:
"ab_learnability_discoverability_collapse_all_except_data_enabled",
release_layout_conversion_enabled: "release_layout_conversion_enabled",
Expand Down Expand Up @@ -77,9 +73,7 @@ export const DEFAULT_FEATURE_FLAG_VALUE: FeatureFlags = {
ab_appsmith_ai_query: false,
release_actions_redesign_enabled: false,
rollout_remove_feature_walkthrough_enabled: true,
rollout_js_enabled_one_click_binding_enabled: true,
rollout_side_by_side_enabled: false,
ab_learnability_ease_of_initial_use_enabled: true,
ab_learnability_discoverability_collapse_all_except_data_enabled: true,
release_layout_conversion_enabled: false,
release_anvil_toggle_enabled: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ import type { WidgetEntity, ActionEntity } from "ee/entities/DataTree/types";
import { trim } from "lodash";
import { getDynamicStringSegments } from "utils/DynamicBindingUtils";
import { EditorSize } from "./EditorConfig";
import { selectFeatureFlagCheck } from "ee/selectors/featureFlagsSelectors";
import store from "store";
import { FEATURE_FLAG } from "ee/entities/FeatureFlag";
import { SlashCommandMenuOnFocusWidgetProps } from "./constants";

// TODO: Fix this the next time the file is edited
Expand Down Expand Up @@ -157,12 +154,7 @@ export function shouldShowSlashCommandMenu(
widgetType: string = "",
propertyPath: string = "",
) {
const isEaseOfUseFlagEnabled = selectFeatureFlagCheck(
store.getState(),
FEATURE_FLAG.ab_learnability_ease_of_initial_use_enabled,
);
return (
!!isEaseOfUseFlagEnabled &&
!!SlashCommandMenuOnFocusWidgetProps[widgetType] &&
SlashCommandMenuOnFocusWidgetProps[widgetType].includes(propertyPath)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12757,12 +12757,10 @@ export const defaultAppState = {
release_datasource_environments_enabled: false,
release_appnavigationlogoupload_enabled: false,
release_embed_hide_share_settings_enabled: false,
ab_gsheet_schema_enabled: true,
release_table_serverside_filtering_enabled: false,
license_branding_enabled: false,
license_sso_saml_enabled: false,
license_sso_oidc_enabled: false,
ab_mock_mongo_schema_enabled: true,
license_private_embeds_enabled: false,
release_show_publish_app_to_community_enabled: false,
license_gac_enabled: false,
Expand All @@ -12777,7 +12775,6 @@ export const defaultAppState = {
release_side_by_side_ide_enabled: false,
release_global_add_pane_enabled: false,
license_git_unlimited_repo_enabled: false,
ab_ds_binding_enabled: true,
ask_ai_js: false,
license_connection_pool_size_enabled: false,
release_widgetdiscovery_enabled: false,
Expand All @@ -12788,7 +12785,6 @@ export const defaultAppState = {
license_audit_logs_enabled: false,
ask_ai_sql: false,
release_query_module_enabled: false,
ab_ds_schema_enabled: true,
ab_onboarding_flow_start_with_data_dev_only_enabled: false,
license_session_limit_enabled: false,
rollout_datasource_test_rate_limit_enabled: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ import type {
ModuleInstanceData,
ModuleInstanceDataState,
} from "ee/constants/ModuleInstanceConstants";
import { selectFeatureFlagCheck } from "ee/selectors/featureFlagsSelectors";
import { FEATURE_FLAG } from "ee/entities/FeatureFlag";
import type { AppState } from "ee/reducers";
import type { Module } from "ee/constants/ModuleConstants";
import { getAllModules } from "ee/selectors/modulesSelector";
import { getModuleIcon } from "pages/Editor/utils";
Expand Down Expand Up @@ -162,13 +159,6 @@ function useConnectToOptions(props: ConnectToOptionsProps) {

const queries = useSelector(getCurrentActions);
const pluginsPackageNamesMap = useSelector(getPluginIdPackageNamesMap);
const isJSEnabledByDefaultOnForOneClickBinding = useSelector(
(state: AppState) =>
selectFeatureFlagCheck(
state,
FEATURE_FLAG.rollout_js_enabled_one_click_binding_enabled,
),
);

const { pluginImages, widget } = props;

Expand Down Expand Up @@ -197,10 +187,7 @@ function useConnectToOptions(props: ConnectToOptionsProps) {
value: getBindingValue(widget, query),
icon: getQueryIcon(query, pluginImages, modules),
onSelect: function (value?: string, valueOption?: DropdownOptionType) {
addBinding(
valueOption?.value,
!!isJSEnabledByDefaultOnForOneClickBinding,
);
addBinding(valueOption?.value, true);

updateConfig({
datasource: "",
Expand Down
2 changes: 0 additions & 2 deletions app/client/src/constants/WalkthroughConstants.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
export const FEATURE_WALKTHROUGH_KEYS = {
ds_binding: "ab_ds_binding_enabled",
ds_schema: "ab_ds_schema_enabled",
binding_widget: "binding_widget",
env_walkthrough: "ab_env_walkthrough_enabled",
// Signposting keys
Expand Down
18 changes: 1 addition & 17 deletions app/client/src/pages/Editor/DatasourceInfo/QueryTemplates.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useCallback, useContext } from "react";
import React, { useCallback } from "react";
import { useDispatch, useSelector } from "react-redux";
import { createActionRequest } from "actions/pluginActionActions";
import type { AppState } from "ee/reducers";
Expand All @@ -21,15 +21,12 @@ import { integrationEditorURL } from "ee/RouteBuilder";
import { MenuItem, Tag } from "@appsmith/ads";
import type { Plugin } from "api/PluginApi";

import WalkthroughContext from "components/featureWalkthrough/walkthroughContext";
import { setFeatureWalkthroughShown } from "utils/storage";
import styled from "styled-components";
import { change, getFormValues } from "redux-form";
import { QUERY_EDITOR_FORM_NAME } from "ee/constants/forms";
import { diff } from "deep-diff";
import { UndoRedoToastContext, showUndoRedoToast } from "utils/replayHelpers";
import AnalyticsUtil from "ee/utils/AnalyticsUtil";
import { FEATURE_WALKTHROUGH_KEYS } from "constants/WalkthroughConstants";
import { SUGGESTED_TAG, createMessage } from "ee/constants/messages";
import { transformTextToSentenceCase } from "pages/Editor/utils";

Expand Down Expand Up @@ -59,8 +56,6 @@ const TemplateMenuItem = styled(MenuItem)`

export function QueryTemplates(props: QueryTemplatesProps) {
const dispatch = useDispatch();
const { isOpened: isWalkthroughOpened, popFeature } =
useContext(WalkthroughContext) || {};
const applicationId = useSelector(getCurrentApplicationId);
const actions = useSelector((state: AppState) => state.entities.actions);
const basePageId = useSelector(getCurrentBasePageId);
Expand Down Expand Up @@ -109,11 +104,6 @@ export function QueryTemplates(props: QueryTemplatesProps) {
}),
);

if (isWalkthroughOpened) {
popFeature && popFeature("SCHEMA_QUERY_CREATE");
setFeatureWalkthroughShown(FEATURE_WALKTHROUGH_KEYS.ds_schema, true);
}

history.push(
integrationEditorURL({
basePageId,
Expand Down Expand Up @@ -166,14 +156,8 @@ export function QueryTemplates(props: QueryTemplatesProps) {
datasourceId: props.datasourceId,
pluginName: plugin?.name || "",
templateCommand: template?.title,
isWalkthroughOpened,
});

if (isWalkthroughOpened) {
popFeature && popFeature("SCHEMA_QUERY_UPDATE");
setFeatureWalkthroughShown(FEATURE_WALKTHROUGH_KEYS.ds_schema, true);
}

showUndoRedoToast(
currentAction.name,
false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { getWidgetEnhancementSelector } from "selectors/widgetEnhancementSelecto
import equal from "fast-deep-equal/es6";
import { FEATURE_FLAG } from "ee/entities/FeatureFlag";
import { useFeatureFlag } from "utils/hooks/useFeatureFlag";
import { isAirgapped } from "ee/utils/airgapHelpers";

export interface PropertyControlsGeneratorProps {
id: string;
Expand Down Expand Up @@ -103,10 +104,14 @@ function PropertyControlsGenerator(props: PropertyControlsGeneratorProps) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const widgetProps: any = useSelector(getWidgetPropsForPropertyPane);

const isCollapseAllExceptDataEnabled: boolean = useFeatureFlag(
const isCollapseAllExceptDataEnabledFlag: boolean = useFeatureFlag(
FEATURE_FLAG.ab_learnability_discoverability_collapse_all_except_data_enabled,
);

const isCollapseAllExceptDataEnabled = isAirgapped()
? true
: isCollapseAllExceptDataEnabledFlag;

const enhancementSelector = getWidgetEnhancementSelector(
widgetProps?.widgetId,
);
Expand Down
7 changes: 1 addition & 6 deletions app/client/src/widgets/MultiSelectWidgetV2/widget/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,7 @@ class MultiSelectWidget extends BaseWidget<
onFilterUpdate: queryConfig.select.run,
};

if (
!!MultiSelectWidget.getFeatureFlag(
FEATURE_FLAG.rollout_js_enabled_one_click_binding_enabled,
)
)
dynamicPropertyPathList.push({ key: "sourceData" });
dynamicPropertyPathList.push({ key: "sourceData" });
}

return {
Expand Down
8 changes: 2 additions & 6 deletions app/client/src/widgets/SelectWidget/widget/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,8 @@ class SelectWidget extends BaseWidget<SelectWidgetProps, WidgetState> {
serverSideFiltering: true,
onFilterUpdate: queryConfig.select.run,
};
if (
!!SelectWidget.getFeatureFlag(
FEATURE_FLAG.rollout_js_enabled_one_click_binding_enabled,
)
)
dynamicPropertyPathList.push({ key: "sourceData" });

dynamicPropertyPathList.push({ key: "sourceData" });
}

return {
Expand Down
8 changes: 1 addition & 7 deletions app/client/src/widgets/TableWidgetV2/widget/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ import {
} from "layoutSystems/common/utils/constants";
import IconSVG from "../icon.svg";
import ThumbnailSVG from "../thumbnail.svg";
import { FEATURE_FLAG } from "ee/entities/FeatureFlag";
import { klonaRegularWithTelemetry } from "utils/helpers";

const ReactTableComponent = lazy(async () =>
Expand Down Expand Up @@ -274,12 +273,7 @@ class TableWidgetV2 extends BaseWidget<TableWidgetProps, WidgetState> {
isVisibleDownload: false,
});

if (
!!TableWidgetV2.getFeatureFlag(
FEATURE_FLAG.rollout_js_enabled_one_click_binding_enabled,
)
)
dynamicPropertyPathList.push({ key: "tableData" });
dynamicPropertyPathList.push({ key: "tableData" });
}

if (queryConfig.create) {
Expand Down

0 comments on commit 9c009d8

Please sign in to comment.