Skip to content

Commit f12b699

Browse files
authored
Merge branch 'release' into feat/appsmith-ui-dimensions
2 parents 1b50c59 + 4583e46 commit f12b699

File tree

163 files changed

+6463
-729
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+6463
-729
lines changed

.github/workflows/ci-test-custom-script.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ jobs:
257257
- name: Install Google Chrome 129.0.6668.100
258258
run: |
259259
sudo apt-get remove google-chrome-stable
260-
wget -q https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_129.0.6668.100-1_amd64.deb
260+
wget -q https://appsmith-github-chrome-129-debian.s3.us-east-2.amazonaws.com/google-chrome-stable_129.0.6668.100-1_amd64.deb --show-progress
261261
sudo apt-get update
262262
sudo apt-get install -y ./google-chrome-stable_129.0.6668.100-1_amd64.deb
263263
echo "BROWSER_PATH=$(which google-chrome)" >> $GITHUB_ENV

app/client/src/PluginActionEditor/components/PluginActionResponse/components/BindDataButton.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
import { useDispatch, useSelector } from "react-redux";
1818
import {
1919
getCurrentApplicationId,
20+
getCurrentBasePageId,
2021
getPageList,
2122
getPagePermissions,
2223
} from "selectors/editorSelectors";
@@ -247,11 +248,11 @@ function BindDataButton(props: BindDataButtonProps) {
247248
const pagePermissions = useSelector(getPagePermissions);
248249

249250
const params = useParams<{
250-
basePageId: string;
251251
baseApiId?: string;
252252
baseQueryId?: string;
253253
moduleInstanceId?: string;
254254
}>();
255+
const currentBasePageId = useSelector(getCurrentBasePageId);
255256

256257
const isFeatureEnabled = useFeatureFlag(FEATURE_FLAG.license_gac_enabled);
257258

@@ -346,7 +347,7 @@ function BindDataButton(props: BindDataButtonProps) {
346347
params.baseQueryId ||
347348
params.moduleInstanceId) as string,
348349
applicationId: applicationId as string,
349-
basePageId: params.basePageId,
350+
basePageId: currentBasePageId,
350351
}),
351352
);
352353

app/client/src/actions/initActions.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ export interface InitEditorActionPayload {
1414
branch?: string;
1515
mode: APP_MODE;
1616
shouldInitialiseUserDetails?: boolean;
17+
staticApplicationSlug?: string;
18+
staticPageSlug?: string;
1719
}
1820

1921
export const initEditorAction = (
@@ -26,9 +28,11 @@ export const initEditorAction = (
2628
export interface InitAppViewerPayload {
2729
branch: string;
2830
baseApplicationId?: string;
29-
basePageId: string;
31+
basePageId?: string;
3032
mode: APP_MODE;
3133
shouldInitialiseUserDetails?: boolean;
34+
staticApplicationSlug?: string;
35+
staticPageSlug?: string;
3236
}
3337

3438
export const initAppViewerAction = ({
@@ -37,6 +41,8 @@ export const initAppViewerAction = ({
3741
branch,
3842
mode,
3943
shouldInitialiseUserDetails,
44+
staticApplicationSlug,
45+
staticPageSlug,
4046
}: InitAppViewerPayload) => ({
4147
type: ReduxActionTypes.INITIALIZE_PAGE_VIEWER,
4248
payload: {
@@ -45,6 +51,8 @@ export const initAppViewerAction = ({
4551
basePageId,
4652
mode,
4753
shouldInitialiseUserDetails,
54+
staticApplicationSlug,
55+
staticPageSlug,
4856
},
4957
});
5058

app/client/src/actions/pageActions.tsx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -705,3 +705,23 @@ export const navigateToAnotherPage = (
705705
type: ReduxActionTypes.NAVIGATE_TO_ANOTHER_PAGE,
706706
payload,
707707
});
708+
709+
export const persistPageSlug = (pageId: string, slug: string) => {
710+
return {
711+
type: ReduxActionTypes.PERSIST_PAGE_SLUG,
712+
payload: {
713+
pageId,
714+
slug,
715+
},
716+
};
717+
};
718+
719+
export const validatePageSlug = (pageId: string, slug: string) => {
720+
return {
721+
type: ReduxActionTypes.VALIDATE_PAGE_SLUG,
722+
payload: {
723+
pageId,
724+
slug,
725+
},
726+
};
727+
};

app/client/src/api/PageApi.tsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ export interface UpdatePageRequest {
8989
name?: string;
9090
isHidden?: boolean;
9191
customSlug?: string;
92+
uniqueSlug?: string;
9293
}
9394

9495
export interface UpdatePageResponse {
@@ -97,6 +98,7 @@ export interface UpdatePageResponse {
9798
name: string;
9899
slug: string;
99100
customSlug?: string;
101+
uniqueSlug?: string;
100102
applicationId: string;
101103
layouts: Array<PageLayout>;
102104
isHidden: boolean;
@@ -300,6 +302,20 @@ class PageApi extends Api {
300302
): Promise<AxiosPromise<FetchApplicationResponse>> {
301303
return Api.get(PageApi.url, params);
302304
}
305+
306+
static async persistPageSlug(request: {
307+
branchedPageId: string;
308+
uniquePageSlug: string;
309+
}): Promise<AxiosPromise<ApiResponse>> {
310+
return Api.patch(`${PageApi.url}/static-url`, request);
311+
}
312+
313+
static async validatePageSlug(
314+
pageId: string,
315+
uniqueSlug: string,
316+
): Promise<AxiosPromise<ApiResponse>> {
317+
return Api.get(`${PageApi.url}/${pageId}/static-url/verify/${uniqueSlug}`);
318+
}
303319
}
304320

305321
export default PageApi;

app/client/src/api/services/ConsolidatedPageLoadApi/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ export interface ConsolidatedApiParams {
22
applicationId?: string;
33
defaultPageId?: string;
44
branchName?: string;
5+
staticApplicationSlug?: string;
6+
staticPageSlug?: string;
57
}

app/client/src/ce/AppRouter.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
BUILDER_PATCH_PATH,
1515
BUILDER_PATH,
1616
BUILDER_PATH_DEPRECATED,
17+
BUILDER_PATH_STATIC,
1718
CUSTOM_WIDGETS_DEPRECATED_EDITOR_ID_PATH,
1819
CUSTOM_WIDGETS_EDITOR_ID_PATH,
1920
CUSTOM_WIDGETS_EDITOR_ID_PATH_CUSTOM,
@@ -27,6 +28,7 @@ import {
2728
VIEWER_PATCH_PATH,
2829
VIEWER_PATH,
2930
VIEWER_PATH_DEPRECATED,
31+
VIEWER_PATH_STATIC,
3032
WORKSPACE_URL,
3133
} from "constants/routes";
3234
import WorkspaceLoader from "pages/workspace/loader";
@@ -135,6 +137,9 @@ export function Routes() {
135137
{/*
136138
* End Note: When making changes to the order of the paths above
137139
*/}
140+
{/* Static URL routes that accept any page slug - must be after more specific routes */}
141+
<SentryRoute component={AppIDE} path={BUILDER_PATH_STATIC} />
142+
<SentryRoute component={AppViewerLoader} path={VIEWER_PATH_STATIC} />
138143
<Redirect from={BUILDER_PATCH_PATH} to={BUILDER_PATH} />
139144
<Redirect from={VIEWER_PATCH_PATH} to={VIEWER_PATH} />
140145
<SentryRoute component={PageNotFound} />
@@ -175,14 +180,14 @@ export default function AppRouter() {
175180
return (
176181
<Router history={history}>
177182
<Suspense fallback={loadingIndicator}>
178-
<RouteChangeListener />
179183
{safeCrash && safeCrashCode ? (
180184
<>
181185
<ErrorPageHeader />
182186
<ErrorPage code={safeCrashCode} />
183187
</>
184188
) : (
185189
<>
190+
<RouteChangeListener />
186191
<Walkthrough>
187192
<AppHeader />
188193
<Routes />

app/client/src/ce/IDE/constants/routes.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
BUILDER_CUSTOM_PATH,
66
BUILDER_PATH,
77
BUILDER_PATH_DEPRECATED,
8+
BUILDER_PATH_STATIC,
89
DATA_SOURCES_EDITOR_ID_PATH,
910
ENTITY_PATH,
1011
INTEGRATION_EDITOR_PATH,
@@ -40,6 +41,11 @@ export const EntityPaths: string[] = [
4041
];
4142
export const IDEBasePaths: Readonly<Record<IDEType, string[]>> = {
4243
[IDE_TYPE.None]: [],
43-
[IDE_TYPE.App]: [BUILDER_PATH, BUILDER_PATH_DEPRECATED, BUILDER_CUSTOM_PATH],
44+
[IDE_TYPE.App]: [
45+
BUILDER_PATH,
46+
BUILDER_PATH_DEPRECATED,
47+
BUILDER_CUSTOM_PATH,
48+
BUILDER_PATH_STATIC,
49+
],
4450
[IDE_TYPE.UIPackage]: [],
4551
};

app/client/src/ce/actions/applicationActions.ts

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,34 @@ export const updateApplication = (
7979
};
8080
};
8181

82+
export const persistAppSlug = (slug: string, onSuccess?: () => void) => {
83+
return {
84+
type: ReduxActionTypes.PERSIST_APP_SLUG,
85+
payload: {
86+
slug,
87+
onSuccess,
88+
},
89+
};
90+
};
91+
92+
export const validateAppSlug = (slug: string) => {
93+
return {
94+
type: ReduxActionTypes.VALIDATE_APP_SLUG,
95+
payload: {
96+
slug,
97+
},
98+
};
99+
};
100+
101+
export const fetchAppSlugSuggestion = (applicationId: string) => {
102+
return {
103+
type: ReduxActionTypes.FETCH_APP_SLUG_SUGGESTION,
104+
payload: {
105+
applicationId,
106+
},
107+
};
108+
};
109+
82110
export const updateCurrentApplicationIcon = (icon: IconNames) => {
83111
return {
84112
type: ReduxActionTypes.CURRENT_APPLICATION_ICON_UPDATE,
@@ -290,3 +318,28 @@ export const setIsAppSidebarPinned = (payload: boolean) => ({
290318
export const fetchAllPackages = () => {
291319
return {};
292320
};
321+
322+
export const enableStaticUrl = (slug: string, onSuccess?: () => void) => {
323+
return {
324+
type: ReduxActionTypes.ENABLE_STATIC_URL,
325+
payload: {
326+
slug,
327+
onSuccess,
328+
},
329+
};
330+
};
331+
332+
export const disableStaticUrl = (onSuccess?: () => void) => {
333+
return {
334+
type: ReduxActionTypes.DISABLE_STATIC_URL,
335+
payload: {
336+
onSuccess,
337+
},
338+
};
339+
};
340+
341+
export const resetAppSlugValidation = () => {
342+
return {
343+
type: ReduxActionTypes.RESET_APP_SLUG_VALIDATION,
344+
};
345+
};

app/client/src/ce/api/ApplicationApi.tsx

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export interface ApplicationPagePayload {
3535
slug: string;
3636
isHidden?: boolean;
3737
customSlug?: string;
38+
uniqueSlug?: string;
3839
userPermissions?: string[];
3940
}
4041

@@ -517,6 +518,52 @@ export class ApplicationApi extends Api {
517518
> {
518519
return Api.post(`${ApplicationApi.baseURL}/import/partial/block`, request);
519520
}
521+
522+
static async persistAppSlug(
523+
applicationId: string,
524+
request: {
525+
branchedApplicationId: string;
526+
uniqueApplicationSlug: string;
527+
},
528+
): Promise<AxiosPromise<ApiResponse>> {
529+
return Api.patch(
530+
`${ApplicationApi.baseURL}/${applicationId}/static-url`,
531+
request,
532+
);
533+
}
534+
535+
static async validateAppSlug(
536+
applicationId: string,
537+
uniqueSlug: string,
538+
): Promise<AxiosPromise<ApiResponse>> {
539+
return Api.get(
540+
`${ApplicationApi.baseURL}/${applicationId}/static-url/${uniqueSlug}`,
541+
);
542+
}
543+
544+
static async enableStaticUrl(
545+
applicationId: string,
546+
request: { uniqueApplicationSlug: string },
547+
): Promise<AxiosPromise<ApiResponse>> {
548+
return Api.post(
549+
`${ApplicationApi.baseURL}/${applicationId}/static-url`,
550+
request,
551+
);
552+
}
553+
554+
static async disableStaticUrl(
555+
applicationId: string,
556+
): Promise<AxiosPromise<ApiResponse>> {
557+
return Api.delete(`${ApplicationApi.baseURL}/${applicationId}/static-url`);
558+
}
559+
560+
static async fetchAppSlugSuggestion(
561+
applicationId: string,
562+
): Promise<AxiosPromise<ApiResponse>> {
563+
return Api.get(
564+
`${ApplicationApi.baseURL}/${applicationId}/static-url/suggest-app-slug`,
565+
);
566+
}
520567
}
521568

522569
export default ApplicationApi;

0 commit comments

Comments
 (0)