From 41a5110c85f2340e0df168f1c1b7a9b321426f63 Mon Sep 17 00:00:00 2001 From: Valera Melnikov Date: Fri, 17 Jan 2025 12:35:34 +0300 Subject: [PATCH 1/9] chore: disable sourcemaps for non-prod builds and cleanup craco configs (#38706) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description - reduce --max-old-space-size to 7168 for build. [Test for EE here](https://github.com/appsmithorg/appsmith-ee/pull/5932). - disable sourcemaps for non-prod build - cleanup craco configs ## Automation /ok-to-test tags="@tag.All" ### :mag: Cypress test results > [!CAUTION] > 🔴 🔴 🔴 Some tests have failed. > Workflow run: > Commit: 80b63a627b312f486f0d0baccf8a7d98b810471d > Cypress dashboard. > Tags: @tag.All > Spec: > The following are new failures, please fix them before merging the PR:
    >
  1. cypress/e2e/Regression/ClientSide/Binding/Api_withPageload_Input_spec.js
> List of identified flaky tests. >
Fri, 17 Jan 2025 09:34:32 UTC ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No ## Summary by CodeRabbit - **Configuration Updates** - Reduced memory allocation for the build process. - Updated Webpack configuration with Brotli compression. - Modified WebSocket settings for the development server. - Streamlined build configuration by removing unnecessary sections. - **Performance Optimization** - Adjusted build memory limits. - Improved compression algorithm for build artifacts. --- app/client/build.sh | 2 +- app/client/craco.build.config.js | 19 ++++++++----------- app/client/craco.common.config.js | 13 ------------- app/client/craco.dev.config.js | 28 ++++++++++++++++++---------- 4 files changed, 27 insertions(+), 35 deletions(-) diff --git a/app/client/build.sh b/app/client/build.sh index c42a32a0c366..146c6d355f0c 100755 --- a/app/client/build.sh +++ b/app/client/build.sh @@ -18,6 +18,6 @@ export REACT_APP_SENTRY_RELEASE=$GIT_SHA export REACT_APP_CLIENT_LOG_LEVEL=ERROR # Disable CRA built-in ESLint checks since we have our own config and a separate step for this export DISABLE_ESLINT_PLUGIN=true -craco --max-old-space-size=10240 build --config craco.build.config.js +craco --max-old-space-size=7168 build --config craco.build.config.js echo "build finished" diff --git a/app/client/craco.build.config.js b/app/client/craco.build.config.js index 540c3ea3e438..574a6a5788ad 100644 --- a/app/client/craco.build.config.js +++ b/app/client/craco.build.config.js @@ -38,7 +38,7 @@ plugins.push( }), ); -if (env === "PRODUCTION" || env === "STAGING") { +if (env === "PRODUCTION") { plugins.push( new FaroSourceMapUploaderPlugin({ appId: process.env.REACT_APP_FARO_APP_ID, @@ -53,8 +53,6 @@ if (env === "PRODUCTION" || env === "STAGING") { ); } -plugins.push(new CompressionPlugin()); - plugins.push( new CompressionPlugin({ algorithm: "brotliCompress", @@ -78,17 +76,16 @@ plugins.push( ); module.exports = merge(common, { - webpack: { - configure: { - plugins, + babel: { + plugins: ["babel-plugin-lodash"], + loaderOptions: { + cacheDirectory: false, }, }, - jest: { + webpack: { configure: { - moduleNameMapper: { - // Jest module mapper which will detect our absolute imports. - "^@test(.*)$": "/test$1", - }, + devtool: env === "PRODUCTION" ? "source-map" : false, + plugins, }, }, plugins: [ diff --git a/app/client/craco.common.config.js b/app/client/craco.common.config.js index e1c4c6cf99b0..7840177ca5f8 100644 --- a/app/client/craco.common.config.js +++ b/app/client/craco.common.config.js @@ -4,19 +4,6 @@ const path = require("path"); const webpack = require("webpack"); module.exports = { - devServer: { - client: { - webSocketURL: { - hostname: "127.0.0.1", - pathname: "/ws", - port: 3000, - protocol: "ws", - }, - }, - }, - babel: { - plugins: ["babel-plugin-lodash"], - }, eslint: { enable: false, }, diff --git a/app/client/craco.dev.config.js b/app/client/craco.dev.config.js index 9834c2b38a36..8bf01639ff77 100644 --- a/app/client/craco.dev.config.js +++ b/app/client/craco.dev.config.js @@ -5,23 +5,31 @@ const common = require("./craco.common.config.js"); module.exports = merge(common, { devServer: { client: { + webSocketURL: { + hostname: "127.0.0.1", + pathname: "/ws", + port: 3000, + protocol: "ws", + }, overlay: { warnings: false, errors: false, }, }, }, - optimization: { - minimize: false, - }, - cache: { - type: "filesystem", - memoryCacheUnaffected: true, - }, - experiments: { - cacheUnaffected: true, - }, webpack: { + configure: { + optimization: { + minimize: false, + }, + cache: { + type: "filesystem", + memoryCacheUnaffected: true, + }, + experiments: { + cacheUnaffected: true, + }, + }, plugins: [ new WorkboxPlugin.InjectManifest({ swSrc: "./src/serviceWorker.ts", From 24a7fa59263d5a82b34dacbf05ac53ee810bc3fe Mon Sep 17 00:00:00 2001 From: "devin-ai-integration[bot]" <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 17 Jan 2025 16:30:52 +0530 Subject: [PATCH 2/9] feat: update autocomplete sorting (#38690) Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: rahul.kochar@appsmith.com Co-authored-by: Hetu Nandu Co-authored-by: Hetu Nandu --- .../Autocomplete/Autocomplete_setters_spec.ts | 3 -- .../ClientSide/Autocomplete/JS_AC1_spec.ts | 4 +- .../PropertyPaneSuggestion_spec.ts | 15 ++++---- .../autocomplete/entityDefGeneratorMap.ts | 1 + .../autocomplete/AutocompleteSortRules.ts | 37 +++++++++++++++++-- .../__tests__/AutocompleteSortRules.test.ts | 20 +++++++++- .../autocomplete/__tests__/TernServer.test.ts | 20 +--------- .../utils/autocomplete/dataTypeSortRules.ts | 21 ++++++++--- 8 files changed, 79 insertions(+), 42 deletions(-) diff --git a/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/Autocomplete_setters_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/Autocomplete_setters_spec.ts index 9685a068612b..290ecb7ee96b 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/Autocomplete_setters_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/Autocomplete_setters_spec.ts @@ -92,9 +92,6 @@ describe( it("3. function arguments hint shows up", () => { EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - propPane.EnterJSContext("onClick", "{{", true, false); - agHelper.GetNClickByContains(locators._hints, "appsmith", 0, false); - agHelper.AssertElementVisibility(locators._evalValuePopover); propPane.EnterJSContext("onClick", "{{showAlert", true, false); agHelper.GetElementsNAssertTextPresence(locators._hints, "showAlert"); agHelper.AssertElementAbsence(locators._evalValuePopover); diff --git a/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/JS_AC1_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/JS_AC1_spec.ts index d37b4389a20d..3d445375436f 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/JS_AC1_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/JS_AC1_spec.ts @@ -240,8 +240,8 @@ describe("Autocomplete tests", { tags: ["@tag.JS", "@tag.Binding"] }, () => { agHelper.TypeText(locators._codeMirrorTextArea, "userCollection[0]."); agHelper.GetNAssertElementText(locators._hints, "users"); agHelper.TypeText(locators._codeMirrorTextArea, "users[0]."); - agHelper.GetNAssertElementText(locators._hints, "label"); - agHelper.GetNAssertElementText(locators._hints, "value", "have.text", 1); + agHelper.GetNAssertElementText(locators._hints, "value"); + agHelper.GetNAssertElementText(locators._hints, "label", "have.text", 1); cy.get("@jsObjName").then((jsObjName) => { jsName = jsObjName; diff --git a/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/PropertyPaneSuggestion_spec.ts b/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/PropertyPaneSuggestion_spec.ts index 60407e48079e..aaba9fae2b88 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/PropertyPaneSuggestion_spec.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/Autocomplete/PropertyPaneSuggestion_spec.ts @@ -28,9 +28,12 @@ describe( //typing {{}} EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); propPane.TypeTextIntoField("Label", "{{"); - agHelper.GetElementsNAssertTextPresence(locators._hints, "appsmith"); - agHelper.GetNClickByContains(locators._hints, "appsmith"); - propPane.ValidatePropertyFieldValue("Label", "{{appsmith}}"); + agHelper.GetElementsNAssertTextPresence( + locators._hints, + "Button1.isVisible", + ); + agHelper.GetNClickByContains(locators._hints, "Button1.isVisible"); + propPane.ValidatePropertyFieldValue("Label", "{{Button1.isVisible}}"); }); it("2. [Bug]-[2040]: undefined binding on / command dropdown", () => { @@ -46,10 +49,8 @@ describe( it("3. Should add Autocomplete Suggestions on Tab press", () => { EditorNavigation.SelectEntityByName("Button1", EntityType.Widget); - propPane.TypeTextIntoField("Label", "{{"); - agHelper.GetElementsNAssertTextPresence(locators._hints, "appsmith"); - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore + propPane.TypeTextIntoField("Label", "{{J"); + agHelper.GetElementsNAssertTextPresence(locators._hints, "JSObject1"); cy.get("body").tab(); propPane.ValidatePropertyFieldValue("Label", "{{JSObject1}}"); }); diff --git a/app/client/src/ce/utils/autocomplete/entityDefGeneratorMap.ts b/app/client/src/ce/utils/autocomplete/entityDefGeneratorMap.ts index 0165c7e9eb95..dd9b9bb7976c 100644 --- a/app/client/src/ce/utils/autocomplete/entityDefGeneratorMap.ts +++ b/app/client/src/ce/utils/autocomplete/entityDefGeneratorMap.ts @@ -61,6 +61,7 @@ export const entityDefGeneratorMap: EntityDefGeneratorMap = { entity as AppsmithEntity, extraDefsToDefine, ); + flattenDef(def, "appsmith"); entityMap.set("appsmith", { type: ENTITY_TYPE.APPSMITH, subType: ENTITY_TYPE.APPSMITH, diff --git a/app/client/src/utils/autocomplete/AutocompleteSortRules.ts b/app/client/src/utils/autocomplete/AutocompleteSortRules.ts index a1893e46e7f4..cf32316fb6c3 100644 --- a/app/client/src/utils/autocomplete/AutocompleteSortRules.ts +++ b/app/client/src/utils/autocomplete/AutocompleteSortRules.ts @@ -28,9 +28,9 @@ enum RuleWeight { JSLibrary, DataTreeFunction, DataTreeMatch, + DataTreeEntityNameMatch, RecentEntityMatch, TypeMatch, - DataTreeEntityNameMatch, PriorityMatch, ScopeMatch, } @@ -59,9 +59,11 @@ export class NestedPropertyInsideLiteralRule implements AutocompleteRule { export class AndRule implements AutocompleteRule { rules: AutocompleteRule[]; + constructor(rules: AutocompleteRule[]) { this.rules = rules; } + computeScore(completion: Completion): number { let score = 0; @@ -140,6 +142,7 @@ class RemoveBlackListedCompletionRule implements AutocompleteRule { */ class NoDeepNestedSuggestionsRule implements AutocompleteRule { static threshold = -Infinity; + computeScore(completion: Completion): number { let score = 0; const text = completion.displayText || ""; @@ -158,6 +161,7 @@ class NoDeepNestedSuggestionsRule implements AutocompleteRule { */ class NoSelfReferenceRule implements AutocompleteRule { static threshold = -Infinity; + computeScore(completion: Completion): number { let score = 0; const { entityName, propertyPath } = AutocompleteSorter.currentFieldInfo; @@ -181,6 +185,7 @@ class NoSelfReferenceRule implements AutocompleteRule { */ class GlobalJSRule implements AutocompleteRule { static threshold = 1 << RuleWeight.GlobalJS; + computeScore(completion: Completion): number { let score = 0; @@ -198,6 +203,7 @@ class GlobalJSRule implements AutocompleteRule { */ class JSLibraryRule implements AutocompleteRule { static threshold = 1 << RuleWeight.JSLibrary; + computeScore(completion: Completion): number { const score = 0; @@ -216,6 +222,7 @@ class JSLibraryRule implements AutocompleteRule { */ class DataTreeFunctionRule implements AutocompleteRule { static threshold = 1 << RuleWeight.DataTreeFunction; + computeScore(completion: Completion): number { let score = 0; @@ -232,6 +239,7 @@ class DataTreeFunctionRule implements AutocompleteRule { return score; } } + /** * Sets threshold value for completions that are recent entities * Max score - 10000 + number @@ -239,9 +247,20 @@ class DataTreeFunctionRule implements AutocompleteRule { */ class RecentEntityRule implements AutocompleteRule { static threshold = 1 << RuleWeight.RecentEntityMatch; + computeScore(completion: Completion): number { let score = 0; + const { currentFieldInfo } = AutocompleteSorter; + + // Do not consider same entity for recent check + if ( + currentFieldInfo.entityName && + completion.text.includes(currentFieldInfo.entityName) + ) { + return score; + } + if (completion.recencyWeight) { score += RecentEntityRule.threshold + completion.recencyWeight; } @@ -258,6 +277,7 @@ class RecentEntityRule implements AutocompleteRule { */ class DataTreeRule implements AutocompleteRule { static threshold = 1 << RuleWeight.DataTreeMatch; + computeScore(completion: Completion): number { let score = 0; @@ -278,11 +298,16 @@ class DataTreeRule implements AutocompleteRule { */ class TypeMatchRule implements AutocompleteRule { static threshold = 1 << RuleWeight.TypeMatch; + computeScore(completion: Completion): number { let score = 0; const currentFieldInfo = AutocompleteSorter.currentFieldInfo; - if (completion.type === currentFieldInfo.expectedType) + // Don't increase score for entity names + if ( + completion.type === currentFieldInfo.expectedType && + !completion.isEntityName + ) score += TypeMatchRule.threshold; return score; @@ -296,10 +321,12 @@ class TypeMatchRule implements AutocompleteRule { */ class DataTreeEntityNameRule implements AutocompleteRule { static threshold = 1 << RuleWeight.DataTreeEntityNameMatch; + computeScore(completion: Completion): number { let score = 0; - if (completion.isEntityName) score += DataTreeEntityNameRule.threshold; + // Reduce score for entity names instead of increasing it + if (completion.isEntityName) score -= DataTreeEntityNameRule.threshold; return score; } @@ -312,6 +339,7 @@ class DataTreeEntityNameRule implements AutocompleteRule { */ class PriorityMatchRule implements AutocompleteRule { static threshold = 1 << RuleWeight.PriorityMatch; + computeScore(completion: Completion): number { let score = 0; const { currentFieldInfo } = AutocompleteSorter; @@ -338,6 +366,7 @@ class PriorityMatchRule implements AutocompleteRule { */ class ScopeMatchRule implements AutocompleteRule { static threshold = 1 << RuleWeight.ScopeMatch; + computeScore(completion: Completion): number { let score = 0; @@ -362,6 +391,7 @@ class BlockAsyncFnsRule implements AutocompleteRule { "windowMessageListener", "watchPosition", ]; + computeScore( completion: Completion, entityInfo?: FieldEntityInformation | undefined, @@ -398,6 +428,7 @@ export class AutocompleteSorter { static entityDefInfo: DataTreeDefEntityInformation | undefined; static currentFieldInfo: FieldEntityInformation; static bestMatchEndIndex: number; + static sort( completions: Completion[], currentFieldInfo: FieldEntityInformation, diff --git a/app/client/src/utils/autocomplete/__tests__/AutocompleteSortRules.test.ts b/app/client/src/utils/autocomplete/__tests__/AutocompleteSortRules.test.ts index f18999dcde56..0c7e176c3c74 100644 --- a/app/client/src/utils/autocomplete/__tests__/AutocompleteSortRules.test.ts +++ b/app/client/src/utils/autocomplete/__tests__/AutocompleteSortRules.test.ts @@ -207,6 +207,7 @@ describe("Autocomplete Ranking", () => { { text: "Table1", displayText: "Table1", + isEntityName: true, className: "CodeMirror-Tern-completion CodeMirror-Tern-completion-object", data: { @@ -284,6 +285,21 @@ describe("Autocomplete Ranking", () => { recencyWeight: 2, isEntityName: false, }, + { + text: "Query1.data", + displayText: "Query1.data", + className: + "CodeMirror-Tern-completion CodeMirror-Tern-completion-unknown", + data: { + name: "Query1.data", + type: "[?]", + doc: "The response of the action", + origin: "DATA_TREE", + }, + origin: "DATA_TREE", + type: "ARRAY", + isHeader: false, + }, ]; const currentFieldInfo: unknown = { expectedType: "ARRAY", @@ -347,11 +363,11 @@ describe("Autocomplete Ranking", () => { .map((c) => c.displayText); expect(sortedCompletionsText).toEqual([ + "Query1.data", "Table2.updatedRowIndices", "Table2.updatedRows", - "Table2.updatedRow", "appsmith", - "Table1", + "Table2.updatedRow", ]); }); }); diff --git a/app/client/src/utils/autocomplete/__tests__/TernServer.test.ts b/app/client/src/utils/autocomplete/__tests__/TernServer.test.ts index 77bee0163cbc..9b3fcbe6d82c 100644 --- a/app/client/src/utils/autocomplete/__tests__/TernServer.test.ts +++ b/app/client/src/utils/autocomplete/__tests__/TernServer.test.ts @@ -451,7 +451,7 @@ describe("Tern server sorting", () => { AutocompleteSorter.currentFieldInfo, ); - expect(scoredCompletion1.score).toEqual(2 ** 6 + 2 ** 4 + 2 ** 3); + expect(scoredCompletion1.score).toEqual(2 ** 7 + 2 ** 4 + 2 ** 3); //completion that belongs to the same entity. const scoredCompletion2 = new ScoredCompletion( sameEntityCompletion, @@ -570,24 +570,6 @@ describe("Tern server completion", () => { recencyWeight: 0, isEntityName: false, }, - { - text: "QueryModule11", - displayText: "QueryModule11", - className: - "CodeMirror-Tern-completion CodeMirror-Tern-completion-object", - data: { - name: "QueryModule11", - type: "QueryModule11", - doc: "Object that contains the properties required to run queries and access the query data.", - url: "https://docs.appsmith.com/reference/appsmith-framework/query-object", - origin: "DATA_TREE", - }, - origin: "DATA_TREE", - type: "OBJECT", - isHeader: false, - recencyWeight: 0, - isEntityName: true, - }, { text: 'QueryModule11.run({ gender: "male", limit: "5", name: "Mr. " + appsmith.user.name })', displayText: "QueryModule11.run", diff --git a/app/client/src/utils/autocomplete/dataTypeSortRules.ts b/app/client/src/utils/autocomplete/dataTypeSortRules.ts index 896986ec0ed7..f54e9d6d962d 100644 --- a/app/client/src/utils/autocomplete/dataTypeSortRules.ts +++ b/app/client/src/utils/autocomplete/dataTypeSortRules.ts @@ -1,13 +1,22 @@ import type { AutocompleteDataType } from "utils/autocomplete/AutocompleteDataType"; export const PriorityOrder: Record = { - STRING: ["selectedRow", "data", "text"], - NUMBER: ["selectedRow", "data", "text"], - OBJECT: [], - ARRAY: [], + STRING: ["selectedRow", "data", "text", "selectedOptionValue", "value"], + NUMBER: ["selectedRow", "pageOffset", "pageSize", "data", "text"], + OBJECT: ["formData"], + ARRAY: ["selectedOptionValues", "selectedValues"], FUNCTION: ["run()"], - BOOLEAN: ["selectedRow", "data"], - UNKNOWN: ["selectedRow", "data", "run()"], + BOOLEAN: ["isValid", "selectedRow", "data", "isChecked", "isSwitchedOn"], + UNKNOWN: [ + "selectedRow", + "data", + "run()", + "pageSize", + "pageOffset", + "selectedOptionValue", + "text", + "value", + ], }; export const DataTreeFunctionSortOrder = [ From 5aeee41104329dc946adfaf140d71d71e64b4ad0 Mon Sep 17 00:00:00 2001 From: Hetu Nandu Date: Fri, 17 Jan 2025 16:42:40 +0530 Subject: [PATCH 3/9] chore: Make Split screen feature GA (#38731) --- .../cypress/support/Objects/FeatureFlags.ts | 1 - .../hooks/useIsInSideBySideEditor.test.tsx | 9 -------- app/client/src/ce/entities/FeatureFlag.ts | 4 ---- .../PartialExportModal/unitTestUtils.ts | 1 - .../IDE/EditorPane/JS/JSRender.test.tsx | 13 ----------- .../IDE/EditorPane/Query/QueryRender.test.tsx | 22 ++---------------- .../IDE/EditorPane/UI/UIRender.test.tsx | 8 ------- .../components/SegmentAddHeader.tsx | 23 ++----------------- .../Editor/IDE/EditorTabs/Editortabs.test.tsx | 5 ---- .../src/pages/Editor/IDE/EditorTabs/index.tsx | 9 +------- app/client/src/sagas/ActionSagas.ts | 8 +------ app/client/src/sagas/JSPaneSagas.ts | 7 +----- app/client/src/selectors/ideSelectors.tsx | 22 ++---------------- 13 files changed, 9 insertions(+), 123 deletions(-) diff --git a/app/client/cypress/support/Objects/FeatureFlags.ts b/app/client/cypress/support/Objects/FeatureFlags.ts index b8385241ddda..78fc490c3f97 100644 --- a/app/client/cypress/support/Objects/FeatureFlags.ts +++ b/app/client/cypress/support/Objects/FeatureFlags.ts @@ -3,7 +3,6 @@ import { ObjectsRegistry } from "./Registry"; 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_git_modularisation_enabled: true, }; diff --git a/app/client/src/IDE/hooks/useIsInSideBySideEditor.test.tsx b/app/client/src/IDE/hooks/useIsInSideBySideEditor.test.tsx index 1f3c2d740fe6..81cf7a8d802f 100644 --- a/app/client/src/IDE/hooks/useIsInSideBySideEditor.test.tsx +++ b/app/client/src/IDE/hooks/useIsInSideBySideEditor.test.tsx @@ -17,9 +17,6 @@ import type { Store } from "redux"; const JS_COLLECTION_EDITOR_PATH = "/app/app-name/page-665dd1103e4483728c9ed11a/edit/jsObjects"; const NON_JS_COLLECTION_EDITOR_PATH = "/some-other-path"; -const FEATURE_FLAGS = { - rollout_side_by_side_enabled: true, -}; const renderUseIsInSideBySideEditor = ( history: MemoryHistory, @@ -41,7 +38,6 @@ describe("useIsInSideBySideEditor", () => { const store = testStore( getIDETestState({ ideView: EditorViewMode.SplitScreen, - featureFlags: FEATURE_FLAGS, }), ); @@ -54,7 +50,6 @@ describe("useIsInSideBySideEditor", () => { const store = testStore( getIDETestState({ ideView: EditorViewMode.FullScreen, - featureFlags: FEATURE_FLAGS, }), ); @@ -71,7 +66,6 @@ describe("useIsInSideBySideEditor", () => { const store = testStore( getIDETestState({ ideView: EditorViewMode.SplitScreen, - featureFlags: FEATURE_FLAGS, }), ); @@ -88,7 +82,6 @@ describe("useIsInSideBySideEditor", () => { const store = testStore( getIDETestState({ ideView: EditorViewMode.SplitScreen, - featureFlags: FEATURE_FLAGS, }), ); @@ -105,7 +98,6 @@ describe("useIsInSideBySideEditor", () => { const store = testStore( getIDETestState({ ideView: EditorViewMode.SplitScreen, - featureFlags: FEATURE_FLAGS, }), ); @@ -130,7 +122,6 @@ describe("useIsInSideBySideEditor", () => { const store = testStore( getIDETestState({ ideView: EditorViewMode.SplitScreen, - featureFlags: FEATURE_FLAGS, }), ); diff --git a/app/client/src/ce/entities/FeatureFlag.ts b/app/client/src/ce/entities/FeatureFlag.ts index 9e8d0b90cef0..1dcfb65c0059 100644 --- a/app/client/src/ce/entities/FeatureFlag.ts +++ b/app/client/src/ce/entities/FeatureFlag.ts @@ -24,14 +24,12 @@ export const FEATURE_FLAG = { license_widget_rtl_support_enabled: "license_widget_rtl_support_enabled", ab_one_click_learning_popover_enabled: "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", rollout_remove_feature_walkthrough_enabled: "rollout_remove_feature_walkthrough_enabled", rollout_eslint_enabled: "rollout_eslint_enabled", release_drag_drop_building_blocks_enabled: "release_drag_drop_building_blocks_enabled", - rollout_side_by_side_enabled: "rollout_side_by_side_enabled", release_layout_conversion_enabled: "release_layout_conversion_enabled", release_anvil_toggle_enabled: "release_anvil_toggle_enabled", release_git_persist_branch_enabled: "release_git_persist_branch_enabled", @@ -79,11 +77,9 @@ export const DEFAULT_FEATURE_FLAG_VALUE: FeatureFlags = { license_git_continuous_delivery_enabled: false, license_widget_rtl_support_enabled: false, ab_one_click_learning_popover_enabled: false, - release_side_by_side_ide_enabled: false, ab_appsmith_ai_query: false, rollout_remove_feature_walkthrough_enabled: true, rollout_eslint_enabled: false, - rollout_side_by_side_enabled: false, release_layout_conversion_enabled: false, release_anvil_toggle_enabled: false, release_git_persist_branch_enabled: false, diff --git a/app/client/src/components/editorComponents/PartialImportExport/PartialExportModal/unitTestUtils.ts b/app/client/src/components/editorComponents/PartialImportExport/PartialExportModal/unitTestUtils.ts index 9f1c5a7f4d55..1fe0cdb1451a 100644 --- a/app/client/src/components/editorComponents/PartialImportExport/PartialExportModal/unitTestUtils.ts +++ b/app/client/src/components/editorComponents/PartialImportExport/PartialExportModal/unitTestUtils.ts @@ -12764,7 +12764,6 @@ export const defaultAppState = { release_show_new_sidebar_announcement_enabled: false, rollout_app_sidebar_enabled: false, ab_one_click_learning_popover_enabled: false, - release_side_by_side_ide_enabled: false, license_git_unlimited_repo_enabled: false, ask_ai_js: false, license_connection_pool_size_enabled: false, diff --git a/app/client/src/pages/Editor/IDE/EditorPane/JS/JSRender.test.tsx b/app/client/src/pages/Editor/IDE/EditorPane/JS/JSRender.test.tsx index 565e73551df8..d42f0fcdd2b0 100644 --- a/app/client/src/pages/Editor/IDE/EditorPane/JS/JSRender.test.tsx +++ b/app/client/src/pages/Editor/IDE/EditorPane/JS/JSRender.test.tsx @@ -9,10 +9,6 @@ import { EditorEntityTab, EditorViewMode } from "ee/entities/IDE/constants"; import { PageFactory } from "test/factories/PageFactory"; import { JSObjectFactory } from "test/factories/Actions/JSObject"; -const FeatureFlags = { - rollout_side_by_side_enabled: true, -}; - const basePageId = "0123456789abcdef00000000"; describe("IDE Render: JS", () => { @@ -24,7 +20,6 @@ describe("IDE Render: JS", () => { , { url: `/app/applicationSlug/pageSlug-${basePageId}/edit/jsObjects`, - featureFlags: FeatureFlags, }, ); @@ -49,7 +44,6 @@ describe("IDE Render: JS", () => { { url: `/app/applicationSlug/pageSlug-${basePageId}/edit/jsObjects`, initialState: state, - featureFlags: FeatureFlags, }, ); @@ -73,7 +67,6 @@ describe("IDE Render: JS", () => { , { url: `/app/applicationSlug/pageSlug-${basePageId}/edit/jsObjects/add`, - featureFlags: FeatureFlags, }, ); @@ -98,7 +91,6 @@ describe("IDE Render: JS", () => { { url: `/app/applicationSlug/pageSlug-${basePageId}/edit/jsObjects/add`, initialState: state, - featureFlags: FeatureFlags, }, ); @@ -137,7 +129,6 @@ describe("IDE Render: JS", () => { { url: `/app/applicationSlug/pageSlug-${page.basePageId}/edit/jsObjects/${js1.baseId}`, initialState: state, - featureFlags: FeatureFlags, }, ); @@ -194,7 +185,6 @@ describe("IDE Render: JS", () => { { url: `/app/applicationSlug/pageSlug-${page.basePageId}/edit/jsObjects/${js2.baseId}`, initialState: state, - featureFlags: FeatureFlags, }, ); @@ -241,7 +231,6 @@ describe("IDE Render: JS", () => { { url: `/app/applicationSlug/pageSlug-${page.basePageId}/edit/jsObjects/${js3.baseId}/add`, initialState: state, - featureFlags: FeatureFlags, }, ); @@ -283,7 +272,6 @@ describe("IDE Render: JS", () => { { url: `/app/applicationSlug/pageSlug-${page.basePageId}/edit/jsObjects/${js4.baseId}/add`, initialState: state, - featureFlags: FeatureFlags, }, ); @@ -334,7 +322,6 @@ describe("IDE Render: JS", () => { { url: `/app/applicationSlug/pageSlug-${page.basePageId}/edit/jsObjects/${Main_JS.baseId}`, initialState: state, - featureFlags: FeatureFlags, }, ); diff --git a/app/client/src/pages/Editor/IDE/EditorPane/Query/QueryRender.test.tsx b/app/client/src/pages/Editor/IDE/EditorPane/Query/QueryRender.test.tsx index 77393a10131f..cf10c6cb9af3 100644 --- a/app/client/src/pages/Editor/IDE/EditorPane/Query/QueryRender.test.tsx +++ b/app/client/src/pages/Editor/IDE/EditorPane/Query/QueryRender.test.tsx @@ -13,10 +13,6 @@ import { PageFactory } from "test/factories/PageFactory"; import { screen, waitFor } from "@testing-library/react"; import { GoogleSheetFactory } from "test/factories/Actions/GoogleSheetFactory"; -const FeatureFlags = { - rollout_side_by_side_enabled: true, -}; - const basePageId = "0123456789abcdef00000000"; describe("IDE URL rendering of Queries", () => { @@ -28,7 +24,6 @@ describe("IDE URL rendering of Queries", () => { , { url: `/app/applicationSlug/pageSlug-${basePageId}/edit/queries`, - featureFlags: FeatureFlags, }, ); @@ -51,7 +46,6 @@ describe("IDE URL rendering of Queries", () => { { url: `/app/applicationSlug/pageSlug-${basePageId}/edit/queries`, initialState: state, - featureFlags: FeatureFlags, }, ); @@ -73,7 +67,6 @@ describe("IDE URL rendering of Queries", () => { , { url: `/app/applicationSlug/pageSlug-${basePageId}/edit/queries/add`, - featureFlags: FeatureFlags, }, ); @@ -102,7 +95,6 @@ describe("IDE URL rendering of Queries", () => { { url: `/app/applicationSlug/pageSlug-${basePageId}/edit/queries/add`, initialState: state, - featureFlags: FeatureFlags, }, ); @@ -148,7 +140,6 @@ describe("IDE URL rendering of Queries", () => { { url: `/app/applicationSlug/pageSlug-${page.basePageId}/edit/api/${anApi.baseId}`, initialState: state, - featureFlags: FeatureFlags, }, ); @@ -205,7 +196,6 @@ describe("IDE URL rendering of Queries", () => { { url: `/app/applicationSlug/pageSlug-${page.basePageId}/edit/api/${anApi.baseId}`, initialState: state, - featureFlags: FeatureFlags, }, ); @@ -250,7 +240,6 @@ describe("IDE URL rendering of Queries", () => { { url: `/app/applicationSlug/pageSlug-${page.basePageId}/edit/api/${anApi.baseId}/add`, initialState: state, - featureFlags: FeatureFlags, }, ); @@ -292,7 +281,6 @@ describe("IDE URL rendering of Queries", () => { { url: `/app/applicationSlug/pageSlug-${page.basePageId}/edit/api/${anApi.baseId}/add`, initialState: state, - featureFlags: FeatureFlags, }, ); @@ -347,7 +335,6 @@ describe("IDE URL rendering of Queries", () => { url: `/app/applicationSlug/pageSlug-${page.basePageId}/edit/queries/${anQuery.baseId}`, sagasToRun: sagasToRunForTests, initialState: state, - featureFlags: FeatureFlags, }, ); @@ -402,7 +389,6 @@ describe("IDE URL rendering of Queries", () => { url: `/app/applicationSlug/pageSlug-${page.basePageId}/edit/queries/${anQuery.baseId}`, sagasToRun: sagasToRunForTests, initialState: state, - featureFlags: FeatureFlags, }, ); @@ -448,7 +434,7 @@ describe("IDE URL rendering of Queries", () => { { url: `/app/applicationSlug/${page.slug}-${page.pageId}/edit/queries/${anQuery.baseId}/add`, initialState: state, - featureFlags: FeatureFlags, + sagasToRun: sagasToRunForTests, }, ); @@ -492,7 +478,6 @@ describe("IDE URL rendering of Queries", () => { url: `/app/applicationSlug/pageSlug-${page.basePageId}/edit/queries/${anQuery.baseId}/add`, sagasToRun: sagasToRunForTests, initialState: state, - featureFlags: FeatureFlags, }, ); @@ -548,7 +533,6 @@ describe("IDE URL rendering of Queries", () => { url: `/app/applicationSlug/pageSlug-${page.basePageId}/edit/saas/google-sheets-plugin/api/${anQuery.baseId}`, sagasToRun: sagasToRunForTests, initialState: state, - featureFlags: FeatureFlags, }, ); @@ -597,7 +581,6 @@ describe("IDE URL rendering of Queries", () => { url: `/app/applicationSlug/pageSlug-${page.basePageId}/edit/saas/google-sheets-plugin/api/${anQuery.baseId}`, sagasToRun: sagasToRunForTests, initialState: state, - featureFlags: FeatureFlags, }, ); @@ -646,7 +629,7 @@ describe("IDE URL rendering of Queries", () => { { url: `/app/applicationSlug/pageSlug-${page.basePageId}/edit/saas/google-sheets-plugin/api/${anQuery.baseId}/add`, initialState: state, - featureFlags: FeatureFlags, + sagasToRun: sagasToRunForTests, }, ); @@ -691,7 +674,6 @@ describe("IDE URL rendering of Queries", () => { url: `/app/applicationSlug/pageSlug-${page.basePageId}/edit/saas/google-sheets-plugin/api/${anQuery.baseId}/add`, sagasToRun: sagasToRunForTests, initialState: state, - featureFlags: FeatureFlags, }, ); diff --git a/app/client/src/pages/Editor/IDE/EditorPane/UI/UIRender.test.tsx b/app/client/src/pages/Editor/IDE/EditorPane/UI/UIRender.test.tsx index 2bc26118bd81..ebea1b837310 100644 --- a/app/client/src/pages/Editor/IDE/EditorPane/UI/UIRender.test.tsx +++ b/app/client/src/pages/Editor/IDE/EditorPane/UI/UIRender.test.tsx @@ -13,10 +13,6 @@ import { } from "test/factories/WidgetFactoryUtils"; import { EditorViewMode } from "ee/entities/IDE/constants"; -const FeatureFlags = { - rollout_side_by_side_enabled: true, -}; - const pageId = "0123456789abcdef00000000"; describe("IDE URL rendering: UI", () => { @@ -32,7 +28,6 @@ describe("IDE URL rendering: UI", () => { , { url: `/app/applicationSlug/pageSlug-${pageId}/edit`, - featureFlags: FeatureFlags, initialState: state, }, ); @@ -52,7 +47,6 @@ describe("IDE URL rendering: UI", () => { , { url: `/app/applicationSlug/pageSlug-${pageId}/edit/widgets`, - featureFlags: FeatureFlags, initialState: state, }, ); @@ -101,7 +95,6 @@ describe("IDE URL rendering: UI", () => { , { url, - featureFlags: FeatureFlags, initialState: state, }, ); @@ -126,7 +119,6 @@ describe("IDE URL rendering: UI", () => { , { url: `/app/applicationSlug/pageSlug-${pageId}/edit`, - featureFlags: FeatureFlags, initialState: state, }, ); diff --git a/app/client/src/pages/Editor/IDE/EditorPane/components/SegmentAddHeader.tsx b/app/client/src/pages/Editor/IDE/EditorPane/components/SegmentAddHeader.tsx index 68ddda6d141a..9b349f61c4d2 100644 --- a/app/client/src/pages/Editor/IDE/EditorPane/components/SegmentAddHeader.tsx +++ b/app/client/src/pages/Editor/IDE/EditorPane/components/SegmentAddHeader.tsx @@ -1,8 +1,6 @@ import React from "react"; -import { Button, Flex, Text } from "@appsmith/ads"; +import { Flex, Text } from "@appsmith/ads"; import { createMessage } from "ee/constants/messages"; -import { useSelector } from "react-redux"; -import { getIsSideBySideEnabled } from "selectors/ideSelectors"; interface Props { titleMessage: () => string; @@ -10,32 +8,15 @@ interface Props { } const SegmentAddHeader = (props: Props) => { - const isSideBySideEnabled = useSelector(getIsSideBySideEnabled); - return ( {createMessage(props.titleMessage)} - {isSideBySideEnabled ? null : ( -