nette / tracy

😎 Tracy: the addictive tool to ease debugging PHP code for cool developers. Friendly design, logging, profiler, advanced features like debugging AJAX calls or CLI support. You will love it.
https://tracy.nette.org
Other
1.75k stars 218 forks source link

Can no longer set maxAjaxRows or panelZIndex #535

Closed adrianbj closed 2 years ago

adrianbj commented 2 years ago

Version: 2.7.9 & 2.9.1

Bug Description

It doesn't seem like it's possible to override these anymore.

Steps To Reproduce

It used to be possible to set these via:

window.Tracy.panelZIndex = 100;
window.TracyMaxAjaxRows = 5;

Expected Behavior

It doesn't work in the latest versions of 2.7 or 2.9 but it used to work in earlier versions of 2.7, but I am not sure about 2.8.

I think the example suggests it should still be possible to change the maxAjaxRows: https://github.com/nette/tracy/blob/8755508a40e611a4a52f2922aa97eaeb815d94f6/examples/ajax-jquery.php#L48

and I don't think there is any reason to have removed the zIndex option. Further discussion about that here: https://github.com/nette/tracy/issues/269

Thanks.

dg commented 2 years ago

I tried the example ajax-fetch.php and window.TracyMaxAjaxRows works.

adrianbj commented 2 years ago

@dg - I have managed to set window.TracyMaxAjaxRows now, but I had to do it after Tracy was loaded. Before I could include that in a $customJsFiles file.

But, I am still having problems setting panelZIndex - in v2.5 you had:

Tracy = window.Tracy || {};
Tracy.panelZIndex = Tracy.panelZIndex || 20000;

but now you have:

let panelZIndex = 20000,

and

panelZIndex: Tracy.panelZIndex,

and I am struggling to figure out how to override it. Am I missing something obvious?

Thanks.

dg commented 2 years ago

I would like you to suggest a solution, because I don't use this (and therefore it's really possible that it doesn't work at all).

adrianbj commented 2 years ago

It used to work perfectly. It's really nice to be able to set this because 20000 is higher than the dropdown menus in Processwire which means for large panels they block access to these.

Can you either revert to having panelZIndex globally scoped so it can be changed via window or could you make it configurable via a PHP setting - maybe Debugger::panelZIndex

dg commented 2 years ago

I tried to fix it. Only for consistency's sake, I changed window.Tracy.panelZIndex to window.TracyPanelZIndex.

adrianbj commented 2 years ago

Thanks @dg - works perfectly - it's great to have this option back - saves lots of frustrations :)