[Bug 35718] New: Remove ES6 warnings from JavaScript system preferences
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35718 Bug ID: 35718 Summary: Remove ES6 warnings from JavaScript system preferences Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: lucas@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org When using any of the UserJS system preferences there are warnings if you use any ES6 features/syntax. To recreate: 1. Add some JS like this to any of the UserJS system preferences: $(document).ready( function() { let something = 1; const another_thing = 2; let an_arrow_function = (a, b) => a + b; console.log( an_arrow_function(something, another_thing) ); }); 2. Notice the icons and warnings to the left of the line numbers: let is available in ES6 const is available in ES6 arrow_function_syntax is available in ES6 ES6 syntax is pretty commonly used now, I don't think we need those warnings. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35718 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35718 --- Comment #1 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 160584 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160584&action=edit Bug 35718: Remove ES6 warns from JS system preferences To test: 1. Add some JS like this to any of the UserJS system preferences: $(document).ready( function() { let something = 1; const another_thing = 2; let an_arrow_function = (a, b) => a + b; console.log( an_arrow_function(something, another_thing) ); }); 2. Notice the icons and warnings to the left of the line numbers: let is available in ES6 const is available in ES6 arrow_function_syntax is available in ES6 3. APPLY PATCH 4. Try steps 1 and 2 again, the warnings should be gone. 5. Check that the JavaScript still works, in my example it should console.log 3. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35718 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35718 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #160584|0 |1 is obsolete| | --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 160613 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160613&action=edit Bug 35718: Remove ES6 warns from JS system preferences To test: 1. Add some JS like this to any of the UserJS system preferences: $(document).ready( function() { let something = 1; const another_thing = 2; let an_arrow_function = (a, b) => a + b; console.log( an_arrow_function(something, another_thing) ); }); 2. Notice the icons and warnings to the left of the line numbers: let is available in ES6 const is available in ES6 arrow_function_syntax is available in ES6 3. APPLY PATCH 4. Try steps 1 and 2 again, the warnings should be gone. 5. Check that the JavaScript still works, in my example it should console.log 3. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35718 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |lucas@bywatersolutions.com |ity.org | CC| |david@davidnind.com -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35718 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #3 from David Cook <dcook@prosentient.com.au> --- If no one else gets this first, I'll try to look at it tomorrow or week after next... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35718 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com --- Comment #4 from Julian Maurice <julian.maurice@biblibre.com> --- I know that the bug is only about the system preferences page, but Koha also allows to write JS in the "edit library" page. I think Koha should be consistent about linter settings everywhere it's used. Can you please remove ES6 warnings on the library page too ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35718 --- Comment #5 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 162623 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162623&action=edit Bug 35718: Remove ES6 warnings branches.tt -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35718 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #160613|0 |1 is obsolete| | --- Comment #6 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 162631 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162631&action=edit Bug 35718: Remove ES6 warns from JS system preferences To test: 1. Add some JS like this to any of the UserJS system preferences: $(document).ready( function() { let something = 1; const another_thing = 2; let an_arrow_function = (a, b) => a + b; console.log( an_arrow_function(something, another_thing) ); }); 2. Notice the icons and warnings to the left of the line numbers: let is available in ES6 const is available in ES6 arrow_function_syntax is available in ES6 3. APPLY PATCH 4. Try steps 1 and 2 again, the warnings should be gone. 5. Check that the JavaScript still works, in my example it should console.log 3. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35718 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #162623|0 |1 is obsolete| | --- Comment #7 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 162632 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162632&action=edit Bug 35718: Remove ES6 warnings branches.tt Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35718 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #8 from Julian Maurice <julian.maurice@biblibre.com> --- Thanks for the follow-up. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35718 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |minor -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35718 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |24.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35718 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35718 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This removes some warnings release notes| |when entering JavaScript in | |UserJS system preferences | |and library specific OPAC | |JS, when using ECMAScript 6 | |features/syntax. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35718 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|24.05.00 |24.05.00,23.11.04 released in| | Status|Pushed to master |Pushed to stable CC| |fridolin.somers@biblibre.co | |m --- Comment #10 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.11.x for 23.11.04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35718 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org