From 897a082539e843c52991014254cece6703f10deb Mon Sep 17 00:00:00 2001 From: Zong Xun <63457492+Zxun2@users.noreply.github.com> Date: Tue, 4 Jul 2023 04:19:34 +0800 Subject: [PATCH] [#12275] Instructor edit sessions page: Fix preview sessions button overflow (#12492) * fix: buttons overflow * test: update * fix: stylings in small screen * lint: fix * fix: update snapshots and linting * fix: adjust stylings when no students * fix: optimize css * fix: update snapshots * fix: update stylings for help page --------- Co-authored-by: Wei Qing <48304907+weiquu@users.noreply.github.com> --- .../preview-session-panel.component.html | 118 +++++++++++---- .../preview-session-panel.component.scss | 24 ++- ...review-session-result-panel.component.html | 110 ++++++++++---- ...review-session-result-panel.component.scss | 13 +- ...r-session-edit-page.component.spec.ts.snap | 140 +++++++++++------- 5 files changed, 291 insertions(+), 114 deletions(-) diff --git a/src/web/app/components/preview-session-panel/preview-session-panel.component.html b/src/web/app/components/preview-session-panel/preview-session-panel.component.html index 485d450f0c9..0568e8bb58c 100644 --- a/src/web/app/components/preview-session-panel/preview-session-panel.component.html +++ b/src/web/app/components/preview-session-panel/preview-session-panel.component.html @@ -1,37 +1,97 @@
-
+
Preview Session:
-
- - - - - - - +
+
+ +
+ + + +
+ + + +
-
- - - - - - - +
+
+ +
+ + + +
+ + + +
diff --git a/src/web/app/components/preview-session-panel/preview-session-panel.component.scss b/src/web/app/components/preview-session-panel/preview-session-panel.component.scss index fb8f09dba4b..d6c1fbb3c1d 100644 --- a/src/web/app/components/preview-session-panel/preview-session-panel.component.scss +++ b/src/web/app/components/preview-session-panel/preview-session-panel.component.scss @@ -1,8 +1,30 @@ .background-color-light-blue { - background-color: #EAEFF5; + background-color: '#EAEFF5'; } .preview-select { float: left; width: 50%; } + +.preview-example-select { + float: left; + width: 50%; +} + +@media screen and (max-width: 1100px) { + .preview-example-select { + width: 45%; + } +} + +@media screen and (max-width: 576px) { + .preview-select, + .preview-example-select { + width: 100%; + } +} + +.w-max-content { + min-width: max-content; +} diff --git a/src/web/app/components/preview-session-result-panel/preview-session-result-panel.component.html b/src/web/app/components/preview-session-result-panel/preview-session-result-panel.component.html index 65c3dc1070f..115d2dbc096 100644 --- a/src/web/app/components/preview-session-result-panel/preview-session-result-panel.component.html +++ b/src/web/app/components/preview-session-result-panel/preview-session-result-panel.component.html @@ -1,37 +1,89 @@
-
+
Preview Results:
-
- - - - - - - +
+
+ +
+ + + +
+ + + +
-
- - - - - - - +
+
+ +
+ + + +
+ + + +
diff --git a/src/web/app/components/preview-session-result-panel/preview-session-result-panel.component.scss b/src/web/app/components/preview-session-result-panel/preview-session-result-panel.component.scss index fb8f09dba4b..6e7991f326d 100644 --- a/src/web/app/components/preview-session-result-panel/preview-session-result-panel.component.scss +++ b/src/web/app/components/preview-session-result-panel/preview-session-result-panel.component.scss @@ -1,8 +1,19 @@ .background-color-light-blue { - background-color: #EAEFF5; + background-color: '#EAEFF5'; } .preview-select { float: left; width: 50%; } + +// small +@media screen and (max-width: 576px) { + .preview-select { + width: 100%; + } +} + +.w-max-content { + min-width: max-content; +} diff --git a/src/web/app/pages-instructor/instructor-session-edit-page/__snapshots__/instructor-session-edit-page.component.spec.ts.snap b/src/web/app/pages-instructor/instructor-session-edit-page/__snapshots__/instructor-session-edit-page.component.spec.ts.snap index 7d36464e94b..12f5299d3e6 100644 --- a/src/web/app/pages-instructor/instructor-session-edit-page/__snapshots__/instructor-session-edit-page.component.spec.ts.snap +++ b/src/web/app/pages-instructor/instructor-session-edit-page/__snapshots__/instructor-session-edit-page.component.spec.ts.snap @@ -3051,45 +3051,61 @@ exports[`InstructorSessionEditPageComponent should snap with feedback session qu class="row align-items-center" >
Preview Session:
- - + +
+ +
+
- - + +
+ +
+
@@ -4788,45 +4804,61 @@ exports[`InstructorSessionEditPageComponent should snap with new question added class="row align-items-center" >
Preview Session:
- - + +
+ +
+
- - + +
+ +
+