-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[VarDumper] Minor fix for the uniformity #13090
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
Q | A |
---|---|
Bug fix? | no |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | no |
License | MIT |
Doc PR | no |
@@ -91,6 +91,10 @@ | |||
|
|||
{{ dump.data|raw }} | |||
</li> | |||
{% else %} | |||
<p> |
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 be <li>
and the indent should be one level back.
sure enough :) |
Just looking at the template, wouldn't it be better to apply same rule for count as above? And ff some, display the content?
|
ping @nicolas-grekas |
@@ -91,6 +91,10 @@ | |||
|
|||
{{ dump.data|raw }} | |||
</li> | |||
{% else %} | |||
<li> | |||
<em>No variables to dump</em> |
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.
No dumped variable
Can you add a screenshot please? |
In order to ensure consistency throughout the WebProfiler it should to use p instead of li because the font-size is not the same. (li => 13px, p => 14px) @nicolas-grekas Here is the screenshot: |
Yeah, but that's invalid HTML as you cannot use a p element inside an ul element. Instead, you should do something like: <ul class="alt">
+ {% if collection.dumpCount %}
- {% for dump in collector.getDumps('html') %}
- <li class="sf-dump sf-reset">
- in
- {% if dump.line %}
- {% set link = dump.file|file_link(dump.line) %}
- {% if link %}
- <a href="{{ link }}" title="{{ dump.file }}">{{ dump.name }}</a>
- {% else %}
- <abbr title="{{ dump.file }}">{{ dump.name }}</abbr>
- {% endif %}
- {% else %}
- {{ dump.name }}
- {% endif %}
- line {{ dump.line }}:
- <a onclick="Sfdump.toggle(this)">▶</a>
- <span class="sf-dump-compact">
- {% if dump.fileExcerpt %}{{ dump.fileExcerpt|raw }}{% else %}{{ dump.file|file_excerpt(dump.line) }}{% endif %}
- </span>
-
- {{ dump.data|raw }}
- </li>
- {% endfor %}
+ {% for dump in collector.getDumps('html') %}
+ <li class="sf-dump sf-reset">
+ in
+ {% if dump.line %}
+ {% set link = dump.file|file_link(dump.line) %}
+ {% if link %}
+ <a href="{{ link }}" title="{{ dump.file }}">{{ dump.name }}</a>
+ {% else %}
+ <abbr title="{{ dump.file }}">{{ dump.name }}</abbr>
+ {% endif %}
+ {% else %}
+ {{ dump.name }}
+ {% endif %}
+ line {{ dump.line }}:
+ <a onclick="Sfdump.toggle(this)">▶</a>
+ <span class="sf-dump-compact">
+ {% if dump.fileExcerpt %}{{ dump.fileExcerpt|raw }}{% else %}{{ dump.file|file_excerpt(dump.line) }}{% endif %}
+ </span>
+
+ {{ dump.data|raw }}
+ </li>
+ {% endfor %}
+ {% else %}
+ <p>No dumped variable</p>
+ {% endif %}
</ul>
|
@wouterj
|
@SofHad you should commit directly into this branch, the PR will be updated automatically. Btw, I think "No dumped data" or "No dumped variables" is better. |
Sorry, It is done now :) |
👍 |
1 similar comment
👍 |
Thank you @SofHad. |
This PR was submitted for the master branch but it was merged into the 2.6 branch instead (closes #13090). Discussion ---------- [VarDumper] Minor fix for the uniformity | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | no | License | MIT | Doc PR | no Commits ------- 7d02e48 [VarDumper] Minor fix for the uniformity
Closed via bad5169 |