diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/domains/Application.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/domains/Application.java index 7ef804c03a..7da580c899 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/domains/Application.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/domains/Application.java @@ -123,6 +123,8 @@ public class Application extends BaseDomain { @JsonIgnore AppPositioning unpublishedAppPositioning; + Boolean collapseInvisibleWidgets; + /** * Earlier this was returning value of the updatedAt property in the base domain. * As this property is modified by the framework when there is any change in domain, @@ -192,6 +194,7 @@ public class Application extends BaseDomain { this.unpublishedNavigationSetting = application.getUnpublishedNavigationSetting() == null ? null : new NavigationSetting(); this.publishedNavigationSetting = application.getPublishedNavigationSetting() == null ? null : new NavigationSetting(); this.unpublishedCustomJSLibs = application.getUnpublishedCustomJSLibs(); + this.collapseInvisibleWidgets = application.getCollapseInvisibleWidgets(); } public void exportApplicationPages(final Map pageIdToNameMap) { diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/ApplicationPageServiceCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/ApplicationPageServiceCEImpl.java index 2f4bbb6224..d290edb877 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/ApplicationPageServiceCEImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/ApplicationPageServiceCEImpl.java @@ -318,6 +318,7 @@ public class ApplicationPageServiceCEImpl implements ApplicationPageServiceCE { application.setPublishedPages(new ArrayList<>()); application.setUnpublishedCustomJSLibs(new HashSet<>()); + application.setCollapseInvisibleWidgets(Boolean.TRUE); // For all new applications being created, set it to use the latest evaluation version. application.setEvaluationVersion(EVALUATION_VERSION); diff --git a/app/server/appsmith-server/src/test/java/com/appsmith/server/services/ce/ApplicationServiceCETest.java b/app/server/appsmith-server/src/test/java/com/appsmith/server/services/ce/ApplicationServiceCETest.java index 4db22e5a6e..3354570827 100644 --- a/app/server/appsmith-server/src/test/java/com/appsmith/server/services/ce/ApplicationServiceCETest.java +++ b/app/server/appsmith-server/src/test/java/com/appsmith/server/services/ce/ApplicationServiceCETest.java @@ -345,6 +345,7 @@ public class ApplicationServiceCETest { assertThat(application.getColor()).isNotEmpty(); assertThat(application.getEditModeThemeId()).isEqualTo(defaultThemeId); assertThat(application.getPublishedModeThemeId()).isEqualTo(defaultThemeId); + assertThat(application.getCollapseInvisibleWidgets()).isEqualTo(TRUE); List permissionGroups = tuple2.getT3(); PermissionGroup adminPermissionGroup = permissionGroups.stream()