feat: Collapse invisible widgets Field for Auto-height (#20142)

## Description

> This PR implements the backend APIs for Invisible widgets in
Auto-height containers
> Notion doc here:
https://www.notion.so/appsmith/Invisible-widgets-in-auto-height-containers-460c6bf4e0a342e4a1fa4955f7f6c461
> Frontend feature implementation here:
https://github.com/appsmithorg/appsmith/pull/20118

Fixes #19983 


## Type of change

- New feature (non-breaking change which adds functionality)


## How Has This Been Tested?

- Manual
- JUnit

## Checklist:
### Dev activity
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] PR is being merged under a feature flag


### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test
This commit is contained in:
Nilansh Bansal 2023-01-27 23:13:20 +05:30 committed by GitHub
parent 1c3812c142
commit ad2c9c060b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 0 deletions

View File

@ -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<String, String> pageIdToNameMap) {

View File

@ -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);

View File

@ -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<PermissionGroup> permissionGroups = tuple2.getT3();
PermissionGroup adminPermissionGroup = permissionGroups.stream()