From 22a0d3ded988e9478430793f9644a4cb8d673f35 Mon Sep 17 00:00:00 2001 From: Dmitry Kurmanov Date: Tue, 6 Feb 2024 16:40:26 +0400 Subject: [PATCH] PR: Popup Survey - Introduce a "full screen" mode (#7724) * work for the https://github.com/surveyjs/survey-library/issues/7518 * work for the https://github.com/surveyjs/survey-library/issues/7518 * work for the https://github.com/surveyjs/survey-library/issues/7518 * work for the https://github.com/surveyjs/survey-library/issues/7518 (lint) * work for the https://github.com/surveyjs/survey-library/issues/7518 * work for the https://github.com/surveyjs/survey-library/issues/7518 * fixed https://github.com/surveyjs/survey-library/issues/7762 * work for the https://github.com/surveyjs/survey-library/issues/7518 * work for the https://github.com/surveyjs/survey-library/issues/7518 * work for the https://github.com/surveyjs/survey-library/issues/7518 * work for the https://github.com/surveyjs/survey-library/issues/7518 * work for the https://github.com/surveyjs/survey-library/issues/7518 * work for the https://github.com/surveyjs/survey-library/issues/7518 * work for the https://github.com/surveyjs/survey-library/issues/7518 * work for the https://github.com/surveyjs/survey-library/issues/7518 * work for the https://github.com/surveyjs/survey-library/issues/7518 * work for the https://github.com/surveyjs/survey-library/issues/7518 --- .../app/components/test/test.component.html | 2 +- .../src/popup.survey.component.html | 5 ++ .../src/popup.survey.component.ts | 4 ++ .../src/components/test/TestCommon.vue | 2 +- packages/survey-vue3-ui/src/PopupSurvey.vue | 12 +++++ src/common-styles/window.scss | 38 +++++++++++++-- src/defaultCss/cssmodern.ts | 4 +- src/defaultCss/cssstandard.ts | 4 +- src/defaultCss/defaultV2Css.ts | 4 +- src/defaultV2-theme/blocks/mixins.scss | 2 +- src/entries/angular.ts | 3 ++ src/entries/jquery.ts | 17 ++++--- src/images/back-to-panel_16x16.svg | 3 ++ src/images/full-screen_16x16.svg | 3 ++ src/knockout/koPopupSurvey.ts | 3 ++ src/knockout/templates/window.html | 11 +++++ src/popup-survey.ts | 45 +++++++++++++++++- src/react/react-popup-survey.tsx | 22 +++++++++ src/vue/popup-survey.vue | 17 +++++++ testCafe/helper.js | 7 +-- tests/surveyWindowTests.ts | 17 +++++++ .../etalons/survey-popup--collapsed.png | Bin 5741 -> 6319 bytes .../etalons/survey-popup--full-screen.png | Bin 0 -> 36474 bytes .../tests/defaultV2/etalons/survey-popup.png | Bin 27533 -> 27364 bytes .../tests/defaultV2/survey-popup.ts | 11 ++++- 25 files changed, 213 insertions(+), 23 deletions(-) create mode 100644 src/images/back-to-panel_16x16.svg create mode 100644 src/images/full-screen_16x16.svg create mode 100644 visualRegressionTests/tests/defaultV2/etalons/survey-popup--full-screen.png diff --git a/packages/survey-angular-ui/example/src/app/components/test/test.component.html b/packages/survey-angular-ui/example/src/app/components/test/test.component.html index ab353b43a7..61d0842602 100644 --- a/packages/survey-angular-ui/example/src/app/components/test/test.component.html +++ b/packages/survey-angular-ui/example/src/app/components/test/test.component.html @@ -1,4 +1,4 @@
- +
\ No newline at end of file diff --git a/packages/survey-angular-ui/src/popup.survey.component.html b/packages/survey-angular-ui/src/popup.survey.component.html index 61bc448d43..521e4cc5e2 100644 --- a/packages/survey-angular-ui/src/popup.survey.component.html +++ b/packages/survey-angular-ui/src/popup.survey.component.html @@ -5,6 +5,11 @@ {{popup.locTitle.renderedHtml}}
+
+ + +
+
diff --git a/packages/survey-angular-ui/src/popup.survey.component.ts b/packages/survey-angular-ui/src/popup.survey.component.ts index df81964457..59b84b0274 100644 --- a/packages/survey-angular-ui/src/popup.survey.component.ts +++ b/packages/survey-angular-ui/src/popup.survey.component.ts @@ -11,6 +11,7 @@ export class PopupSurveyComponent extends BaseAngular implemen @Input() isExpanded?: boolean; @Input() allowClose?: boolean; @Input() closeOnCompleteTimeout?: number; + @Input() allowFullScreen?: boolean; public popup!: PopupSurveyModel; constructor(changeDetectorRef: ChangeDetectorRef) { @@ -41,6 +42,9 @@ export class PopupSurveyComponent extends BaseAngular implemen if (this.allowClose !== undefined) { this.popup.allowClose = this.allowClose; } + if (this.allowFullScreen !== undefined) { + this.popup.allowFullScreen = this.allowFullScreen; + } if (this.closeOnCompleteTimeout !== undefined) { this.popup.closeOnCompleteTimeout = this.closeOnCompleteTimeout; } diff --git a/packages/survey-vue3-ui/example/src/components/test/TestCommon.vue b/packages/survey-vue3-ui/example/src/components/test/TestCommon.vue index 4cac99f668..9125b10fcf 100644 --- a/packages/survey-vue3-ui/example/src/components/test/TestCommon.vue +++ b/packages/survey-vue3-ui/example/src/components/test/TestCommon.vue @@ -15,7 +15,7 @@ const isExpanded = shallowRef();