-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[WebProfilerBundle] UI tweaks for the command profiler #52138
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
src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig
Show resolved
Hide resolved
src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig
Outdated
Show resolved
Hide resolved
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.
Thanks for this PR :)
{% if status_code == 0 or interrupted %} | ||
<span class="status-response-status-code">{{ interrupted is null ? 'Success' : 'Interrupted by signal: ' ~ interrupted }}</span> | ||
{% if status_code == 0 %} | ||
{% if interrupted %} |
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.
Command can be interrupted with an exit code != 0.
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.
I've updated the logic. I hope I got it right this time. Thanks.
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.
It may be worth adding the exit code when interrupted. WDYT?
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.
src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/header.html.twig
Show resolved
Hide resolved
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.
This is great thanks! 😻
Thank you @javiereguiluz. |
3ad1e42
to
041480f
Compare
This PR proposes some minor UI tweaks for the amazing feature contributed by @HeahDude in #47416.
First change
I propose to not display the
HTTP / Commands
toggle in the header of all pages. I don't think this should be an option with quick permanent access from all profiler pages.My proposal is to move the toggle to the search sidebar:
And here in action:

Second change
In my opinion, the current header of command profiles looks too similar to HTTP profiles:
Before / Light
Before / Dark
I propose to differentiate them a bit more and use the well-known "fake terminals" used on Symfony website and docs:
After / Light
After / Dark
The "fake terminals" look different depending on your OS. See this image (from top to bottom: macOS, Windows, Linux)