Skip to content

Update the design of the Symfony Profiler panel #480

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
Feb 17, 2023

Conversation

javiereguiluz
Copy link
Contributor

This updates the design of the Symfony Profiler panel to match the new design introduced in symfony/symfony#47148

This is how it looks in the toolbar:

toolbar

And this is the panel:

profiler-panel

Information is now displayed in tabs (as suggested by folks of Symfony Slack). The "Configuration" contents haven't changed. The "Migrations" contents are the same but they include some tweaks and improvements.

@@ -13,29 +11,34 @@
{% set status_color = new_migrations > 0 ? 'red' : status_color %}

{% set icon %}
{{ include('@DoctrineMigrations/Collector/icon.svg') }}
{% if profiler_markup_version == 3 %}
Copy link
Member

Choose a reason for hiding this comment

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

this should use >= 3. If a v4 redesign is done, it is better for the bundle to show the v3 design than the v2 one when it is not updated yet.

Copy link
Member

Choose a reason for hiding this comment

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

Another alternative is to use a < 3 condition as you did in DoctrineBundle, by reversing the branches

Copy link
Member

Choose a reason for hiding this comment

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

@javiereguiluz any chance to apply the request change ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've just updated this. I'm sorry for doing it so late 🙏

Copy link
Member

Choose a reason for hiding this comment

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

I still don't see it as updated. Did you forgot to push your change ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, sorry 😞 It should be fixed now. Thanks.

Copy link
Member

Choose a reason for hiding this comment

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

@javiereguiluz I still have this {% if profiler_markup_version == 3 %} in the diff of the PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How strange. IS this a GitHub issue or am I doing something wrong and I don't realize?

The 4th commit of this PR is this one: 4eaeea2

Copy link
Member

Choose a reason for hiding this comment

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

this commit changes line 69. This comment is on line 14.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, now I feel like an idiot 🤦 I've just updated the line 14 too.

@javiereguiluz
Copy link
Contributor Author

@stof thanks for the detailed review 🙏 I've fixed everything you said.

This is how the toolbar looks now:

migrations-toolbar

fabpot added a commit to symfony/symfony that referenced this pull request Oct 9, 2022
This PR was squashed before being merged into the 6.2 branch.

Discussion
----------

[WebProfilerBundle] Profiler design fixes

| Q             | A
| ------------- | ---
| Branch?       | 6.2
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

This contains some minor tweaks and fixes for the new Profiler design introduced in #47148. I found some of them while upgrading the Doctrine Migrations Bundle panel (doctrine/DoctrineMigrationsBundle#480).

Commits
-------

117789b [WebProfilerBundle] Profiler design fixes
@javiereguiluz
Copy link
Contributor Author

Please, tell me if there's anything else I can do to make this mergeable. Thanks!


{% if profiler_markup_version >= 3 %}
</div> {# closes the <div class="metric-group"> #}
{% endif %}
Copy link
Member

@greg0ire greg0ire Feb 16, 2023

Choose a reason for hiding this comment

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

@javiereguiluz long time not working with Twig, but I think a better way to do this might be:

{% set metric_group %}
<!-- html goes here -->
{% endset %}
{% if profiler_markup_version >= 3 %}
    <div class="metric-group">{{ metric_group }}</div>
{% else %}
    {{metric_group}}
{% endif %}

@greg0ire
Copy link
Member

Also, the target branch should be 3.3.x, shouldn't it?

@stof
Copy link
Member

stof commented Feb 17, 2023

@javiereguiluz can you squash your commits and change the target branch to be 3.3.x ?

@javiereguiluz javiereguiluz changed the base branch from 3.2.x to 3.3.x February 17, 2023 09:29
Fixes

Fix issue with variable not available inside macro

Fix logic

Fix the icon version for real
@javiereguiluz
Copy link
Contributor Author

Squashed and rebased.

@stof stof added this to the 3.3.0 milestone Feb 17, 2023
@stof stof merged commit fdd08c2 into doctrine:3.3.x Feb 17, 2023
@javiereguiluz javiereguiluz deleted the update_profiler branch February 17, 2023 10:06
@greg0ire
Copy link
Member

@javiereguiluz @stof I feel ignored 😅

@javiereguiluz
Copy link
Contributor Author

Grégoire, sorry I missed your last comment. I didn't ignore you on purpose 🙏 As you see, I had some issues with this PR, so this is yet another issue 😞

@greg0ire
Copy link
Member

No worries :)

@zairigimad
Copy link

zairigimad commented Feb 17, 2023

Hello, I have a small visual issue, I don't know if it is tracked or not in the issues the user icon is so small
Capture d’écran 2023-02-17 à 12 42 01

@stof
Copy link
Member

stof commented Feb 17, 2023

@zairigimad the user icon has nothing to do with DoctrineMigrationsBundle

@zairigimad
Copy link

Hello, I have a small visual issue, I don't know if it is tracked or not in the issues the user icon is so small Capture d’écran 2023-02-17 à 12 42 01

Ah yes, you are right, sorry I'm in the wrong place

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.

4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy