Skip to content

Commit 34d5f9e

Browse files
committed
bug #23584 Fix the design of the profiler exceptions when there is no message (javiereguiluz)
This PR was merged into the 3.3 branch. Discussion ---------- Fix the design of the profiler exceptions when there is no message | Q | A | ------------- | --- | Branch? | 3.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #23433 | License | MIT | Doc PR | - This changes a bit the HTML structure of exception pages so we can show exceptions without messages in a better way inside the profiler. ### Before ![before](https://user-images.githubusercontent.com/73419/28358961-092f845e-6c71-11e7-8225-63d01a8011f0.png) ### After ![after](https://user-images.githubusercontent.com/73419/28358968-0e6cfba4-6c71-11e7-9b76-3d6eb7a9f0bc.png) Commits ------- 25a47d8 Fix the design of the profiler exceptions when there is no message
2 parents a393697 + 25a47d8 commit 34d5f9e

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.html.twig

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="exception-summary">
1+
<div class="exception-summary {{ exception.message is empty ? 'exception-without-message' }}">
22
<div class="exception-metadata">
33
<div class="container">
44
<h2 class="exception-hierarchy">
@@ -13,9 +13,9 @@
1313
</h2>
1414
</div>
1515
</div>
16-
{% if exception.message is not empty %}
17-
<div class="container">
18-
<div class="exception-message-wrapper">
16+
17+
<div class="exception-message-wrapper">
18+
<div class="container">
1919
<h1 class="break-long-words exception-message {{ exception.message|length > 180 ? 'long' }}">
2020
{{- exception.message|nl2br|format_file_from_text -}}
2121
</h1>
@@ -25,7 +25,6 @@
2525
</div>
2626
</div>
2727
</div>
28-
{% endif %}
2928
</div>
3029

3130
<div class="container">

src/Symfony/Bundle/TwigBundle/Resources/views/exception.css.twig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ header .container { display: flex; justify-content: space-between; }
7979
.exception-hierarchy .icon { margin: 0 3px; opacity: .7; }
8080
.exception-hierarchy .icon svg { height: 13px; width: 13px; vertical-align: -2px; }
8181

82-
.exception-message-wrapper { display: flex; align-items: flex-start; min-height: 70px; padding: 10px 0 8px; }
82+
.exception-without-message .exception-message-wrapper { display: none; }
83+
.exception-message-wrapper .container { display: flex; align-items: flex-start; min-height: 70px; padding: 10px 0 8px; }
8384
.exception-message { flex-grow: 1; }
8485
.exception-message, .exception-message a { color: #FFF; font-size: 21px; font-weight: 400; margin: 0; }
8586
.exception-message.long { font-size: 18px; }

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/exception.css.twig

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
margin: 1em 0;
1717
padding: 10px;
1818
}
19+
.exception-summary.exception-without-message {
20+
display: none;
21+
}
1922

2023
.exception-message {
2124
color: #B0413E;
@@ -26,6 +29,6 @@
2629
display: none;
2730
}
2831

29-
.exception-message-wrapper {
32+
.exception-message-wrapper .container {
3033
min-height: auto;
3134
}

0 commit comments

Comments
 (0)
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