View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
18013Feature requestsOtherpublic2022-05-20 17:27
Reportertammo Assigned To 
PrioritynoneSeverityfeature 
Status newResolutionopen 
Summary18013: Code tab implemented in way that obstructs
Description

Since version 5 in the question editor there is a "code" tab. Which is great. But it is implemented in a way that will result in almost no use.

Because:

  1. when adding code, this tab assumes already that you want to add Javascript and you have to make sure that you omit the bginning and end tags (<script charset="utf-8" type="text/javascript"> and </script>) which is different from all examples that are given in the forum, so this will lead to an enourmous amount of questions. It also will take away the data-author part (like in: <script type="text/javascript" data-author="Tony Partner">) which will make the helpers on the forum less willing to comply to this way of adding scripts.

  2. since the code tab only accepts Javascript, you cannot add css, which will result in people adding Javascript to one tab and cs to another.

Please reconsider, since this tab will not be used a lot (yet).

TagsNo tags attached.
Bug heat6

Users monitoring this issue

User List There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2022-04-05 10:46

developer   ~68883

My opinion : it's done for JS, not for css.
And if we allow script tag : we can not put it at the needed place by the theme.

DenisChenu

DenisChenu

2022-04-05 10:48

developer   ~68884

PS : for CSS : it's easy to do a addCssToQuestion : https://gitlab.com/SondagesPro/QuestionSettingsType/addScriptToQuestion
BUT : i think it's better to have a Group settings here.

tammo

tammo

2022-04-05 10:59

partner   ~68885

My opinion : it's done for JS, not for css.
And if we allow script tag : we can not put it at the needed place by the theme.

I do not understand how we could place this when it was in the question text tab.

BUT : i think it's better to have a Group settings here.
I do not understand what you mean here.

DenisChenu

DenisChenu

2022-04-05 11:19

developer   ~68886

I do not understand how we could place this when it was in the question text tab.

in header, in footer, ready or just after answers

I do not understand what you mean here.
CSS is not related to question, but to page (~group).

In my opinion : if you add question css : you must add #question{QID} for all css line .

tammo

tammo

2022-04-05 12:54

partner   ~68888

in header, in footer, ready or just after answers

As survey developer, we were never able before to do this. So why this reason?

CSS is not related to question, but to page (~group).

If this is a serious reason, then I would expect also to have a code tab at the group edit screen. Your remark may be true, but does it make a difference in this issue?

DenisChenu

DenisChenu

2022-04-05 15:56

developer   ~68892

About CSS : i say it's easy to create a addCssToQuestion
But still : it's more related to page

As survey developer, we were never able before to do this. So why this reason?
Can be done since years in addScriptToQuestion, i have the utility one time (adding just after answer, but in doc.ready for another question)

tammo

tammo

2022-04-05 16:30

partner   ~68893

If this is a core feature, let it be a good core feature. If the core feature cannot be implemented right, a plugin can come to the rescue, but plugins are for many people much more difficult to install/use.

You seem to say: this feature is crap, so use my plugin? Why not make it a good feature? Or do you propose to delete the feature and just use a plugin? You say it is easy to develop, but why develop a plugin when the feature is already (half) in core?

I seem to see several features that are more or less good, and then a plugin with a better feature set comes up. Even for me, as a user that is quite close to development, this is quite difficult to understand when to use what.

And it is difficult to teach to users.

DenisChenu

DenisChenu

2022-04-05 16:32

developer   ~68895

Current feature is done for JS , not CSS .

My plugin is far more older than the 4.X version … work in 2.6 …
And I propose to add it in LimeSurvey core years ago.

gabrieljenik

gabrieljenik

2022-05-03 17:18

manager   ~69376

Hi All. Is it ok to classify this as a feature request?

tammo

tammo

2022-05-04 17:57

partner   ~69390

I guess not: this feature was a result of a previous feature request that was (in my opinion) not implemented right.

DenisChenu

DenisChenu

2022-05-04 18:40

developer   ~69391

The feature request is about javascript , neither about CSS style.

tammo

tammo

2022-05-04 19:30

partner   ~69392

Strictly speaking you are right. But when this would have been discussed< i would have added that it would be best if the complete javascript could be added (with <script> tag) and that additional CSS could also be added: both javascript as well as css can be added in the question text, but they confict with the GUI of the editor.

By separating them, you make life easier for users.

By leaving the javascript in tact, you do not frustrate users that read the great solutions by tpartner that now have to be handled differently when you want to use this (badly implemented) feature. Tpartner dows not use it, he might use it when the extra tab can receive the same code as the question text.

DenisChenu

DenisChenu

2022-05-04 19:55

developer   ~69397

when the extra tab can receive the same code as the question text

Then : use question text …

I really don't understand the point here …

tammo

tammo

2022-05-04 20:29

partner   ~69399

For "normal" users, people that are not software developers adding a question with a HTML editor is something completely different from adding code (Javascript or CSS) to a non-HTML editor.

The requested feature hoped to achieve this, but I think I was misunderstood. Of course people are still able to add javascript or css to the question editor, but often this leads to errors due to the HTML editor itself. I want to avoid that and make it easier for non-developers.

gabrieljenik

gabrieljenik

2022-05-04 20:35

manager   ~69400

I guess we could add some pre and post html before the textarea mimicing the <script> and </script> tags.
That way, people will not be confused about wether those tags should be included or not.

tammo

tammo

2022-05-04 20:51

partner   ~69401

That would already help (for 50%...), because people following tpartner's instructions on the forum and adding to the script tag now get confused.

Still I think it would be better to not "think for the user" and not automatically add the tags, that way css can also be added.

DenisChenu

DenisChenu

2022-05-05 00:32

developer   ~69412

About css : the issue : it's not related to question, clearly not …

A real solution can be

  • Adding a CSS box to theme option
  • Sanitize this css if you allow XSS user to
  • Use class
tammo

tammo

2022-05-05 08:09

partner   ~69414

About CSS: it was clearly related to my feature request: i wanted (but did not ask clearly enough) a tab for additional code.

What was developed was a solution for javascript, but not for CSS. So in my view this was a 50% solution and not a fgood one, since this solution makes people that look in the forum for javascript "tricks" confused:

  • when you follow tpartners instructions, you add the complete script to the question text

  • when you add the script to a script/code tab, you have to leave away a part, which was never indicated

  • often tpatner solution also include css, which was also added to the question text, but now you still have to add it there, because the code tab does not accept it.

  • adding it to the theme option was never mentioned, and then it it cut loose from the solution. Several users cannot use the theme options

  • use a class: that is what is now added to the question text. Of course I know that I can add it to the custom.css, but for many users this is "scary"

The way we did it (adding extra code to the question text), was clever. I just wanted to make it more clever by having an extra tab, so that there is a clear separation or text and code. But this solution makes it more difficult and less clear for users.

And when I say "users", I mean people that are not developers themselves.

DenisChenu

DenisChenu

2022-05-05 10:25

developer   ~69416

Several users cannot use the theme options

???? Survey creator must have all access to Survey theme option.

And when I say "users", I mean people that are not developers themselves.
I know that … and i think current way is more complex than my plugin …

tammo

tammo

2022-05-05 10:35

partner   ~69417

???? Survey creator must have all access to Survey theme option. >> They do not know how to use.

Plugins are great, but currently too much hidden from novice users.

tammo

tammo

2022-05-05 10:37

partner   ~69418

We are too much doing a yes/no game here and we will not convince each other via this medium.

I think this (as an example for also other feature requests) could benefit from a more brainstorm like meeting online or live.

This would be great to do when we could have a yearly meeting of core users/partners.

DenisChenu

DenisChenu

2022-05-05 10:46

developer   ~69419

They do not know how to use.

They don't know how to use style … you can broke completely a survey with only CSS …

Plugins are great, but currently too much hidden from novice users.

When it's activated it's like any other advanced question settings …

I think this (as an example for also other feature requests) could benefit from a more brainstorm like meeting online or live.

Yes +1

DenisChenu

DenisChenu

2022-05-05 10:48

developer   ~69420

Else :

when you follow tpartners instructions, you add the complete script to the question text

The n adding a "no HTML" helper on all question ? Where user can add anything but without HTML editor ?

Something like

  1. Question->text (HTML editor)
  2. Question->help (HTML editor)
  3. Question->extra : no HTML editor, added after answers (according to Survey-theme)

It's your feature request ?

tammo

tammo

2022-05-05 11:02

partner   ~69421

Something like

Question->text (HTML editor)
Question->help (HTML editor)
Question->extra : no HTML editor, added after answers (according to Survey-theme)

It's your feature request ?

YES, that was my feature request.

tammo

tammo

2022-05-05 11:03

partner   ~69422

In stead of the current javascript tab.

tammo

tammo

2022-05-20 16:28

partner   ~69925

Can this be transferred to "Feature requests"?

DenisChenu

DenisChenu

2022-05-20 16:50

developer   ~69930

Category : workaround ?
;)

tammo

tammo

2022-05-20 17:10

partner   ~69932

Not sure if I understand. I think this can be a feature that helps people a lot. In stead of the current JS-tab, which will not much be used, I guess, when TPartner says he does not use it...

gabrieljenik

gabrieljenik

2022-05-20 17:13

manager   ~69933

I like the feature. Clearer separation allows possibilities of better handling in the future.
I would implement this at group level as well

DenisChenu

DenisChenu

2022-05-20 17:22

developer   ~69934

Last edited: 2022-05-20 17:22

TPartner says he does not use it...

Unsure Tony use a lot 5.X

Some of my client are really happy of scriptAttribute : allow to be updated by superadmin and not deleted by other user. More hidden then the current one.

Personally : i don't care : i always use HTML editor as popup … it's the 1st thing i do when i'm connected on a new instance.
I don't see real interest of this feature :)
sorry.

tammo

tammo

2022-05-20 17:25

partner   ~69937

@Denis: that was already clear from your answers... ;-)

DenisChenu

DenisChenu

2022-05-20 17:27

developer   ~69938

;)

I already have a feature request about "set default HTML editor to popup" sowewhere …
Surely a 5 years feature request :p

Issue History

Date Modified Username Field Change
2022-04-04 17:36 tammo New Issue
2022-04-05 10:46 DenisChenu Note Added: 68883
2022-04-05 10:46 DenisChenu Bug heat 0 => 2
2022-04-05 10:48 DenisChenu Note Added: 68884
2022-04-05 10:59 tammo Note Added: 68885
2022-04-05 10:59 tammo Bug heat 2 => 4
2022-04-05 11:19 DenisChenu Note Added: 68886
2022-04-05 12:54 tammo Note Added: 68888
2022-04-05 15:56 DenisChenu Note Added: 68892
2022-04-05 16:30 tammo Note Added: 68893
2022-04-05 16:32 DenisChenu Note Added: 68895
2022-05-03 17:18 gabrieljenik Note Added: 69376
2022-05-03 17:18 gabrieljenik Bug heat 4 => 6
2022-05-04 17:57 tammo Note Added: 69390
2022-05-04 18:40 DenisChenu Note Added: 69391
2022-05-04 19:30 tammo Note Added: 69392
2022-05-04 19:55 DenisChenu Note Added: 69397
2022-05-04 20:29 tammo Note Added: 69399
2022-05-04 20:35 gabrieljenik Note Added: 69400
2022-05-04 20:51 tammo Note Added: 69401
2022-05-05 00:32 DenisChenu Note Added: 69412
2022-05-05 08:09 tammo Note Added: 69414
2022-05-05 10:25 DenisChenu Note Added: 69416
2022-05-05 10:35 tammo Note Added: 69417
2022-05-05 10:37 tammo Note Added: 69418
2022-05-05 10:46 DenisChenu Note Added: 69419
2022-05-05 10:48 DenisChenu Note Added: 69420
2022-05-05 11:02 tammo Note Added: 69421
2022-05-05 11:03 tammo Note Added: 69422
2022-05-20 16:28 tammo Note Added: 69925
2022-05-20 16:48 gabrieljenik Project Bug reports => Feature requests
2022-05-20 16:48 gabrieljenik Category Question editor => Other
2022-05-20 16:50 DenisChenu Note Added: 69930
2022-05-20 16:51 DenisChenu Severity @50@ => feature
2022-05-20 17:10 tammo Note Added: 69932
2022-05-20 17:13 gabrieljenik Note Added: 69933
2022-05-20 17:22 DenisChenu Note Added: 69934
2022-05-20 17:22 DenisChenu Note Edited: 69934
2022-05-20 17:25 tammo Note Added: 69937
2022-05-20 17:27 DenisChenu Note Added: 69938