Skip to content

WDT following AJAX requests #9692

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

Closed
wants to merge 3 commits into from
Closed

WDT following AJAX requests #9692

wants to merge 3 commits into from

Conversation

jeffreymb
Copy link
Contributor

This PR is for #8409 and the functionality in symfony/symfony#26655.

This is my first Doc PR so I'm happy for all the constrictive input there is to give. I'm really hoping this functionality can make 4.1.

@jeffreymb jeffreymb changed the title First attempt at documenting the WDT following AJAX requests WDT following AJAX requests Apr 27, 2018
Copy link
Contributor

@tomtomau tomtomau left a comment

Choose a reason for hiding this comment

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

I've left a few suggestions and flagged a few typos but otherwise looks good to me.

Thanks for teaching me something new as well!

.. index::
single: Profiling: WDT Auto-update after AJAX Request

How to make the Web Debug Toolbar Auto-upate after AJAX Requests
Copy link
Contributor

Choose a reason for hiding this comment

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

typo update

================================================================

For single page applications it is often inconvenient to find the profiler
information for the most recent request. It would be much more convient if it
Copy link
Contributor

Choose a reason for hiding this comment

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

typo convenient

Copy link
Contributor

Choose a reason for hiding this comment

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

Consider rephrase to:

It would be more convenient if the toolbar showed the information for the most recent AJAX request instead of the initial page load.

the toolbar would show the information from the most recent AJAX request
instead of your initial page load.

By setting the `Symfony-Debug-Toolbar-Replace` to a value of `1` in the
Copy link
Contributor

Choose a reason for hiding this comment

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

By setting the Symfony-Debug-Toolbar-Replace header to a value of 1


$response->headers->set('Symfony-Debug-Toolbar-Replace', 1);

Only setting the header durring development
Copy link
Contributor

Choose a reason for hiding this comment

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

typo during

Only setting the header durring development
-------------------------------------------

Ideally this header should only be set durring development and not for
Copy link
Contributor

Choose a reason for hiding this comment

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

typo during

Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps:

As the Web Debug Toolbar should not be used in production, this header should only be set in the development environment. This can be accomplished by creating a kernel.response event listener that is only registered in the development environment.

Copy link
Member

@javiereguiluz javiereguiluz left a comment

Choose a reason for hiding this comment

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

A fantastic feature and a very nice first contribution to Symfony Docs. Thanks a lot!

showed the information for the most recent AJAX request instead of the
initial page load.

By setting the `Symfony-Debug-Toolbar-Replace` header to a value of `1` in the
Copy link
Member

Choose a reason for hiding this comment

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

The syntax used in Symfony Docs is similar to Markdown, but different in some cases. One of those cases is the use of double backticks for code. This:

`Symfony-Debug-Toolbar-Replace`

should be written like this:

``Symfony-Debug-Toolbar-Replace``

Same for the 1 code used in the same phrase.


$response->headers->set('Symfony-Debug-Toolbar-Replace', 1);

Only setting the header during development
Copy link
Member

Choose a reason for hiding this comment

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

For titles we use a special "title case" where the first letter of most, but not all, words is uppercased. So, this title should be:

Only Setting the Header During Development
------------------------------------------

@jeffreymb jeffreymb deleted the wdt_follow_ajax branch May 2, 2018 09:41
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