Skip to content

Commit

Permalink
Merge pull request #38146 from appsmithorg/release
Browse files Browse the repository at this point in the history
13/12 Daily Promotion
  • Loading branch information
btsgh authored Dec 13, 2024
2 parents 6689edd + 6eb44a1 commit f7b0472
Show file tree
Hide file tree
Showing 116 changed files with 3,977 additions and 493 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,9 @@ const PackageIcon = importSvg(
const ModuleIcon = importSvg(
async () => import("../__assets__/icons/ads/module.svg"),
);
const CreateModuleIcon = importSvg(
async () => import("../__assets__/icons/ads/create-module.svg"),
);
const WorkflowsIcon = importSvg(
async () => import("../__assets__/icons/ads/workflows.svg"),
);
Expand Down Expand Up @@ -1187,6 +1190,7 @@ const ICON_LOOKUP = {
"contract-right-line": ContractRight,
"copy-control": CopyIcon,
"copy2-control": Copy2Icon,
"create-module": CreateModuleIcon,
"cut-control": CutIcon,
"dashboard-line": DashboardLineIcon,
"database-2-line": Database2Line,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const _SidebarContent = (
)}
{!isMobile && (
<Button
className={styles.sidebarHeaderExpandButton}
color="neutral"
icon={
state === "full-width"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@
.sidebarContentInner {
flex-grow: 1;
overflow-y: auto;
overflow-x: hidden;
width: 100%;
}

Expand All @@ -163,13 +162,22 @@
*/
.sidebarHeader {
height: var(--sizing-13);
min-height: var(--sizing-13);
padding: 0 var(--inner-spacing-2);
border-bottom: var(--border-width-1) solid var(--color-bd-elevation-1);
}

.sidebarHeader:empty {
display: none;
}

.sidebarTitle {
position: absolute;
left: 0;
right: 0;
margin: 0 var(--sizing-14);
}

.sidebarHeaderExpandButton {
margin-inline-start: auto;
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const PluginActionToolbar = (props: PluginActionToolbarProps) => {
key={action.id}
loop
style={{ zIndex: 100 }}
width="200px"
width="204px"
>
{props.menuContent}
</MenuContent>
Expand Down
1 change: 1 addition & 0 deletions app/client/src/api/ApiResponses.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export interface APIResponseError {
code: string | number;
message: string;
errorType?: string;
}

export interface ResponseMeta {
Expand Down
4 changes: 4 additions & 0 deletions app/client/src/ce/constants/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1069,6 +1069,10 @@ export const IS_EMPTY_REPO_QUESTION = () =>
export const HOW_TO_CREATE_EMPTY_REPO = () => "How to create a new repository?";
export const IMPORT_APP_IF_NOT_EMPTY = () =>
"If you already have an app connected to Git, you can import it to the workspace.";
export const IMPORT_ARTIFACT_IF_NOT_EMPTY = (artifactType: string) =>
`If you already have an ${artifactType.toLocaleLowerCase()} connected to Git, you can import it to the workspace.`;
export const I_HAVE_EXISTING_ARTIFACT_REPO = (artifactType: string) =>
`I have an existing appsmith ${artifactType.toLocaleLowerCase()} connected to Git`;
export const I_HAVE_EXISTING_REPO = () =>
"I have an existing appsmith app connected to Git";
export const ERROR_REPO_NOT_EMPTY_TITLE = () =>
Expand Down
2 changes: 2 additions & 0 deletions app/client/src/ce/entities/DataTree/dataTreeJSAction.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ describe("generateDataTreeJSAction", () => {
myVar1: "SMART_SUBSTITUTE",
myVar2: "SMART_SUBSTITUTE",
},
actionNames: new Set(["myFun2", "myFun1"]),
};
const resultData = generateDataTreeJSAction(jsCollection);

Expand Down Expand Up @@ -389,6 +390,7 @@ describe("generateDataTreeJSAction", () => {
myVar1: "SMART_SUBSTITUTE",
myVar2: "SMART_SUBSTITUTE",
},
actionNames: new Set(["myFun2", "myFun1"]),
};

const result = generateDataTreeJSAction(jsCollection);
Expand Down
3 changes: 2 additions & 1 deletion app/client/src/ce/entities/DataTree/dataTreeJSAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const generateDataTreeJSAction = (
const dependencyMap: DependencyMap = {};

dependencyMap["body"] = [];
const actions = js.config.actions;
const actions = js.config.actions || [];
// TODO: Fix this the next time the file is edited
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const actionsData: Record<string, any> = {};
Expand Down Expand Up @@ -89,6 +89,7 @@ export const generateDataTreeJSAction = (
dynamicBindingPathList: dynamicBindingPathList,
variables: listVariables,
dependencyMap: dependencyMap,
actionNames: new Set(actions.map((action) => action.name)),
},
};
};
1 change: 1 addition & 0 deletions app/client/src/ce/entities/DataTree/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export interface JSActionEntityConfig extends EntityConfig {
moduleId?: string;
moduleInstanceId?: string;
isPublic?: boolean;
actionNames: Set<string>;
}

export interface JSActionEntity {
Expand Down
2 changes: 2 additions & 0 deletions app/client/src/ce/entities/FeatureFlag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export const FEATURE_FLAG = {
"release_table_custom_loading_state_enabled",
release_custom_widget_ai_builder: "release_custom_widget_ai_builder",
ab_request_new_integration_enabled: "ab_request_new_integration_enabled",
release_evaluation_scope_cache: "release_evaluation_scope_cache",
release_table_html_column_type_enabled:
"release_table_html_column_type_enabled",
} as const;
Expand Down Expand Up @@ -83,6 +84,7 @@ export const DEFAULT_FEATURE_FLAG_VALUE: FeatureFlags = {
release_table_custom_loading_state_enabled: false,
release_custom_widget_ai_builder: false,
ab_request_new_integration_enabled: false,
release_evaluation_scope_cache: false,
release_table_html_column_type_enabled: false,
};

Expand Down
19 changes: 13 additions & 6 deletions app/client/src/ce/workers/Evaluation/Actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ export enum ExecutionType {
/**
* This method returns new dataTree with entity function and platform function
*/
export const addDataTreeToContext = (args: {
EVAL_CONTEXT: EvalContext;
export const getDataTreeContext = (args: {
dataTree: Readonly<DataTree>;
removeEntityFunctions?: boolean;
isTriggerBased: boolean;
Expand All @@ -50,10 +49,11 @@ export const addDataTreeToContext = (args: {
const {
configTree,
dataTree,
EVAL_CONTEXT,
isTriggerBased,
removeEntityFunctions = false,
} = args;
const EVAL_CONTEXT: EvalContext = {};

const dataTreeEntries = Object.entries(dataTree);
const entityFunctionCollection: Record<string, Record<string, Function>> = {};

Expand Down Expand Up @@ -95,16 +95,23 @@ export const addDataTreeToContext = (args: {
);
}

if (removeEntityFunctions)
return removeEntityFunctionsFromEvalContext(
if (removeEntityFunctions) {
removeEntityFunctionsFromEvalContext(
entityFunctionCollection,
EVAL_CONTEXT,
);

if (!isTriggerBased) return;
return EVAL_CONTEXT;
}

if (!isTriggerBased) {
return EVAL_CONTEXT;
}

// if eval is not trigger based i.e., sync eval then we skip adding entity function to evalContext
addEntityFunctionsToEvalContext(EVAL_CONTEXT, entityFunctionCollection);

return EVAL_CONTEXT;
};

export const addEntityFunctionsToEvalContext = (
Expand Down
13 changes: 13 additions & 0 deletions app/client/src/ce/workers/Evaluation/evaluationUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1104,6 +1104,19 @@ export const isNotEntity = (entity: DataTreeEntity) => {
export const isEntityAction = (entity: DataTreeEntity) => {
return isAction(entity);
};

export const isPropertyAnEntityAction = (
entity: DataTreeEntity,
propertyPath: string,
entityConfig: DataTreeEntityConfig,
) => {
if (!isJSAction(entity)) return false;

const { actionNames } = entityConfig as JSActionEntityConfig;

return actionNames.has(propertyPath);
};

export const convertMicroDiffToDeepDiff = (
microDiffDifferences: Difference[],
): Diff<unknown, unknown>[] =>
Expand Down
9 changes: 0 additions & 9 deletions app/client/src/entities/Engine/AppViewerEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import {
waitForSegmentInit,
waitForFetchUserSuccess,
} from "ee/sagas/userSagas";
import { waitForFetchEnvironments } from "ee/sagas/EnvironmentSagas";
import { fetchJSCollectionsForView } from "actions/jsActionActions";
import {
fetchAppThemesAction,
Expand Down Expand Up @@ -154,14 +153,6 @@ export default class AppViewerEngine extends AppEngine {
yield call(waitForSegmentInit, true);
endSpan(waitForSegmentSpan);

const waitForEnvironmentsSpan = startNestedSpan(
"AppViewerEngine.waitForFetchEnvironments",
rootSpan,
);

yield call(waitForFetchEnvironments);
endSpan(waitForEnvironmentsSpan);

yield put(fetchAllPageEntityCompletion([executePageLoadActions()]));

endSpan(loadAppEntitiesSpan);
Expand Down
Loading

0 comments on commit f7b0472

Please sign in to comment.