Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -1103,10 +1103,6 @@ const ContentTypeRaw = importSvg(
async () => import("../__assets__/icons/ads/content-type-raw.svg"),
);

const CloudIconV2 = importSvg(
async () => import("../__assets__/icons/ads/cloudy-line.svg"),
);

const NotionIcon = importSvg(
async () => import("../__assets__/icons/ads/notion.svg"),
);
Expand Down Expand Up @@ -1229,7 +1225,6 @@ const ICON_LOOKUP = {
"close-modal": CloseLineIcon,
"close-x": CloseLineIcon,
"cloud-off-line": CloudOfflineIcon,
"cloud-v2": CloudIconV2,
"collapse-control": CollapseIcon,
"column-freeze": ColumnFreeze,
"column-unfreeze": SubtractIcon,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ const blockAirgappedRoutes = (config: InternalAxiosRequestConfig) => {

const addGitBranchHeader = (config: InternalAxiosRequestConfig) => {
const state = store.getState();
// ! git mod - not sure how to replace this, we could directly read state if required
const branch = getCurrentGitBranch(state) || getQueryParamsObject().branch;

return _addGitBranchHeader(config, { branch });
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 @@ -48,7 +48,6 @@ export const FEATURE_FLAG = {
"release_table_html_column_type_enabled",
release_gs_all_sheets_options_enabled:
"release_gs_all_sheets_options_enabled",
release_git_modularisation_enabled: "release_git_modularisation_enabled",
ab_premium_datasources_view_enabled: "ab_premium_datasources_view_enabled",
kill_session_recordings_enabled: "kill_session_recordings_enabled",
config_mask_session_recordings_enabled:
Expand Down Expand Up @@ -96,7 +95,6 @@ export const DEFAULT_FEATURE_FLAG_VALUE: FeatureFlags = {
release_evaluation_scope_cache: false,
release_table_html_column_type_enabled: false,
release_gs_all_sheets_options_enabled: false,
release_git_modularisation_enabled: false,
ab_premium_datasources_view_enabled: false,
kill_session_recordings_enabled: false,
config_user_session_recordings_enabled: true,
Expand Down
27 changes: 6 additions & 21 deletions app/client/src/ce/navigation/FocusStrategy/AppIDEFocusStrategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { all, select, take } from "redux-saga/effects";
import type { FocusPath, FocusStrategy } from "sagas/FocusRetentionSaga";
import type { AppsmithLocationState } from "utils/history";
import { NavigationMethod } from "utils/history";
import { getCurrentGitBranch } from "selectors/gitSyncSelectors";
import type { FocusEntityInfo } from "navigation/FocusEntity";
import {
FocusEntity,
Expand All @@ -17,7 +18,6 @@ import {
widgetListURL,
} from "ee/RouteBuilder";
import AppIDEFocusElements from "../FocusElements/AppIDE";
import { selectGitApplicationCurrentBranch } from "selectors/gitModSelectors";

function shouldSetState(
prevPath: string,
Expand Down Expand Up @@ -86,17 +86,8 @@ const isPageChange = (prevPath: string, currentPath: string) => {
);
};

export const createEditorFocusInfoKey = (
basePageId: string,
branch: string | null = null,
) => {
const r = branch
? `EDITOR_STATE.${basePageId}#${branch}`
: `EDITOR_STATE.${basePageId}`;

return r;
};

export const createEditorFocusInfoKey = (basePageId: string, branch?: string) =>
`EDITOR_STATE.${basePageId}#${branch}`;
export const createEditorFocusInfo = (basePageId: string, branch?: string) => ({
key: createEditorFocusInfoKey(basePageId, branch),
entityInfo: {
Expand All @@ -118,9 +109,7 @@ export const AppIDEFocusStrategy: FocusStrategy = {
return [];
}

const branch: string | undefined = yield select(
selectGitApplicationCurrentBranch,
);
const branch: string | undefined = yield select(getCurrentGitBranch);
const entities: Array<{ entityInfo: FocusEntityInfo; key: string }> = [];
const prevEntityInfo = identifyEntityFromPath(previousPath);
const currentEntityInfo = identifyEntityFromPath(currentPath);
Expand All @@ -147,9 +136,7 @@ export const AppIDEFocusStrategy: FocusStrategy = {
return entities;
},
*getEntitiesForStore(path: string, currentPath: string) {
const branch: string | undefined = yield select(
selectGitApplicationCurrentBranch,
);
const branch: string | undefined = yield select(getCurrentGitBranch);
const entities: Array<FocusPath> = [];
const currentFocusEntityInfo = identifyEntityFromPath(currentPath);
const prevFocusEntityInfo = identifyEntityFromPath(path);
Expand Down Expand Up @@ -192,9 +179,7 @@ export const AppIDEFocusStrategy: FocusStrategy = {
appState: EditorState.EDITOR,
params: prevFocusEntityInfo.params,
},
key: branch
? `EDITOR_STATE.${prevFocusEntityInfo.params.basePageId}#${branch}`
: `EDITOR_STATE.${prevFocusEntityInfo.params.basePageId}`,
key: `EDITOR_STATE.${prevFocusEntityInfo.params.basePageId}#${branch}`,
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ import CreateNewAppsOption from "./CreateNewAppsOption";
import { BrowserRouter as Router } from "react-router-dom";
import { unitTestBaseMockStore } from "layoutSystems/common/dropTarget/unitTestUtils";

jest.mock("selectors/gitModSelectors", () => ({
selectCombinedPreviewMode: jest.fn(() => false),
}));

const defaultStoreState = {
...unitTestBaseMockStore,
tenant: {
Expand Down
12 changes: 2 additions & 10 deletions app/client/src/ce/pages/Applications/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ import { MOBILE_MAX_WIDTH } from "constants/AppConstants";
import { Indices } from "constants/Layers";
import ImportModal from "pages/common/ImportModal";
import SharedUserList from "pages/common/SharedUserList";
import GitSyncModal from "pages/Editor/gitSync/GitSyncModal";
import ReconnectDatasourceModal from "pages/Editor/gitSync/ReconnectDatasourceModal";
import RepoLimitExceededErrorModal from "pages/Editor/gitSync/RepoLimitExceededErrorModal";
import AnalyticsUtil from "ee/utils/AnalyticsUtil";
Expand All @@ -132,15 +133,6 @@ import { getAssetUrl } from "ee/utils/airgapHelpers";
import { ASSETS_CDN_URL } from "constants/ThirdPartyConstants";
import { LayoutSystemTypes } from "layoutSystems/types";
import { getIsAnvilLayoutEnabled } from "layoutSystems/anvil/integrations/selectors";
import OldGitSyncModal from "pages/Editor/gitSync/GitSyncModal";
import { useGitModEnabled } from "pages/Editor/gitSync/hooks/modHooks";
import { GitImportModal as NewGitImportModal } from "git";

function GitImportModal() {
const isGitModEnabled = useGitModEnabled();

return isGitModEnabled ? <NewGitImportModal /> : <OldGitSyncModal isImport />;
}

export const { cloudHosting } = getAppsmithConfigs();

Expand Down Expand Up @@ -963,7 +955,7 @@ export function ApplicationsSection(props: any) {
isMobile={isMobile}
>
{workspacesListComponent}
<GitImportModal />
<GitSyncModal isImport />
<ReconnectDatasourceModal />
</ApplicationContainer>
);
Expand Down
4 changes: 2 additions & 2 deletions app/client/src/ce/pages/Editor/IDE/MainPane/useRoutes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ import DataSourceEditor from "pages/Editor/DataSourceEditor";
import DatasourceBlankState from "pages/Editor/DataSourceEditor/DatasourceBlankState";
import type { RouteProps } from "react-router";
import { useSelector } from "react-redux";
import { combinedPreviewModeSelector } from "selectors/editorSelectors";
import { lazy, Suspense } from "react";
import React from "react";

import { retryPromise } from "utils/AppsmithUtils";
import Skeleton from "widgets/Skeleton";
import { selectCombinedPreviewMode } from "selectors/gitModSelectors";

const FirstTimeUserOnboardingChecklist = lazy(async () =>
retryPromise(
Expand Down Expand Up @@ -67,7 +67,7 @@ export interface RouteReturnType extends RouteProps {
*/

function useRoutes(path: string): RouteReturnType[] {
const isPreviewMode = useSelector(selectCombinedPreviewMode);
const isPreviewMode = useSelector(combinedPreviewModeSelector);

return [
{
Expand Down
7 changes: 0 additions & 7 deletions app/client/src/ce/reducers/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ import type { ActiveField } from "reducers/uiReducers/activeFieldEditorReducer";
import type { SelectedWorkspaceReduxState } from "ee/reducers/uiReducers/selectedWorkspaceReducer";
import type { ConsolidatedPageLoadState } from "reducers/uiReducers/consolidatedPageLoadReducer";
import type { BuildingBlocksReduxState } from "reducers/uiReducers/buildingBlockReducer";
import type { GitArtifactRootReduxState, GitGlobalReduxState } from "git";
import { gitReducer } from "git/store";

export const reducerObject = {
entities: entityReducer,
Expand All @@ -88,7 +86,6 @@ export const reducerObject = {
settings: SettingsReducer,
tenant: tenantReducer,
linting: lintErrorReducer,
git: gitReducer,
};

export interface AppState {
Expand Down Expand Up @@ -179,8 +176,4 @@ export interface AppState {
// TODO: Fix this the next time the file is edited
// eslint-disable-next-line @typescript-eslint/no-explicit-any
tenant: TenantReduxState<any>;
git: {
global: GitGlobalReduxState;
artifacts: GitArtifactRootReduxState;
};
}
16 changes: 0 additions & 16 deletions app/client/src/ce/reducers/uiReducers/applicationsReducer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ import {
import produce from "immer";
import { isEmpty } from "lodash";
import type { ApplicationPayload } from "entities/Application";
import { gitConnectSuccess, type GitConnectSuccessPayload } from "git";
import type { PayloadAction } from "@reduxjs/toolkit";

export const initialState: ApplicationsReduxState = {
isSavingAppName: false,
Expand Down Expand Up @@ -746,20 +744,6 @@ export const handlers = {
isSavingNavigationSetting: false,
};
},
// git
[gitConnectSuccess.type]: (
state: ApplicationsReduxState,
action: PayloadAction<GitConnectSuccessPayload>,
) => {
return {
...state,
currentApplication: {
...state.currentApplication,
gitApplicationMetadata:
action.payload.responseData.gitApplicationMetadata,
},
};
},
};

const applicationsReducer = createReducer(initialState, handlers);
Expand Down
14 changes: 5 additions & 9 deletions app/client/src/ce/sagas/PageSagas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ import {
import { IncorrectBindingError, validateResponse } from "sagas/ErrorSagas";
import type { ApiResponse } from "api/ApiResponses";
import {
combinedPreviewModeSelector,
getCurrentApplicationId,
getCurrentLayoutId,
getCurrentPageId,
Expand Down Expand Up @@ -127,6 +128,7 @@ import { getPageList } from "ee/selectors/entitiesSelector";
import { setPreviewModeAction } from "actions/editorActions";
import { SelectionRequestType } from "sagas/WidgetSelectUtils";
import { toast } from "@appsmith/ads";
import { getCurrentGitBranch } from "selectors/gitSyncSelectors";
import type { MainCanvasReduxState } from "reducers/uiReducers/mainCanvasReducer";
import { UserCancelledActionExecutionError } from "sagas/ActionExecution/errorUtils";
import { getInstanceId } from "ee/selectors/tenantSelectors";
Expand All @@ -148,10 +150,6 @@ import { getIsAnvilLayout } from "layoutSystems/anvil/integrations/selectors";
import { convertToBasePageIdSelector } from "selectors/pageListSelectors";
import type { Page } from "entities/Page";
import { ConsolidatedPageLoadApi } from "api";
import {
selectCombinedPreviewMode,
selectGitApplicationCurrentBranch,
} from "selectors/gitModSelectors";

export const checkIfMigrationIsNeeded = (
fetchPageResponse?: FetchPageResponse,
Expand All @@ -174,9 +172,7 @@ export function* refreshTheApp() {
const currentPageId: string = yield select(getCurrentPageId);
const defaultBasePageId: string = yield select(getDefaultBasePageId);
const pagesList: Page[] = yield select(getPageList);
const gitBranch: string | undefined = yield select(
selectGitApplicationCurrentBranch,
);
const gitBranch: string = yield select(getCurrentGitBranch);

const isCurrentPageIdInList =
pagesList.filter((page) => page.pageId === currentPageId).length > 0;
Expand Down Expand Up @@ -641,7 +637,7 @@ export function* saveLayoutSaga(action: ReduxAction<{ isRetry?: boolean }>) {
try {
const currentPageId: string = yield select(getCurrentPageId);
const currentPage: Page = yield select(getPageById(currentPageId));
const isPreviewMode: boolean = yield select(selectCombinedPreviewMode);
const isPreviewMode: boolean = yield select(combinedPreviewModeSelector);

const appMode: APP_MODE | undefined = yield select(getAppMode);

Expand Down Expand Up @@ -1405,7 +1401,7 @@ export function* setCanvasCardsStateSaga(action: ReduxAction<string>) {
}

export function* setPreviewModeInitSaga(action: ReduxAction<boolean>) {
const isPreviewMode: boolean = yield select(selectCombinedPreviewMode);
const isPreviewMode: boolean = yield select(combinedPreviewModeSelector);

if (action.payload) {
// we animate out elements and then move to the canvas
Expand Down
2 changes: 0 additions & 2 deletions app/client/src/ce/sagas/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ import sendSideBySideWidgetHoverAnalyticsEventSaga from "sagas/AnalyticsSaga";

/* Sagas that are registered by a module that is designed to be independent of the core platform */
import ternSagas from "sagas/TernSaga";
import gitSagas from "git/sagas";

export const sagas = [
initSagas,
Expand Down Expand Up @@ -107,5 +106,4 @@ export const sagas = [
ternSagas,
ideSagas,
sendSideBySideWidgetHoverAnalyticsEventSaga,
gitSagas,
];
Loading