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

[WebProfilerBundle] Add a link of the current rendered template on the twig tab of the web debug toolbar #49753

Conversation

benjaminequation
Copy link

@benjaminequation benjaminequation commented Mar 21, 2023

[WebProfilerBundle] Add link to the web debug toolbar twig tab.

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

I added a link on the twig tab of the debug toolbar.
This link refers the last and current rendered template.
It improves the developer experience and avoid using CMD + Click (or CTRL + Click) on the twig tab to show the template.
It make the debug easier, especially if you set up IDE navigation.

Hope it'll help other developers.

link_twig

@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has a contribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (see https://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (see https://symfony.com/releases)
  • Features and deprecations must be submitted against the 6.3 branch.

Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.

When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@@ -62,6 +62,19 @@
<b>Macro Calls</b>
<span class="sf-toolbar-status">{{ collector.macrocount }}</span>
</div>
{% if collector.templates|keys %}
<div class="sf-toolbar-info-piece">
Copy link
Author

Choose a reason for hiding this comment

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

I added a condition to check if there is at least a rendered template.

@nicolas-grekas nicolas-grekas modified the milestones: 6.3, 6.4 May 23, 2023
@javiereguiluz
Copy link
Member

I'm closing this because I think it's the same idea that was merged in #49887 and released as part of 6.3.

If I'm wrong, we'll reopen this.

In any case, thanks a lot @benjaminequation for proposing this nice feature!

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.

None yet

5 participants