Skip to content

Commit

Permalink
nested channels ignoring their output config value. restore non-sideb…
Browse files Browse the repository at this point in the history
…ar channel filter/toggles functionality (used by documentation)
  • Loading branch information
bkdotcom committed Jan 31, 2023
1 parent c9eb7b5 commit 1a15156
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/Debug/Internal.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ public function publishOutputEvent()
}
$channels[] = $debug;
foreach ($channels as $channel) {
if ($channel->getCfg('output', Debug::CONFIG_DEBUG) === false) {
continue;
}
$event = $channel->eventManager->publish(
Debug::EVENT_OUTPUT,
$channel,
Expand Down
5 changes: 4 additions & 1 deletion src/Debug/js/Debug.jquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -1079,11 +1079,14 @@
];

function init$4 ($delegateNode) {
var $debugTabLog = $delegateNode.find('> .tab-panes > .tab-primary');
/*
var $debugTabLog = $delegateNode.find('> .tab-panes > .tab-primary')
if ($debugTabLog.length > 0 && $debugTabLog.data('options').sidebar === false) {
// no sidebar -> no filtering
// documentation uses non-sidebar filtering
return
}
*/
applyFilter($delegateNode);
$delegateNode.on('change', 'input[type=checkbox]', onCheckboxChange);
$delegateNode.on('change', 'input[data-toggle=error]', onToggleErrorChange);
Expand Down
2 changes: 1 addition & 1 deletion src/Debug/js/Debug.jquery.min.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src/Debug/js_src/filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,14 @@ var preFilterCallbacks = [
]

export function init ($delegateNode) {
/*
var $debugTabLog = $delegateNode.find('> .tab-panes > .tab-primary')
if ($debugTabLog.length > 0 && $debugTabLog.data('options').sidebar === false) {
// no sidebar -> no filtering
// documentation uses non-sidebar filtering
return
}
*/
applyFilter($delegateNode)
$delegateNode.on('change', 'input[type=checkbox]', onCheckboxChange)
$delegateNode.on('change', 'input[data-toggle=error]', onToggleErrorChange)
Expand Down

0 comments on commit 1a15156

Please sign in to comment.