Skip to content

[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

Merged
merged 1 commit into from
Oct 19, 2023

Conversation

javiereguiluz
Copy link
Member

@javiereguiluz javiereguiluz commented Oct 18, 2023

Q A
Branch? 6.4
Bug fix? no
New feature? no
Deprecations? no
Tickets -
License MIT

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:

search-before-after

And here in action:
http-commands-toggle

Second change

In my opinion, the current header of command profiles looks too similar to HTTP profiles:

Before / Light

command-profile-before-light

Before / Dark

command-profile-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

command-profile-after-light

After / Dark

command-profile-after-dark


The "fake terminals" look different depending on your OS. See this image (from top to bottom: macOS, Windows, Linux)

terminal-os

Copy link
Contributor

@HeahDude HeahDude left a 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 %}
Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Contributor

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, let's do it. This is how it looks:

interrupted-exit-code

Copy link
Contributor

@HeahDude HeahDude left a 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! 😻

@fabpot
Copy link
Member

fabpot commented Oct 19, 2023

Thank you @javiereguiluz.

@fabpot fabpot force-pushed the update_cli_profiler branch from 3ad1e42 to 041480f Compare October 19, 2023 06:42
@fabpot fabpot merged commit 7402279 into symfony:6.4 Oct 19, 2023
@javiereguiluz javiereguiluz deleted the update_cli_profiler branch October 19, 2023 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants