-
-
Notifications
You must be signed in to change notification settings - Fork 217
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
Conversation
@@ -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 %} |
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 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.
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.
Another alternative is to use a < 3
condition as you did in DoctrineBundle, by reversing the branches
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.
@javiereguiluz any chance to apply the request change ?
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 just updated this. I'm sorry for doing it so late 🙏
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 still don't see it as updated. Did you forgot to push your change ?
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.
Yes, sorry 😞 It should be fixed now. 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.
@javiereguiluz I still have this {% if profiler_markup_version == 3 %}
in the diff of the PR.
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.
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
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 commit changes line 69. This comment is on line 14.
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.
OK, now I feel like an idiot 🤦 I've just updated the line 14 too.
@stof thanks for the detailed review 🙏 I've fixed everything you said. This is how the toolbar looks now: |
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
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 %} |
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.
@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 %}
Also, the target branch should be 3.3.x, shouldn't it? |
@javiereguiluz can you squash your commits and change the target branch to be 3.3.x ? |
e76927b
to
4a5e39b
Compare
Fixes Fix issue with variable not available inside macro Fix logic Fix the icon version for real
4a5e39b
to
a140c32
Compare
Squashed and rebased. |
@javiereguiluz @stof I feel ignored 😅 |
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 😞 |
No worries :) |
@zairigimad the user icon has nothing to do with DoctrineMigrationsBundle |
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:
And this is the 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.