survey-library icon indicating copy to clipboard operation
survey-library copied to clipboard

Rating question rendering issue on hebrew - RTL

Open aharonamir opened this issue 2 years ago • 6 comments

Are you requesting a feature, reporting a bug or asking a question?

The bug is in trying to render a rating question in hebrew

What is the current behavior?

When surveyjs tries to render a rating question in hebrew that has more than one word (or more than 7 chars) in the min/maxRateDescription, the view starts to toggle between a rating question and a rating drop-down question.

What is the expected behavior?

Render a Rating question not as a drop-down question, like in non-RTL language like english Attached git files showing behaviour for english question and hebrew question

How would you reproduce the current behavior (if this is a bug)?

Create a rating question with more than one word in the min/maxRateDescription

Provide the test code and the tested page URL (if applicable)

Tested page URL:

Test code Question json model: { "type": "rating", "name": "leadership:4", "title": "מנהל/ת צריכ/ה להחזיק ולהדגים סטנדרטים גבוהים לעבודה", "isRequired": true, "minRateDescription": "לא מסכים", "maxRateDescription": "מסכים", }

your_code_here

Specify your

  • browser: chrome hebrew-rating english-rating

  • browser version: 00.0.4896.127 (Official Build) (64-bit)

  • surveyjs platform (angular or react or jquery or knockout or vue): React

  • surveyjs version: 1.9.25

aharonamir avatar Jul 06 '22 18:07 aharonamir

@aharonamir we will take a look and come back asap

Thanks, Dmitry

dmitry-kurmanov avatar Jul 26 '22 11:07 dmitry-kurmanov

Hello,

We couldn't reproduce the issue. We've created example: https://plnkr.co/edit/84E3Svfc7DjItmv1 and it works fine. Could you please modify this plunker or create your own sample to reproduce the issue?

Thanks, Dmitry SurveyJS Team

dk981234 avatar Jul 26 '22 12:07 dk981234

Hi Dmitry, Thanks for your reply, in my web-app the survey resides in a big front-end project with many other packages and css templates, one of them is bootstrap and other so it's a bit hard to create a small example to reprodue, The main difference here is that your version is 1.9.41 and react 17.0.1 while my project react-survey is 1.9.40 and react 17.0.2, I don't know if it's a big difference. How does the react-survey manages RTL forms because i had to do lots of changes in the css (mainly changing margins left to right etc'). Also in Ranking when draging the Item in RTL mode, the dragged item stays on the left side instead of the right. I forked your example and added hebrew ranking where you can see this issue: https://plnkr.co/edit/qfixvRYa4LbvgJeB ranking-heb

Thanks in advance. Amir.

aharonamir avatar Jul 27 '22 18:07 aharonamir

Hi Dmitry, I've manage to reproduce the problem with your example, Attached the screen capture, basically when you change the zoom the ranking switch to drop-down, In some rating-wit-zoom screen I don't get this issue and in some i get (i guess the users have different zoom)

Thanks in advance. Amir.

aharonamir avatar Jul 28 '22 18:07 aharonamir

Hello,

Thank you for reporting the problems. We'll fix the issues asap. As a workaround for the rating question, you can use the useDropdown: "never" option in json, it disables the conversion of the rating into a dropdown even if there is not enough space available.

Thank you, Dmitry SurveyJS Team

dk981234 avatar Jul 28 '22 21:07 dk981234

Thanks Dmitry, I used the useDropdown: "never" option, it helped. Regards, Amir.

aharonamir avatar Jul 30 '22 19:07 aharonamir