[Bug 38391] New: DT's add filters called too many times
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38391 Bug ID: 38391 Summary: DT's add filters called too many times Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Staff interface Assignee: koha-bugs@lists.koha-community.org Reporter: jonathan.druart@gmail.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.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=38391 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=38130 -- 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=38391 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=38391 --- Comment #1 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 174193 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174193&action=edit Bug 38391: Redraw the filters row on table redraw We used to adjust the filters row when the column visibility changed. It was working, but at the initialization of the table this event if fired once per columns. On the items table it means 36x. When a filtering/sorting, the draw event is triggered once, but the column-visibility.dt is called 36x Try with and without this patch and compare the delay between the query is received and the page is redrawn. -- 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=38391 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #174193|0 |1 is obsolete| | --- Comment #2 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 174235 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174235&action=edit Bug 38391: Redraw the filters row on table redraw We used to adjust the filters row when the column visibility changed. It was working, but at the initialization of the table this event if fired once per columns. On the items table it means 36x. When a filtering/sorting, the draw event is triggered once, but the column-visibility.dt is called 36x Test plan: Try with and without this patch and compare the delay between the query is received and the page is redrawn. You can test with 1000 libraries on the items table. "Show filters" then filters using the global search. On Firefox you will notice that the response is received but the table not redrawn directly. With this patch it should be redrawn pretty fase. Another test would be to add the following 2 lines: + let i = 0; table_dt.on("draw", function(){ + console.log("redraw filters %s".format(i)); if ( add_filters ) { _dt_add_filters(this, table_dt, filters_options); } Open the console and notice that "redraw filters" is logged only once. -- 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=38391 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart@gmail.com |ity.org | Keywords| |rel_24_11_candidate -- 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=38391 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38391 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38391 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #174235|0 |1 is obsolete| | --- Comment #3 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 174253 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174253&action=edit Bug 38391: Redraw the filters row on table redraw We used to adjust the filters row when the column visibility changed. It was working, but at the initialization of the table this event if fired once per columns. On the items table it means 36x. When a filtering/sorting, the draw event is triggered once, but the column-visibility.dt is called 36x Test plan: Try with and without this patch and compare the delay between the query is received and the page is redrawn. You can test with 1000 libraries on the items table. "Show filters" then filters using the global search. On Firefox you will notice that the response is received but the table not redrawn directly. With this patch it should be redrawn pretty fase. Another test would be to add the following 2 lines: + let i = 0; table_dt.on("draw", function(){ + console.log("redraw filters %s".format(i)); if ( add_filters ) { _dt_add_filters(this, table_dt, filters_options); } Open the console and notice that "redraw filters" is logged only once. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38391 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #174253|0 |1 is obsolete| | --- Comment #4 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 174268 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174268&action=edit Bug 38391: Redraw the filters row on table redraw We used to adjust the filters row when the column visibility changed. It was working, but at the initialization of the table this event if fired once per columns. On the items table it means 36x. When a filtering/sorting, the draw event is triggered once, but the column-visibility.dt is called 36x Test plan: Try with and without this patch and compare the delay between the query is received and the page is redrawn. You can test with 1000 libraries on the items table. "Show filters" then filters using the global search. On Firefox you will notice that the response is received but the table not redrawn directly. With this patch it should be redrawn pretty fase. Another test would be to add the following 2 lines: + let i = 0; table_dt.on("draw", function(){ + console.log("redraw filters %s".format(i)); if ( add_filters ) { _dt_add_filters(this, table_dt, filters_options); } Open the console and notice that "redraw filters" is logged only once. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38391 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38391 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_24_11_candidate | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38391 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |24.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38391 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.11! 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=38391 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed --- Comment #6 from Jonathan Druart <jonathan.druart@gmail.com> --- This is not working correctly. The filters header is not adjusted correctly. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38391 --- Comment #7 from Jonathan Druart <jonathan.druart@gmail.com> --- This patch is wrong, and the assumption in the commit message as well. """ When a filtering/sorting, the draw event is triggered once, but the column-visibility.dt is called 36x """ This is not correct, it's not called at all. It's called several times on the items table (and only on this one!) because of the specific behaviour we have on this table: hide the columns without data. I am requiring a revert from this commit, and I will try to provide something better for the items table. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38391 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=38433 --- Comment #8 from Jonathan Druart <jonathan.druart@gmail.com> --- Moved to bug 38433 (specific to the items table). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38391 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Reverted from main by Joubu's request. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38391 --- Comment #10 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 174476 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174476&action=edit Bug 38391: Do not redraw on adjusting col vis in drawcallback -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38391 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |ASSIGNED --- Comment #11 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Jonathan Druart from comment #10)
Created attachment 174476 [details] [review] Bug 38391: Do not redraw on adjusting col vis in drawcallback
Dropping this patch here, but ignore it for now. This might be the correct fix. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38391 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|24.11.00 |REVERTED FROM 24.11 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38391 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed | --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Removing keyword as this is currently not pushed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38391 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |38436 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38436 [Bug 38436] Unable to hide a column in the holdings table in the staff interface -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38391 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38391 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #174476|0 |1 is obsolete| | --- Comment #13 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 174596 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174596&action=edit Bug 38391: Do not redraw on adjusting col vis in drawcallback -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38391 --- Comment #14 from Jonathan Druart <jonathan.druart@gmail.com> --- """ It was called several times on the items table (and only on this one!) because of the specific behaviour we have on this table: hide the columns without data. """ I managed to fix it correctly I think, we simply needed to pass false to visible so that there is no redraw (redrawCalculations) https://datatables.net/reference/api/columns().visible() -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38391 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #174268|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38391 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38391 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #174596|0 |1 is obsolete| | --- Comment #15 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 174683 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174683&action=edit Bug 38391: Do not redraw on adjusting col vis in drawcallback Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38391 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |Main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38391 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38391 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #174683|0 |1 is obsolete| | --- Comment #16 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 174718 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174718&action=edit Bug 38391: Do not redraw on adjusting col vis in drawcallback Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38391 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.derscheid@lmscloud.de --- Comment #17 from Paul Derscheid <paul.derscheid@lmscloud.de> --- This seems to work as intended. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38391 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)|REVERTED FROM 24.11 |REVERTED FROM released in| |24.11,24.11.00 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38391 --- Comment #18 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.11! 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=38391 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|REVERTED FROM |24.11.00 released in|24.11,24.11.00 | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38391 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |RESOLVED Resolution|--- |FIXED --- Comment #19 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Missing 24.05.x deps, no backport -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org