WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 01ca77b

Browse files
authored
Merge pull request #40571 from appsmithorg/release
05/05 Daily Promotion
2 parents 8a27ddc + b310d75 commit 01ca77b

File tree

9 files changed

+74
-23
lines changed

9 files changed

+74
-23
lines changed

app/client/src/ce/constants/messages.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1627,6 +1627,8 @@ export const PROPERTY_PANE_EMPTY_SEARCH_RESULT_MESSAGE =
16271627
"No properties found based on your search";
16281628
export const PROPERTY_SEARCH_INPUT_PLACEHOLDER =
16291629
"Search for controls, labels etc";
1630+
export const PROPERTY_PANE_TITLE_RENAME_DISABLED = () =>
1631+
"This widget cannot be renamed";
16301632
export const EXPLORER_BETA_ENTITY = () => "BETA";
16311633
export const BINDING_WIDGET_WALKTHROUGH_TITLE = () => "Widget properties";
16321634
export const BINDING_WIDGET_WALKTHROUGH_DESC = () =>

app/client/src/pages/Editor/PropertyPane/PropertyPaneTitle.tsx

Lines changed: 35 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ import {
2323
getIsCurrentWidgetRecentlyAdded,
2424
getPropertyPaneWidth,
2525
} from "selectors/propertyPaneSelectors";
26+
import {
27+
createMessage,
28+
PROPERTY_PANE_TITLE_RENAME_DISABLED,
29+
} from "ee/constants/messages";
2630

2731
interface PropertyPaneTitleProps {
2832
title: string;
@@ -31,6 +35,7 @@ interface PropertyPaneTitleProps {
3135
updatePropertyTitle?: (title: string) => void;
3236
onBackClick?: () => void;
3337
isPanelTitle?: boolean;
38+
isRenameDisabled?: boolean;
3439
actions: Array<{
3540
tooltipContent: string;
3641
icon: ReactElement;
@@ -186,22 +191,36 @@ const PropertyPaneTitle = memo(function PropertyPaneTitle(
186191
className="flex-grow"
187192
onKeyDown={handleTabKeyDown}
188193
>
189-
<EditableText
190-
className="flex-grow text-lg font-semibold t--property-pane-title"
191-
defaultValue={name}
192-
editInteractionKind={EditInteractionKind.SINGLE}
193-
fill
194-
hideEditIcon
195-
isEditingDefault={isEditingDefault}
196-
onBlur={!props.isPanelTitle ? updateTitle : undefined}
197-
onBlurEverytime={handleOnBlurEverytime}
198-
onTextChanged={!props.isPanelTitle ? undefined : updateNewTitle}
199-
placeholder={props.title}
200-
savingState={updating ? SavingState.STARTED : SavingState.NOT_STARTED}
201-
underline
202-
valueTransform={!props.isPanelTitle ? removeSpecialChars : undefined}
203-
wrapperRef={containerRef}
204-
/>
194+
{props.isRenameDisabled ? (
195+
<div className="flex-grow text-lg font-semibold t--property-pane-title">
196+
<Tooltip
197+
content={createMessage(PROPERTY_PANE_TITLE_RENAME_DISABLED)}
198+
>
199+
<div>{name}</div>
200+
</Tooltip>
201+
</div>
202+
) : (
203+
<EditableText
204+
className="flex-grow text-lg font-semibold t--property-pane-title"
205+
defaultValue={name}
206+
editInteractionKind={EditInteractionKind.SINGLE}
207+
fill
208+
hideEditIcon
209+
isEditingDefault={isEditingDefault}
210+
onBlur={!props.isPanelTitle ? updateTitle : undefined}
211+
onBlurEverytime={handleOnBlurEverytime}
212+
onTextChanged={!props.isPanelTitle ? undefined : updateNewTitle}
213+
placeholder={props.title}
214+
savingState={
215+
updating ? SavingState.STARTED : SavingState.NOT_STARTED
216+
}
217+
underline
218+
valueTransform={
219+
!props.isPanelTitle ? removeSpecialChars : undefined
220+
}
221+
wrapperRef={containerRef}
222+
/>
223+
)}
205224
</StyledEditableContainer>
206225

207226
{/* ACTIONS */}

app/client/src/pages/Editor/PropertyPane/PropertyPaneView.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ function PropertyPaneView(
287287
>
288288
<PropertyPaneTitle
289289
actions={actions}
290+
isRenameDisabled={widgetProperties?.isRenameDisabled}
290291
key={widgetProperties.widgetId}
291292
title={widgetProperties.widgetName}
292293
widgetId={widgetProperties.widgetId}

app/client/src/selectors/editorSelectors.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,10 @@ export const getCurrentPageName = createSelector(
335335
?.pageName,
336336
);
337337

338+
const isModuleWidget = (
339+
config: ReturnType<typeof WidgetFactory.getConfigs>[string],
340+
) => config.type.startsWith("MODULE_WIDGET_");
341+
338342
export const getWidgetCards = createSelector(
339343
getIsAutoLayout,
340344
getIsAnvilLayout,
@@ -357,7 +361,7 @@ export const getWidgetCards = createSelector(
357361
return config.widgetName !== "Map" && !config.hideCard;
358362
}
359363

360-
return !config.hideCard;
364+
return !config.hideCard && !isModuleWidget(config);
361365
});
362366

363367
const _cards: WidgetCardProps[] = cards.map((config) => {

app/server/appsmith-git/src/main/java/com/appsmith/git/files/FileUtilsCEImpl.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,15 +1268,25 @@ public Mono<Object> reconstructMetadataFromGitRepository(Path repoSuffix) {
12681268

12691269
@Override
12701270
public Mono<Object> reconstructPageFromGitRepo(
1271-
String pageName, String branchName, Path baseRepoSuffixPath, Boolean resetToLastCommitRequired) {
1271+
String pageName,
1272+
String branchName,
1273+
Path baseRepoSuffixPath,
1274+
Boolean resetToLastCommitRequired,
1275+
Boolean useFSGitHandler,
1276+
Boolean keepWorkingDirChanges) {
12721277
Mono<Object> pageObjectMono;
12731278
try {
12741279
Mono<Boolean> resetToLastCommit = Mono.just(Boolean.TRUE);
12751280

12761281
if (Boolean.TRUE.equals(resetToLastCommitRequired)) {
12771282
// instead of checking out to last branch we are first cleaning the git repo,
12781283
// then checking out to the desired branch
1279-
resetToLastCommit = gitExecutor.resetToLastCommit(baseRepoSuffixPath, branchName, false);
1284+
if (Boolean.TRUE.equals(useFSGitHandler)) {
1285+
resetToLastCommit =
1286+
fsGitHandler.resetToLastCommit(baseRepoSuffixPath, branchName, keepWorkingDirChanges);
1287+
} else {
1288+
resetToLastCommit = gitExecutor.resetToLastCommit(baseRepoSuffixPath, branchName, true);
1289+
}
12801290
}
12811291

12821292
pageObjectMono = resetToLastCommit.map(isSwitched -> {

app/server/appsmith-interfaces/src/main/java/com/appsmith/external/enums/FeatureFlagEnum.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public enum FeatureFlagEnum {
2424
* Feature flag to detect if the RTS git reset is enabled
2525
*/
2626
ab_rts_git_reset_enabled,
27+
release_git_api_contracts_enabled,
2728

2829
// Deprecated CE flags over here
2930
release_git_autocommit_feature_enabled,

app/server/appsmith-interfaces/src/main/java/com/appsmith/external/git/FileInterface.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,12 @@ Mono<Object> reconstructMetadataFromGitRepo(
8080
Mono<Object> reconstructPackageJsonFromGitRepository(Path repoSuffix);
8181

8282
Mono<Object> reconstructPageFromGitRepo(
83-
String pageName, String branchName, Path repoSuffixPath, Boolean checkoutRequired);
83+
String pageName,
84+
String branchName,
85+
Path repoSuffixPath,
86+
Boolean checkoutRequired,
87+
Boolean useFSGitHandler,
88+
Boolean keepWorkingDirChanges);
8489

8590
/**
8691
* Once the user connects the existing application to a remote repo, we will initialize the repo with Readme.md -

app/server/appsmith-plugins/snowflakePlugin/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<dependency>
1919
<groupId>net.snowflake</groupId>
2020
<artifactId>snowflake-jdbc</artifactId>
21-
<version>3.22.0</version>
21+
<version>3.23.1</version>
2222
</dependency>
2323

2424
<dependency>

app/server/appsmith-server/src/main/java/com/appsmith/server/helpers/ce/CommonGitFileUtilsCE.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -933,6 +933,9 @@ public Mono<JSONObject> getPageDslVersionNumber(
933933
String defaultArtifactId = gitArtifactMetadata.getDefaultArtifactId();
934934
String refName = gitArtifactMetadata.getRefName();
935935
String repoName = gitArtifactMetadata.getRepoName();
936+
Mono<Boolean> useFSGitHandlerMono = featureFlagService.check(FeatureFlagEnum.release_git_api_contracts_enabled);
937+
Mono<Boolean> keepWorkingDirChangesMono =
938+
featureFlagService.check(FeatureFlagEnum.release_git_reset_optimization_enabled);
936939

937940
if (!hasText(workspaceId)) {
938941
return Mono.error(new AppsmithException(AppsmithError.INVALID_PARAMETER, FieldName.WORKSPACE_ID));
@@ -957,8 +960,14 @@ public Mono<JSONObject> getPageDslVersionNumber(
957960
ArtifactGitFileUtils<?> artifactGitFileUtils = getArtifactBasedFileHelper(artifactType);
958961
Path baseRepoSuffix = artifactGitFileUtils.getRepoSuffixPath(workspaceId, defaultArtifactId, repoName);
959962

960-
Mono<JSONObject> jsonObjectMono = fileUtils
961-
.reconstructPageFromGitRepo(pageDTO.getName(), refName, baseRepoSuffix, isResetToLastCommitRequired)
963+
Mono<JSONObject> jsonObjectMono = Mono.zip(useFSGitHandlerMono, keepWorkingDirChangesMono)
964+
.flatMap(tuple -> fileUtils.reconstructPageFromGitRepo(
965+
pageDTO.getName(),
966+
refName,
967+
baseRepoSuffix,
968+
isResetToLastCommitRequired,
969+
tuple.getT1(),
970+
tuple.getT2()))
962971
.onErrorResume(error -> Mono.error(
963972
new AppsmithException(AppsmithError.GIT_ACTION_FAILED, RECONSTRUCT_PAGE, error.getMessage())))
964973
.map(pageJson -> {

0 commit comments

Comments
 (0)