Merge pull request #31845 from appsmithorg/cherry-pick/15-03-24
chore: cherry pick critical fixes
This commit is contained in:
commit
004ee827a1
|
|
@ -0,0 +1,23 @@
|
||||||
|
/// <reference types="Cypress" />
|
||||||
|
import {
|
||||||
|
agHelper,
|
||||||
|
entityExplorer,
|
||||||
|
draggableWidgets,
|
||||||
|
} from "../../../../../support/Objects/ObjectsCore";
|
||||||
|
|
||||||
|
describe(
|
||||||
|
"Map chart Widget",
|
||||||
|
{ tags: ["@tag.Widget", "@tag.Maps"] },
|
||||||
|
function () {
|
||||||
|
it("1.Drag two Map Widget and Verify the Map Widget is loading", () => {
|
||||||
|
//Add map and verify
|
||||||
|
entityExplorer.DragDropWidgetNVerify(draggableWidgets.MAPCHART, 200, 200);
|
||||||
|
entityExplorer.DragDropWidgetNVerify(draggableWidgets.MAPCHART, 600, 200);
|
||||||
|
agHelper.RefreshPage();
|
||||||
|
agHelper.AssertElementLength(
|
||||||
|
".t--draggable-mapchartwidget svg text:contains('Global Population')",
|
||||||
|
2,
|
||||||
|
);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
@ -75,7 +75,6 @@ import { getFetchedWorkspaces } from "@appsmith/selectors/workspaceSelectors";
|
||||||
import { getApplicationsOfWorkspace } from "@appsmith/selectors/selectedWorkspaceSelectors";
|
import { getApplicationsOfWorkspace } from "@appsmith/selectors/selectedWorkspaceSelectors";
|
||||||
import useReconnectModalData from "@appsmith/pages/Editor/gitSync/useReconnectModalData";
|
import useReconnectModalData from "@appsmith/pages/Editor/gitSync/useReconnectModalData";
|
||||||
import { resetImportData } from "@appsmith/actions/workspaceActions";
|
import { resetImportData } from "@appsmith/actions/workspaceActions";
|
||||||
import history from "utils/history";
|
|
||||||
|
|
||||||
const Section = styled.div`
|
const Section = styled.div`
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -439,6 +438,11 @@ function ReconnectDatasourceModal() {
|
||||||
// If either the close button or the overlay was clicked close the modal
|
// If either the close button or the overlay was clicked close the modal
|
||||||
if (shouldClose) {
|
if (shouldClose) {
|
||||||
onClose();
|
onClose();
|
||||||
|
const isInsideApplication =
|
||||||
|
window.location.pathname.split("/")[1] === "app";
|
||||||
|
if (isInsideApplication && editorURL) {
|
||||||
|
window.location.href = editorURL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -563,7 +567,10 @@ function ReconnectDatasourceModal() {
|
||||||
const onSkipBtnClick = () => {
|
const onSkipBtnClick = () => {
|
||||||
AnalyticsUtil.logEvent("RECONNECTING_SKIP_TO_APPLICATION_BUTTON_CLICK");
|
AnalyticsUtil.logEvent("RECONNECTING_SKIP_TO_APPLICATION_BUTTON_CLICK");
|
||||||
localStorage.setItem("importedAppPendingInfo", "null");
|
localStorage.setItem("importedAppPendingInfo", "null");
|
||||||
editorURL && history.push(editorURL);
|
if (editorURL) {
|
||||||
|
// window location because history push changes routes shallowly and some side effects needed for page loading might not run
|
||||||
|
window.location.href = editorURL;
|
||||||
|
}
|
||||||
onClose();
|
onClose();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -61,10 +61,6 @@ import type { FeatureFlags } from "@appsmith/entities/FeatureFlag";
|
||||||
import { getWidgetSelectorByWidgetId } from "selectors/layoutSystemSelectors";
|
import { getWidgetSelectorByWidgetId } from "selectors/layoutSystemSelectors";
|
||||||
import { getAppViewerPageIdFromPath } from "@appsmith/pages/Editor/Explorer/helpers";
|
import { getAppViewerPageIdFromPath } from "@appsmith/pages/Editor/Explorer/helpers";
|
||||||
import AnalyticsUtil from "../utils/AnalyticsUtil";
|
import AnalyticsUtil from "../utils/AnalyticsUtil";
|
||||||
import {
|
|
||||||
retrieveCodeWidgetNavigationUsed,
|
|
||||||
storeCodeWidgetNavigationUsed,
|
|
||||||
} from "../utils/storage";
|
|
||||||
|
|
||||||
// The following is computed to be used in the entity explorer
|
// The following is computed to be used in the entity explorer
|
||||||
// Every time a widget is selected, we need to expand widget entities
|
// Every time a widget is selected, we need to expand widget entities
|
||||||
|
|
@ -220,9 +216,6 @@ function* appendSelectedWidgetToUrlSaga(
|
||||||
const isWidgetSelectionBlocked: boolean = yield select(
|
const isWidgetSelectionBlocked: boolean = yield select(
|
||||||
getWidgetSelectionBlock,
|
getWidgetSelectionBlock,
|
||||||
);
|
);
|
||||||
const timesUsedCodeModeWidgetSelection: number = yield call(
|
|
||||||
retrieveCodeWidgetNavigationUsed,
|
|
||||||
);
|
|
||||||
const appMode: APP_MODE = yield select(getAppMode);
|
const appMode: APP_MODE = yield select(getAppMode);
|
||||||
const viewMode = appMode === APP_MODE.PUBLISHED;
|
const viewMode = appMode === APP_MODE.PUBLISHED;
|
||||||
if (isSnipingMode || viewMode) return;
|
if (isSnipingMode || viewMode) return;
|
||||||
|
|
@ -243,12 +236,6 @@ function* appendSelectedWidgetToUrlSaga(
|
||||||
});
|
});
|
||||||
if (invokedBy === NavigationMethod.CanvasClick && isWidgetSelectionBlocked) {
|
if (invokedBy === NavigationMethod.CanvasClick && isWidgetSelectionBlocked) {
|
||||||
AnalyticsUtil.logEvent("CODE_MODE_WIDGET_SELECTION");
|
AnalyticsUtil.logEvent("CODE_MODE_WIDGET_SELECTION");
|
||||||
if (timesUsedCodeModeWidgetSelection < 2) {
|
|
||||||
yield call(
|
|
||||||
storeCodeWidgetNavigationUsed,
|
|
||||||
timesUsedCodeModeWidgetSelection + 1,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (currentURL !== newUrl) {
|
if (currentURL !== newUrl) {
|
||||||
history.push(newUrl, { invokedBy });
|
history.push(newUrl, { invokedBy });
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,10 @@ import { createSelector } from "reselect";
|
||||||
import { selectFeatureFlags } from "@appsmith/selectors/featureFlagsSelectors";
|
import { selectFeatureFlags } from "@appsmith/selectors/featureFlagsSelectors";
|
||||||
import type { AppState } from "@appsmith/reducers";
|
import type { AppState } from "@appsmith/reducers";
|
||||||
import { getPageActions } from "@appsmith/selectors/entitiesSelector";
|
import { getPageActions } from "@appsmith/selectors/entitiesSelector";
|
||||||
import { EditorEntityTab } from "@appsmith/entities/IDE/constants";
|
import {
|
||||||
|
EditorEntityTab,
|
||||||
|
EditorViewMode,
|
||||||
|
} from "@appsmith/entities/IDE/constants";
|
||||||
|
|
||||||
export const getIsSideBySideEnabled = createSelector(
|
export const getIsSideBySideEnabled = createSelector(
|
||||||
selectFeatureFlags,
|
selectFeatureFlags,
|
||||||
|
|
@ -11,7 +14,16 @@ export const getIsSideBySideEnabled = createSelector(
|
||||||
flags.rollout_side_by_side_enabled,
|
flags.rollout_side_by_side_enabled,
|
||||||
);
|
);
|
||||||
|
|
||||||
export const getIDEViewMode = (state: AppState) => state.ui.ide.view;
|
export const getIDEViewMode = createSelector(
|
||||||
|
getIsSideBySideEnabled,
|
||||||
|
(state) => state.ui.ide.view,
|
||||||
|
(featureFlag, ideViewMode) => {
|
||||||
|
if (featureFlag) {
|
||||||
|
return ideViewMode;
|
||||||
|
}
|
||||||
|
return EditorViewMode.FullScreen;
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
export const getPagesActiveStatus = (state: AppState) =>
|
export const getPagesActiveStatus = (state: AppState) =>
|
||||||
state.ui.ide.pagesActive;
|
state.ui.ide.pagesActive;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import React, { useEffect, useMemo, useRef, useState } from "react";
|
||||||
import styled from "styled-components";
|
import styled from "styled-components";
|
||||||
import type { MapColorObject, MapTypes } from "../constants";
|
import type { MapColorObject, MapTypes } from "../constants";
|
||||||
import type { MapData } from "./types";
|
import type { MapData } from "./types";
|
||||||
import { getChartOption, loadMap } from "./utilities";
|
import { getChartOption, loadMapGenerator } from "./utilities";
|
||||||
import * as echarts from "echarts";
|
import * as echarts from "echarts";
|
||||||
import countryDetails from "./countryDetails";
|
import countryDetails from "./countryDetails";
|
||||||
import clsx from "clsx";
|
import clsx from "clsx";
|
||||||
|
|
@ -27,6 +27,8 @@ const MapChartContainer = styled.div<{
|
||||||
export default function EchartComponent(props: MapChartComponentProps) {
|
export default function EchartComponent(props: MapChartComponentProps) {
|
||||||
const [isLoading, setIsLoading] = useState(false);
|
const [isLoading, setIsLoading] = useState(false);
|
||||||
|
|
||||||
|
const loadMap = useMemo(loadMapGenerator, []);
|
||||||
|
|
||||||
const [key, setKey] = useState(0);
|
const [key, setKey] = useState(0);
|
||||||
|
|
||||||
const { caption, colorRange, data, onDataPointClick, showLabels, type } =
|
const { caption, colorRange, data, onDataPointClick, showLabels, type } =
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ export function getSpecialAreas(map: MapTypes): GeoSpecialAreas {
|
||||||
/*
|
/*
|
||||||
* Function to load the map geojson file and register it with echarts
|
* Function to load the map geojson file and register it with echarts
|
||||||
*/
|
*/
|
||||||
export const loadMap = (() => {
|
export const loadMapGenerator = () => {
|
||||||
let abortController: AbortController | null = null;
|
let abortController: AbortController | null = null;
|
||||||
|
|
||||||
return async (type: MapTypes) => {
|
return async (type: MapTypes) => {
|
||||||
|
|
@ -85,7 +85,7 @@ export const loadMap = (() => {
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})();
|
};
|
||||||
|
|
||||||
function getProjection(type: string) {
|
function getProjection(type: string) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user