Skip to content
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

Ability to hide panel labels #173

Closed
adrianbj opened this issue May 16, 2016 · 2 comments
Closed

Ability to hide panel labels #173

adrianbj opened this issue May 16, 2016 · 2 comments

Comments

@adrianbj
Copy link
Contributor

@adrianbj adrianbj commented May 16, 2016

When you have a lot of custom panels the debugger bar can become very wide. I'd like to propose a: Debugger::$hideLabels option. Obviously it would be up to panel authors to update to support this, but I think it would be very helpful.

I have implemented it within the code for my custom panels, but I would rather see it in the core. Here is an idea of the difference it can make:

screen shot 2016-05-16 at 4 46 40 pm
screen shot 2016-05-16 at 4 45 55 pm

Let me know if this is something you might be interested in and I can put together a PR.

@dg

This comment has been minimized.

Copy link
Member

@dg dg commented May 17, 2016

I would like automatic label hidding when the bar is too wide for browser window.

@JanTvrdik

This comment has been minimized.

Copy link
Contributor

@JanTvrdik JanTvrdik commented May 21, 2016

@dg The following seems to work, but is a bit ugly performance-wise

Bar.prototype.collapseLabels = function() {
    var labels = this.elem.querySelectorAll('.tracy-label'), prev = true;
    for (var i = labels.length - 1; i >= 0; i--) {
        prev = prev && this.elem.clientHeight >= 40;
        labels.item(i).hidden = prev;
    }
};

window.addEventListener('resize', function () {
    Tracy.Debug.bar.collapseLabels();
});
JanTvrdik added a commit to JanTvrdik/nette-tracy that referenced this issue May 21, 2016
@dg dg closed this in 417adfb May 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.