Skip to content

Commit

Permalink
Fixed surveyjs/survey-library#7670 - The headerView property should b…
Browse files Browse the repository at this point in the history
…e saved in theme JSON
  • Loading branch information
tsv2013 committed Jan 16, 2024
1 parent 56bdadd commit 4b0d2e5
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 8 deletions.
3 changes: 1 addition & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
},
"[typescript]": {
"editor.codeActionsOnSave": {
"source.fixAll": true,
//"source.organizeImports": true, // be vare of https://github.com/microsoft/vscode-typescript-tslint-plugin/issues/51
"source.fixAll": "explicit"
},
"editor.defaultFormatter": "vscode.typescript-language-features"
},
Expand Down
3 changes: 1 addition & 2 deletions packages/survey-creator-core/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
},
"[typescript]": {
"editor.codeActionsOnSave": {
"source.fixAll": true,
//"source.organizeImports": true, // be vare of https://github.com/microsoft/vscode-typescript-tslint-plugin/issues/51
"source.fixAll": "explicit"
}
},
// "typescript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,7 @@ export class ThemeBuilder extends Base {
fontsettingsToCssVariable(options.question.panels[0].getElementByName("headerTitle"), this.themeCssVariablesChanges);
fontsettingsToCssVariable(options.question.panels[0].getElementByName("headerDescription"), this.themeCssVariablesChanges);
}
this.currentTheme.headerView = headerSettings["headerView"];
this.themeModified(options);
}
private shadowInnerPropertiesChanged(options: ValueChangedEvent) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1173,6 +1173,13 @@ test("Theme onModified and saveThemeFunc", (): any => {
expect(saveThemeCount).toBe(4);
expect(creator.hasPendingThemeChanges).toBeFalsy();
expect(themePlugin.isModified).toBeTruthy();

themeEditor.getQuestionByName("headerViewContainer").value = [{ headerView: "advanced" }];
expect(modificationsLog).toBe("->THEME_MODIFIED->THEME_SELECTED->THEME_MODIFIED->THEME_MODIFIED->THEME_MODIFIED");
expect(saveCount).toBe(1);
expect(saveThemeCount).toBe(5);
expect(creator.hasPendingThemeChanges).toBeFalsy();
expect(themePlugin.isModified).toBeTruthy();
});

test("Theme undo redo changes", (): any => {
Expand Down
3 changes: 1 addition & 2 deletions packages/survey-creator-knockout/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
},
"[typescript]": {
"editor.codeActionsOnSave": {
"source.fixAll": true,
//"source.organizeImports": true, // be vare of https://github.com/microsoft/vscode-typescript-tslint-plugin/issues/51
"source.fixAll": "explicit"
}
},
// "typescript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
Expand Down
3 changes: 1 addition & 2 deletions packages/survey-creator-react/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
},
"[typescript]": {
"editor.codeActionsOnSave": {
"source.fixAll": true,
//"source.organizeImports": true, // be vare of https://github.com/microsoft/vscode-typescript-tslint-plugin/issues/51
"source.fixAll": "explicit"
}
},
// "typescript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
Expand Down

0 comments on commit 4b0d2e5

Please sign in to comment.