Bug 22584

Summary: Add YAML support for Codemirror
Product: Koha Reporter: Tomás Cohen Arazi (tcohen) <tomascohen>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: josef.moravec, martin.renvoize, nick
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.05.00
Circulation function:
Bug Depends on: 21582    
Bug Blocks: 22757    
Attachments: Bug 22584: Add YAML support for Codemirror
Bug 22584: Add YAML support for Codemirror
Bug 22584: Add YAML support for Codemirror

Description Tomás Cohen Arazi (tcohen) 2019-03-26 20:35:02 UTC
It would be great if YAML syntax support was available as we use it in a couple places, specially in plugin configurations.
Comment 1 Owen Leonard 2019-03-30 15:16:08 UTC
I have a patch ready to add support for YAML syntax, but should I also add a patch with an example implementation? If so, what is a good candidate? Are there system preferences which expect YAML?
Comment 2 Tomás Cohen Arazi (tcohen) 2019-03-30 15:41:58 UTC
OpacHiddenItems is a candidate. The CSV2MARC plugin configuration too.
Comment 3 Owen Leonard 2019-04-01 14:00:19 UTC
Created attachment 87279 [details] [review]
Bug 22584: Add YAML support for Codemirror

This patch adds the dependencies required to provide YAML syntax
highlighting in CodeMirror text areas. The OpacHiddenItems system
preference configuration is updated to use a "text/x-yaml" CodeMirror
syntax.

To test, apply the patch and go to Administration -> System preferences
-> OPAC.

Expand the OpacHiddenItems preference and test that YAML-formatted text
entry has the correct syntax highlighting.
Comment 4 Michal Denar 2019-04-14 10:43:41 UTC
Created attachment 87944 [details] [review]
Bug 22584: Add YAML support for Codemirror

This patch adds the dependencies required to provide YAML syntax
highlighting in CodeMirror text areas. The OpacHiddenItems system
preference configuration is updated to use a "text/x-yaml" CodeMirror
syntax.

To test, apply the patch and go to Administration -> System preferences
-> OPAC.

Expand the OpacHiddenItems preference and test that YAML-formatted text
entry has the correct syntax highlighting.

Signed-off-by: Michal Denar <black23@gmail.com>

https://bugs.koha-community.org/show_bug.cgi?id=2700
Comment 5 Katrin Fischer 2019-04-17 06:06:55 UTC
Created attachment 88133 [details] [review]
Bug 22584: Add YAML support for Codemirror

This patch adds the dependencies required to provide YAML syntax
highlighting in CodeMirror text areas. The OpacHiddenItems system
preference configuration is updated to use a "text/x-yaml" CodeMirror
syntax.

To test, apply the patch and go to Administration -> System preferences
-> OPAC.

Expand the OpacHiddenItems preference and test that YAML-formatted text
entry has the correct syntax highlighting.

Signed-off-by: Michal Denar <black23@gmail.com>

https://bugs.koha-community.org/show_bug.cgi?id=2700

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Nick Clemens (kidclamp) 2019-04-19 14:56:10 UTC
Awesome work all!

Pushed to master for 19.05
Comment 7 Martin Renvoize (ashimema) 2019-04-26 14:30:29 UTC
Enhancement will not be backported to 18.11.x series.