Skip to content

[WebProfilerBundle] turbolinks compatibility #11504

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
Sep 23, 2014

Conversation

DraCzris
Copy link
Contributor

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? no
Fixed tickets -
License MIT
Doc PR -

Fix profiler when using turbolinks. (Without this, profiler is rendered without assets)

@weaverryan
Copy link
Member

@DraCzris What's turbolinks? It looks like a ruby on rails feature? Is it something else? How does it relate to Symfony?

Thanks!

@jakzal
Copy link
Contributor

jakzal commented Jul 29, 2014

more info on turbolinks and how those could be used with Symfony: #7410

@hason
Copy link
Contributor

hason commented Jul 31, 2014

@weaverryan PHP port of ruby on rails turbolinks - https://github.com/helthe/Turbolinks

@fabpot
Copy link
Member

fabpot commented Aug 5, 2014

I'm not a big fan of adding things that seems very specific and not widespread/standard.

@@ -1,6 +1,6 @@
<!-- START of Symfony2 Web Debug Toolbar -->
{% if 'normal' != position %}
<div id="sfMiniToolbar-{{ token }}" class="sf-minitoolbar">
<div id="sfMiniToolbar-{{ token }}" class="sf-minitoolbar" data-no-turbolink>
Copy link
Contributor

Choose a reason for hiding this comment

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

You can make this more general by using a block or variable that can be set in an extending template.

This file.

<div id="sfMiniToolbar-{{ token }}" class="sf-minitoolbar" {{ attributes_overwrite|default('')|raw }}>

Child template in app/or bundle (overwrites original using bundle inheritance).

{% extends '@WebProfilerBundle/Profiler/toolbar.html.twig' %}
{% set = attributes_overwrite=' data-no-turbolink' %}

This way its less one solution focused.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sstok I like this solution very much. I was just thinking to add possibility to add classes to profiler wrapper, but for javascript libraries this looks even better.

Copy link
Member

Choose a reason for hiding this comment

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

@sstok I agree that using a variable is a more generic solution. However, what would you think about replacing attributes_overwrite variable name by custom_attributes? The first name sounds like a verb (overwrite) instead of a noun. Moreover, you could add new attributes instead of rewrite the existing ones, so the first variable name could be inaccurate for some cases.

Copy link
Contributor

Choose a reason for hiding this comment

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

Just suggestion, better naming is welcome ;)

@fabpot
Copy link
Member

fabpot commented Sep 15, 2014

What do we do here? I can see two options here: merge as is or close it (I'm not a big fan of adding yet another configuration point.)

@fabpot
Copy link
Member

fabpot commented Sep 23, 2014

I guess it does not hurt to merge this afterall.

@fabpot fabpot merged commit c65b4c7 into symfony:2.3 Sep 23, 2014
fabpot added a commit that referenced this pull request Sep 23, 2014
This PR was merged into the 2.3 branch.

Discussion
----------

[WebProfilerBundle] turbolinks compatibility

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | no
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Fix profiler when using turbolinks. (Without this, profiler is rendered without assets)

Commits
-------

c65b4c7 [WebProfilerBundle] turbolinks compatibility
ostrolucky pushed a commit to ostrolucky/symfony that referenced this pull request Mar 25, 2018
…Czris)

This PR was merged into the 2.3 branch.

Discussion
----------

[WebProfilerBundle] turbolinks compatibility

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | no
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Fix profiler when using turbolinks. (Without this, profiler is rendered without assets)

Commits
-------

c65b4c7 [WebProfilerBundle] turbolinks compatibility
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.

10 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