-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[WebProfilerBundle] Add clickable entry view to debug toolbar #49887
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
i'm doing the same thing as you describe and i think this is very cool for DX. hey @javiereguiluz wdyt ? |
This would be a great improvement and time saver |
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 forgot to mention, without the IDE integration enabled, the link will link to a page showing the source code of the twig file within the profiler view (like it does with the controller) another cool feature we gain here is the quick ability to get from the rendered view, to viewing the twig source code (when IDE Integration is not enabled) |
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.
Cool
0d851d2
to
1c6152e
Compare
Thank you @PhilETaylor. |
🚀 Thank you all... |
…view (javiereguiluz) This PR was merged into the 6.3 branch. Discussion ---------- [WebProfilerBundle] Tweak the HTML code of the Twig entry view | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Stretched links are used to make entire sections, like a card, clickable. See https://getbootstrap.com/docs/5.3/helpers/stretched-link/ Maybe `@PhilETaylor` can answer us about this (he made the original PR to add this in #49887) but I think it wasn't intended to make entire Twig panel clickable to open the template. So, in this PR I propose to remove this behavior. Here you can see how in the Security panel, the link is not stretched but in the Twig panel it is:  Commits ------- c9ed471 [WebProfilerBundle] Tweak the HTML code of the Twig entry view
Just a proposed idea.
One of the great parts of the tool bar is the Clickable IDE integration to quickly jump to the Controller method that the page is rendered from.
example:
One thing I find myself doing often is needing to get to the rendered view (a twig returned by the controller method with
return $this->render('template.twig.html,[]);
etc. To do that I need to Hover the toolbar left corner, move up and click the controller, wait for phpStorm to load the controller file, then scroll down to find the rendered view, then go and find it manually in the tree (or with the phpStorm Symfony plugin (amazing plugin) use the gutter icon to select the view).After this PR the first template used in the stack will be rendered into to the twig debug toolbar (much like the controller in the request toolbar) and will be clickable if the IDE integration is enabled meaning less clicks to get from the webpage to the twig template to make changes in HTML quickly.
Just a thought, would make less clicks...thoughts?