Summary: | Add CodeMirror custom syntax highlighting for column placeholders | ||
---|---|---|---|
Product: | Koha | Reporter: | Owen Leonard <oleonard> |
Component: | Reports | Assignee: | Owen Leonard <oleonard> |
Status: | CLOSED FIXED | QA Contact: | Nick Clemens (kidclamp) <nick> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | caroline.cyr-la-rose, fridolin.somers, jonathan.druart, kyle, lucas, nick, testopia |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This patch modifies the configuration of the reports module's SQL editor so that column placeholders have their own syntax highlighting, setting them apart by color from other parts of the SQL code.
|
Version(s) released in: |
21.11.00
|
Circulation function: | |||
Bug Depends on: | 27643 | ||
Bug Blocks: | |||
Attachments: |
Bug 27747: Add CodeMirror custom syntax highlighting for column placeholders
Bug 27747: Add CodeMirror custom syntax highlighting for column placeholders Bug 27747: Add CodeMirror custom syntax highlighting for column placeholders Bug 27747: (QA follow-up) Make code consistent and add explicit brackets |
Description
Owen Leonard
2021-02-22 12:33:57 UTC
Created attachment 117146 [details] [review] Bug 27747: Add CodeMirror custom syntax highlighting for column placeholders This patch adds some additional configuration to CodeMirror so that column placeholders have a distinct color in the CodeMirror SQL editor. To test, apply the patch and create or edit an SQL report which contains one or more column placeholders, e.g. [[itemnumber|Item number]], [[borrowernumber|Borrower number]], etc. Confirm that when editing the SQL, these placeholders should appear as red text. Save your report and view it. The syntax highlighting should be updated in this view too. Created attachment 120849 [details] [review] Bug 27747: Add CodeMirror custom syntax highlighting for column placeholders This patch adds some additional configuration to CodeMirror so that column placeholders have a distinct color in the CodeMirror SQL editor. To test, apply the patch and create or edit an SQL report which contains one or more column placeholders, e.g. [[itemnumber|Item number]], [[borrowernumber|Borrower number]], etc. Confirm that when editing the SQL, these placeholders should appear as red text. Save your report and view it. The syntax highlighting should be updated in this view too. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Created attachment 123108 [details] [review] Bug 27747: Add CodeMirror custom syntax highlighting for column placeholders This patch adds some additional configuration to CodeMirror so that column placeholders have a distinct color in the CodeMirror SQL editor. To test, apply the patch and create or edit an SQL report which contains one or more column placeholders, e.g. [[itemnumber|Item number]], [[borrowernumber|Borrower number]], etc. Confirm that when editing the SQL, these placeholders should appear as red text. Save your report and view it. The syntax highlighting should be updated in this view too. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 123109 [details] [review] Bug 27747: (QA follow-up) Make code consistent and add explicit brackets The while statements were including the next statement, I add brackets to make it more obvious Also the highlighting was applying to [[borrowernumber|Borrow number] I removed the break to match code above and only highlight when syntax complete and correct Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Pushed to master for 21.11, thanks to everybody involved! Enhancement not backported for 21.05 |