-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[WebProfilerBundle] Render the toolbar stylesheet #58287
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
src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ProfilerControllerTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_js.html.twig
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_js.html.twig
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php
Outdated
Show resolved
Hide resolved
src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ProfilerControllerTest.php
Outdated
Show resolved
Hide resolved
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.
nice one 👍
src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php
Outdated
Show resolved
Hide resolved
7c9dd5a
to
c36fcff
Compare
Thank you @smnandre. |
This change breaks the style of the toolbar for some users: What about: 1.adding a parameter to use the “old” way? Update: never mind, a solution has been found: |
…xislefebvre) This PR was merged into the 7.2 branch. Discussion ---------- [WebProfilerBundle] fix loading of toolbar stylesheet | Q | A | ------------- | --- | Branch? | 7.2 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix #59045 | License | MIT It looks like this PR - #58287 Caused issues with some configurations: - #59045 According to the thumb-up emoji on [this comment](#59045 (comment)) (I don’t have a better measurement of the impact), it affected at least 10 users, with various web servers. Proposals: 1. do not use the `.css` file extension so that servers do not try to serve an actual file 2. if we consider that the disappearance of the style of the profiler’s toolbar is a breaking change, the `.css` file extension could be added back with Symfony 8.0, with a note to help people upgrade (see the workarounds in the issue) Commits ------- 7fef930 fix: loading of WebProfilerBundle’s toolbar stylesheet
If the stylesheet is static why not just serve a static asset instead ? |
I guess because service a static asset would require to know its public path, which is harder to grant than a routed URL ? |
Render the (static) toolbar stylesheet separately from the (dynamic) toolbar content.
(avoid the 20ko inlined CSS injection on every page)