feat: add icon style in application settings (#30418)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new setting for users to select icon styles within the application theme. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
parent
646231ff4c
commit
c035806edf
|
|
@ -423,6 +423,9 @@ public class Application extends BaseDomain implements ImportableArtifact {
|
|||
@JsonView(Views.Public.class)
|
||||
Type colorMode;
|
||||
|
||||
@JsonView(Views.Public.class)
|
||||
IconStyle iconStyle;
|
||||
|
||||
public ThemeSetting(Type colorMode) {
|
||||
this.colorMode = colorMode;
|
||||
}
|
||||
|
|
@ -431,5 +434,10 @@ public class Application extends BaseDomain implements ImportableArtifact {
|
|||
LIGHT,
|
||||
DARK
|
||||
}
|
||||
|
||||
public enum IconStyle {
|
||||
OUTLINED,
|
||||
FILLED
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2809,6 +2809,7 @@ public class ApplicationServiceCETest {
|
|||
themeSettings.setDensity(1);
|
||||
themeSettings.setSizing(1);
|
||||
themeSettings.setColorMode(Application.ThemeSetting.Type.LIGHT);
|
||||
themeSettings.setIconStyle(Application.ThemeSetting.IconStyle.OUTLINED);
|
||||
testApplication.getUnpublishedApplicationDetail().setThemeSetting(themeSettings);
|
||||
|
||||
Mono<Application> applicationMono = applicationPageService
|
||||
|
|
|
|||
|
|
@ -2864,6 +2864,7 @@ public class GitServiceCETest {
|
|||
themeSettings.setAccentColor("#FFFFFF");
|
||||
themeSettings.setFontFamily("#000000");
|
||||
themeSettings.setColorMode(Application.ThemeSetting.Type.LIGHT);
|
||||
themeSettings.setIconStyle(Application.ThemeSetting.IconStyle.OUTLINED);
|
||||
branchedApplication.getUnpublishedApplicationDetail().setThemeSetting(themeSettings);
|
||||
return Mono.just(branchedApplication);
|
||||
})
|
||||
|
|
@ -2892,6 +2893,7 @@ public class GitServiceCETest {
|
|||
assertThat(themes.getDensity()).isEqualTo(1);
|
||||
assertThat(themes.getFontFamily()).isEqualTo("#000000");
|
||||
assertThat(themes.getSizing()).isEqualTo(1);
|
||||
assertThat(themes.getIconStyle()).isEqualTo(Application.ThemeSetting.IconStyle.OUTLINED);
|
||||
})
|
||||
.verifyComplete();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -841,6 +841,11 @@ public class ImportApplicationServiceTests {
|
|||
.getThemeSetting()
|
||||
.getSizing())
|
||||
.isEqualTo(1);
|
||||
assertThat(exportedApp
|
||||
.getApplicationDetail()
|
||||
.getThemeSetting()
|
||||
.getIconStyle())
|
||||
.isEqualTo(Application.ThemeSetting.IconStyle.OUTLINED);
|
||||
|
||||
assertThat(exportedApp.getPolicies()).isNull();
|
||||
assertThat(exportedApp.getUserPermissions()).isNull();
|
||||
|
|
@ -2500,6 +2505,7 @@ public class ImportApplicationServiceTests {
|
|||
assertThat(themes.getDensity()).isEqualTo(1);
|
||||
assertThat(themes.getFontFamily()).isEqualTo("#000000");
|
||||
assertThat(themes.getSizing()).isEqualTo(1);
|
||||
assertThat(themes.getIconStyle()).isEqualTo(Application.ThemeSetting.IconStyle.OUTLINED);
|
||||
})
|
||||
.verifyComplete();
|
||||
// Import the same application again
|
||||
|
|
@ -2535,6 +2541,7 @@ public class ImportApplicationServiceTests {
|
|||
themeSettings.setAccentColor("#FFFFFF");
|
||||
themeSettings.setFontFamily("#000000");
|
||||
themeSettings.setColorMode(Application.ThemeSetting.Type.LIGHT);
|
||||
themeSettings.setIconStyle(Application.ThemeSetting.IconStyle.OUTLINED);
|
||||
return themeSettings;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user