From 1defd6329091cbbf360d7e632b1dcddffba55fbd Mon Sep 17 00:00:00 2001 From: Aleksey Novikov Date: Thu, 19 Oct 2023 14:21:33 +0300 Subject: [PATCH] Fields are not on a one line (#7187) Fixed https://github.com/surveyjs/service/issues/1538 --- src/defaultV2-theme/blocks/sd-question.scss | 2 +- .../etalons/question-empty-title-height.png | Bin 0 -> 2486 bytes .../tests/defaultV2/question.ts | 33 ++++++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 visualRegressionTests/tests/defaultV2/etalons/question-empty-title-height.png diff --git a/src/defaultV2-theme/blocks/sd-question.scss b/src/defaultV2-theme/blocks/sd-question.scss index f44a44a504..d10e8b3275 100644 --- a/src/defaultV2-theme/blocks/sd-question.scss +++ b/src/defaultV2-theme/blocks/sd-question.scss @@ -157,6 +157,6 @@ .sd-question__title--empty { .sv-string-viewer { display: inline-block; - height: calcSize(3); + height: multiply(1.5, $font-questiontitle-size); } } \ No newline at end of file diff --git a/visualRegressionTests/tests/defaultV2/etalons/question-empty-title-height.png b/visualRegressionTests/tests/defaultV2/etalons/question-empty-title-height.png new file mode 100644 index 0000000000000000000000000000000000000000..936d68da170acfab059ea4d314009b05414ed5d8 GIT binary patch literal 2486 zcmd5;ZB)`(8oye{w$XIYc4jO!owH}uu{he~dy33VZRHE%SR=<2)DuCb<|vY&h;DVp zX=lp`$O1*`n4&r2I|lhWt|lU~MlOpKq==-Dh^B_1?!Vnn`(?iDhn;ioeg6M@p6A~4 zd!F;$`}^HYh(EpWBe#zL0Q;iPoJ<73{x$Uf!|xm*TR)F=g+BJtC%-yJwlliXo&&Hq z_rvP#ASzqEma*rx%w+9r(J;v&cN)ZhPWb*o!?jzD%En9b^s~OE-5)0kJ3mFn{6$dD zdwb5`9o{BsKauk2&=XQ3FR7P&!M-zksV+al2lX-X#-|UHR<7Z&zV{U){TrdIrHYV? z3BJpu#YmYvRaDR@34SB;uVapnk3Z6wc$sXlJZTX5M?^#@)#{0Y<4Ads@Dq%pj!9>+ zSnsS`LCF0estBXFNFeyCR4P_H&rj$8Efq6E<$(vBo(CbpdvXwxF_`|-P`L{Mtsn`{ z|B722d`T5DG;fb_>I)anM9cjg|SOTLOGZrXuS9Z18;%buBXOg(m3p^PiBZEmm)l4kn=sF&1 z-sH2&^2)_g&Dpf~rW8wnyF`Xt$fi#bR!7esQI35c>x;r?GP7X_PC#TA^P5x2$0>(3 z?%u+!J5=ktn;u+8076^oyRLL@Cf??fBVFLjXZmczPgi%syG6`wjx08SBPC~f6GEJI zOIpX|?J9lyvB*kQF1)f>Kc8ict^69F(-%@_t%J>KZ5C(^VtHeH&`Hx|m_$Yp&WB?ByoO zMc1>nuA-QFH=dI)fd43y?c{L%C3RKG;&7yEeD1Er2z@Ert2u2{?;3TNP-!`88^ocZR|;J>C1n%MWMYbqP1T2sW@bfYcO#N)ncPD8;{37H>}w& ze>E+TrXL-RF!eB$N@c2SGyFl)v)qdcOvh>aR&=4%Q_P<-r(~2e6ORQ3GHCtW`b=mO zyI#!aa5$-^80Us=fkw&~ZpVT3%X|a_lbh4;zJ9tz5ep4@5R?&8{zze{Qy6qbXnUY| zm>2`rA2aC&%w7NzkpEXBwj)W#ecQ7x5F$WvS6c@M(>+f8qp<=?u@#M!&lREbzkC&1 z8he$~+v8c*d%Tzef4WrF@BQBqB@1UaE-JdQ#o?fMtyzJc;0Kf}_O&9uAIgB(LqUQ{ z@Ndp=Dj!NULFN6VLe0`x=h`9>MetG^qja26_>zl~d5T}AA1FJbB{rY+V<{m_eP(ytgs}|#16PxM4fbf<<|-cF%bQy_>=sv)35yt DJVBLL literal 0 HcmV?d00001 diff --git a/visualRegressionTests/tests/defaultV2/question.ts b/visualRegressionTests/tests/defaultV2/question.ts index 6f2ed3fa69..167aea53c8 100644 --- a/visualRegressionTests/tests/defaultV2/question.ts +++ b/visualRegressionTests/tests/defaultV2/question.ts @@ -830,4 +830,37 @@ frameworks.forEach(framework => { await takeElementScreenshot("question-descriptionLocation-underInput.png", questionRows.nth(3), t, comparer); }); }); + + test("Question empty title height", async (t) => { + await wrapVisualTest(t, async (t, comparer) => { + await t.resizeWindow(1920, 1080); + await initSurvey(framework, { + "pages": [ + { + "name": "page1", + "elements": [ + { + "type": "text", + "name": "question1" + }, + { + "type": "text", + "name": "question2", + "startWithNewLine": false, + "title": " " + } + ] + } + ], + "showQuestionNumbers": "off", + "widthMode": "static", + "width": "800" + }); + await ClientFunction(() => { + document.documentElement.style.setProperty("--sjs-font-size", "8px"); + })(); + const questionRows = Selector(".sd-row"); + await takeElementScreenshot("question-empty-title-height.png", questionRows.nth(0), t, comparer); + }); + }); }); \ No newline at end of file