Syntax highlighting for workflow conditions and sandbox

Dear Mayan-dev-team,

thank you for providing this great software as open-source!

Beginning to dig into Mayan and trying to understand the workflows, it would have been a great help, if the code snippet text field would provide syntax highlighting. To improve reading and detect errors. Also for the sandbox.

Kind regards,
Daniel

2 Likes

Hi,

That is a good idea. Will look into integrating a standalone Python library that can do Django template syntax highlighting.

Thanks for the request!

2 Likes

This feature is now available in version 4.8:

Use the setting TEMPLATING_WIDGET_HIGHLIGHT_THEME to change the theme.

The solution uses a split field mode because we were not able to find any libraries that did highlight and editing as a single field. If one is found in the future that does it will be used.

Also syntax highlight support for Django is limited but useful enough to know things like tags, for loops, etc are correctly entered.

We added a few other things to make working with templates easier like a monospaced font and autocomplete for filter and properties, restricted resizing to vertical only, disabled scrolling inheritance to the parent element to avoid scrolling the page when scrolling the template view.

Errors are also now returned in the template result field directly:

1 Like

This topic was automatically closed 4 hours after the last reply. New replies are no longer allowed.