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
4 changes: 1 addition & 3 deletions app/client/cypress/support/Pages/DataSources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,7 @@ export class DataSources {
datasourceName,
);
this.agHelper.GetNClick(this._selectTableDropdown, 0, true);
cy.get(
`div[role="listbox"] p[kind="span"]:contains("${tableName}")`,
).click();
cy.get(`div[role="listbox"] p:contains("${tableName}")`).click();
this.agHelper.GetNClick(this._generatePageBtn);
this.assertHelper.AssertNetworkStatus("@replaceLayoutWithCRUDPage", 201);
this.agHelper.ClickButton("Got it");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* eslint-disable no-console */
import React from "react";
import { importRemixIcon, importSvg } from "./loadables";

const AddMoreIcon = importRemixIcon(
async () => import("remixicon-react/AddCircleLineIcon"),
);
Expand Down Expand Up @@ -1063,6 +1064,10 @@ const MaximizeV3Icon = importSvg(
async () => import("../__assets__/icons/ads/maximize-v3-icon.svg"),
);

const ExternalLinkIcon = importRemixIcon(
async () => import("remixicon-react/ExternalLinkLineIcon"),
);

import PlayIconPNG from "../__assets__/icons/control/play-icon.png";

function PlayIconPNGWrapper() {
Expand Down Expand Up @@ -1211,6 +1216,7 @@ const ICON_LOOKUP = {
"link-2": Link2,
"link-unlink": LinkUnlinkIcon,
"links-line": LinksLineIcon,
"external-link-line": ExternalLinkIcon,
"lock-2-line": Lock2LineIcon,
"lock-password-line": LockPasswordLineIcon,
"lock-unlock-line": LockUnlockLineIcon,
Expand Down
29 changes: 29 additions & 0 deletions app/client/src/IDE/Components/SidePaneWrapper.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { Flex } from "@appsmith/ads";
import React from "react";
import type { ReactNode } from "react";
import styled from "styled-components";

interface SidePaneContainerProps {
children?: ReactNode;
padded?: boolean;
}

const StyledContainer = styled(Flex)<Pick<SidePaneContainerProps, "padded">>`
padding: ${({ padded }) => padded && "var(--ads-v2-spaces-2)"};
`;

function SidePaneWrapper({ children, padded = false }: SidePaneContainerProps) {
return (
<StyledContainer
borderRight="1px solid var(--ads-v2-color-border)"
flexDirection="column"
height="100%"
padded={padded}
width={"100%"}
>
{children}
</StyledContainer>
);
}

export default SidePaneWrapper;
2 changes: 2 additions & 0 deletions app/client/src/IDE/Components/ToolbarSettingsPopover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ interface Props {
title: string;
children: React.ReactNode;
dataTestId?: string;
disabled?: boolean;
}

const Variables = css`
Expand Down Expand Up @@ -43,6 +44,7 @@ export const ToolbarSettingsPopover = (props: Props) => {
<PopoverTrigger>
<ToggleButton
data-testId={props.dataTestId}
disabled={props.disabled}
icon="settings-2-line"
isSelected={isOpen}
onClick={handleButtonClick}
Expand Down
5 changes: 5 additions & 0 deletions app/client/src/IDE/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ export { default as IDEBottomView } from "./Components/BottomView";
* It switches between different editor states
*/
export { default as IDESidebar } from "./Components/Sidebar";
/**
* IDESidePaneWrapper is used as a wrapper for side panes, which provides a border and optional padding
* and enforces 100% width and height to the parent.
*/
export { default as IDESidePaneWrapper } from "./Components/SidePaneWrapper";

/**
* ToolbarSettingsPopover is a popover attached to a settings toggle button in the toolbar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const PluginActionForm = () => {
const { plugin } = usePluginActionContext();

return (
<Flex flex="1" overflow="hidden" p="spaces-2" w="100%">
<Flex flex="1" overflow="hidden" p="spaces-4" w="100%">
{plugin.uiComponent === UIComponentTypes.ApiEditorForm && (
<APIEditorForm />
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const PluginActionSettingsPopover = (props: SettingsProps) => {
{props.docsLink && (
<LearnMoreLink
className="t--action-settings-documentation-link"
endIcon="share-box-line"
endIcon="external-link-line"
kind="secondary"
onClick={handleLearnMoreClick}
>
Expand Down
12 changes: 11 additions & 1 deletion app/client/src/assets/icons/menu/js-function.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions app/client/src/ce/RouteBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,3 +204,12 @@ export const queryAddURL = (props: URLBuilderParams): string =>
...props,
suffix: `queries/add`,
});

export const appLibrariesURL = (): string =>
urlBuilder.build({
suffix: "libraries",
});
export const appPackagesURL = (): string =>
urlBuilder.build({
suffix: "packages",
});
7 changes: 7 additions & 0 deletions app/client/src/ce/constants/routes/appRoutes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export const JS_COLLECTION_ID_ADD_PATH = `${JS_COLLECTION_EDITOR_PATH}/:baseColl
export const DATA_SOURCES_EDITOR_LIST_PATH = `/datasource`;
export const DATA_SOURCES_EDITOR_ID_PATH = `/datasource/:datasourceId`;
export const APP_LIBRARIES_EDITOR_PATH = `/libraries`;
export const APP_PACKAGES_EDITOR_PATH = `/packages`;
export const APP_SETTINGS_EDITOR_PATH = `/settings`;
export const SAAS_GSHEET_EDITOR_ID_PATH = `/saas/google-sheets-plugin/datasources/:datasourceId`;
export const GEN_TEMPLATE_URL = "generate-page";
Expand Down Expand Up @@ -128,6 +129,12 @@ export const matchGeneratePagePath = (pathName: string) =>
match(`${BUILDER_CUSTOM_PATH}${GENERATE_TEMPLATE_FORM_PATH}`)(pathName) ||
match(`${BUILDER_PATH_DEPRECATED}${GENERATE_TEMPLATE_FORM_PATH}`)(pathName);

export const matchAppLibrariesPath = (pathName: string) =>
match(`${BUILDER_PATH}${APP_LIBRARIES_EDITOR_PATH}`)(pathName);

export const matchAppPackagesPath = (pathName: string) =>
match(`${BUILDER_PATH}${APP_PACKAGES_EDITOR_PATH}`)(pathName);

export const addBranchParam = (branch: string) => {
const url = new URL(window.location.href);

Expand Down
1 change: 1 addition & 0 deletions app/client/src/ce/entities/Engine/actionHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export const getPageDependencyActions = (
currentWorkspaceId: string = "",
featureFlags: DependentFeatureFlags = {},
allResponses: EditConsolidatedApi,
applicationId: string,
) => {
const { datasources, pagesWithMigratedDsl, plugins } = allResponses || {};
const initActions = [
Expand Down
3 changes: 3 additions & 0 deletions app/client/src/ce/entities/FeatureFlag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ export const FEATURE_FLAG = {
release_anvil_toggle_enabled: "release_anvil_toggle_enabled",
release_git_persist_branch_enabled: "release_git_persist_branch_enabled",
release_ide_animations_enabled: "release_ide_animations_enabled",
release_table_custom_loading_state_enabled:
"release_table_custom_loading_state_enabled",
} as const;

export type FeatureFlag = keyof typeof FEATURE_FLAG;
Expand Down Expand Up @@ -74,6 +76,7 @@ export const DEFAULT_FEATURE_FLAG_VALUE: FeatureFlags = {
release_anvil_toggle_enabled: false,
release_git_persist_branch_enabled: false,
release_ide_animations_enabled: false,
release_table_custom_loading_state_enabled: false,
};

export const AB_TESTING_EVENT_KEYS = {
Expand Down
12 changes: 12 additions & 0 deletions app/client/src/ce/pages/Editor/IDE/Header/useLibraryHeaderTitle.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { createMessage, HEADER_TITLES } from "ee/constants/messages";

/**
* In CE this returns a simple text as title but this
* hook is extended in EE where based on feature flags
* the title changes
*/
function useLibraryHeaderTitle() {
return createMessage(HEADER_TITLES.LIBRARIES);
}

export default useLibraryHeaderTitle;
13 changes: 13 additions & 0 deletions app/client/src/ce/pages/Editor/IDE/LeftPane/LibrarySidePane.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React from "react";
import JSLibrariesSection from "pages/Editor/IDE/LeftPane/JSLibrariesSection";
import { IDESidePaneWrapper } from "IDE";

const LibrarySidePane = () => {
return (
<IDESidePaneWrapper>
<JSLibrariesSection />
</IDESidePaneWrapper>
);
};

export default LibrarySidePane;
2 changes: 2 additions & 0 deletions app/client/src/ce/pages/Editor/IDE/MainPane/useRoutes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
API_EDITOR_ID_ADD_PATH,
API_EDITOR_ID_PATH,
APP_LIBRARIES_EDITOR_PATH,
APP_PACKAGES_EDITOR_PATH,
APP_SETTINGS_EDITOR_PATH,
BUILDER_CHECKLIST_PATH,
BUILDER_CUSTOM_PATH,
Expand Down Expand Up @@ -82,6 +83,7 @@ function useRoutes(path: string): RouteReturnType[] {
`${path}${SAAS_EDITOR_API_ID_PATH}`,
`${path}${SAAS_EDITOR_API_ID_ADD_PATH}`,
`${path}${APP_LIBRARIES_EDITOR_PATH}`,
`${path}${APP_PACKAGES_EDITOR_PATH}`,
`${path}${APP_SETTINGS_EDITOR_PATH}`,
],
},
Expand Down
2 changes: 1 addition & 1 deletion app/client/src/ce/utils/serviceWorkerUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
VIEWER_CUSTOM_PATH,
BUILDER_PATH_DEPRECATED,
VIEWER_PATH_DEPRECATED,
} from "ee/constants/routes/appRoutes";
} from "../constants/routes/appRoutes";

interface TMatchResult {
basePageId?: string;
Expand Down
1 change: 1 addition & 0 deletions app/client/src/constants/AppConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export const CANVAS_DEFAULT_MIN_ROWS = Math.ceil(
export const DEFAULT_ENTITY_EXPLORER_WIDTH = 256;
export const DEFAULT_PROPERTY_PANE_WIDTH = 288;
export const APP_SETTINGS_PANE_WIDTH = 525;
export const APP_LIBRARIES_PANE_WIDTH = 384;
export const DEFAULT_EXPLORER_PANE_WIDTH = 255;
export const SPLIT_SCREEN_RATIO = 0.404;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export * from "ce/pages/Editor/IDE/Header/useLibraryHeaderTitle";
import { default as CE_useLibraryHeaderTitle } from "ce/pages/Editor/IDE/Header/useLibraryHeaderTitle";
export default CE_useLibraryHeaderTitle;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export * from "ce/pages/Editor/IDE/LeftPane/LibrarySidePane";
import { default as CE_LibrarySidePane } from "ce/pages/Editor/IDE/LeftPane/LibrarySidePane";
export default CE_LibrarySidePane;
15 changes: 13 additions & 2 deletions app/client/src/entities/Engine/AppEditorEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ export default class AppEditorEngine extends AppEngine {
private *loadPluginsAndDatasources(
allResponses: EditConsolidatedApi,
rootSpan: Span,
applicationId: string,
) {
const loadPluginsAndDatasourcesSpan = startNestedSpan(
"AppEditorEngine.loadPluginsAndDatasources",
Expand All @@ -211,7 +212,12 @@ export default class AppEditorEngine extends AppEngine {
getFeatureFlagsForEngine,
);
const { errorActions, initActions, successActions } =
getPageDependencyActions(currentWorkspaceId, featureFlags, allResponses);
getPageDependencyActions(
currentWorkspaceId,
featureFlags,
allResponses,
applicationId,
);

if (!isAirgappedInstance) {
initActions.push(fetchMockDatasources(mockDatasources));
Expand Down Expand Up @@ -259,7 +265,12 @@ export default class AppEditorEngine extends AppEngine {
allResponses,
rootSpan,
);
yield call(this.loadPluginsAndDatasources, allResponses, rootSpan);
yield call(
this.loadPluginsAndDatasources,
allResponses,
rootSpan,
applicationId,
);
}

public *completeChore(rootSpan: Span) {
Expand Down
5 changes: 4 additions & 1 deletion app/client/src/navigation/FocusEntity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,10 @@ export function identifyEntityFromPath(path: string): FocusEntityInfo {
}

if (match.params.entity) {
if (match.params.entity === "libraries") {
if (
match.params.entity === "libraries" ||
match.params.entity === "packages"
) {
return {
entity: FocusEntity.LIBRARY,
id: "",
Expand Down
10 changes: 4 additions & 6 deletions app/client/src/pages/Editor/IDE/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ import type { Page } from "entities/Page";
import { IDEHeader, IDEHeaderTitle } from "IDE";
import { APPLICATIONS_URL } from "constants/routes";
import { useNavigationMenuData } from "../../EditorName/useNavigationMenuData";
import useLibraryHeaderTitle from "ee/pages/Editor/IDE/Header/useLibraryHeaderTitle";

const StyledDivider = styled(Divider)`
height: 50%;
Expand All @@ -92,6 +93,8 @@ interface HeaderTitleProps {
}

const HeaderTitleComponent = ({ appState, currentPage }: HeaderTitleProps) => {
const libraryHeaderTitle = useLibraryHeaderTitle();

switch (appState) {
case EditorState.DATA:
return (
Expand All @@ -110,12 +113,7 @@ const HeaderTitleComponent = ({ appState, currentPage }: HeaderTitleProps) => {
/>
);
case EditorState.LIBRARIES:
return (
<IDEHeaderTitle
key={appState}
title={createMessage(HEADER_TITLES.LIBRARIES)}
/>
);
return <IDEHeaderTitle key={appState} title={libraryHeaderTitle} />;
default:
return <EditorTitle key={appState} title={currentPage?.pageName || ""} />;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
import {
APP_SETTINGS_PANE_WIDTH,
APP_SIDEBAR_WIDTH,
APP_LIBRARIES_PANE_WIDTH,
} from "constants/AppConstants";
import { useEditorStateLeftPaneWidth } from "./useEditorStateLeftPaneWidth";
import { type Area, Areas, SIDEBAR_WIDTH } from "../constants";
Expand Down Expand Up @@ -97,10 +98,10 @@ function useGridLayoutTemplate(): ReturnValue {
} else {
setColumns([
SIDEBAR_WIDTH,
"255px",
`${APP_LIBRARIES_PANE_WIDTH}px`,
(windowWidth -
APP_SIDEBAR_WIDTH -
255 +
APP_LIBRARIES_PANE_WIDTH +
"px") as AnimatedGridUnit,
"0px",
]);
Expand Down
Loading