-
-
Notifications
You must be signed in to change notification settings - Fork 220
Ability to set whether bluescreen panel is collapsed or not #232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| <?php $bottomPanels = [] ?> | ||
| <?php foreach ($this->renderPanels(NULL) as $panel): ?> | ||
| <?php if (!empty($panel->bottom)) { $bottomPanels[] = $panel; continue; } ?> | ||
| <?php $collapsed = isset($panel->collapsed) ? (bool) $panel->collapsed : true; ?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the (bool) cast is unnecessary; true should be written in uppercase (TRUE)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it is better to create $collapseClass than bool $collapse
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bool cast removed.
Used $collapseClass.
| <?php $bottomPanels = [] ?> | ||
| <?php foreach ($this->renderPanels(NULL) as $panel): ?> | ||
| <?php if (!empty($panel->bottom)) { $bottomPanels[] = $panel; continue; } ?> | ||
| <?php $collapsedClass = (isset($panel->collapsed) ? $panel->collapsed : TRUE) ? ' tracy-collapsed' : ''; ?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be simplified to
$collapsedClass = !isset($panel->collapsed) || $panel->collapsed ? ' tracy-collapsed' : '';There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Anything else? :-)
|
Thanks! |
Purpose of this pull request is to give user-defined panels in bluescreen possibility to declare whether they want to be collapsed or expanded.
Now, if you implement Bluescreen panel, you must return from your callback array with two keys -
panelandtab. After this PR we will support third optional key -collapsed.