Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
Overriding profiler position in CSS breaks JS positioning#16961
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
nicolas-grekas commentedDec 18, 2015
ping@javiereguiluz |
javiereguiluz commentedDec 18, 2015
aschempp commentedDec 21, 2015
@javiereguiluz Looks like your panel popup is opening to the left. That's because the Doctrine panel seems not to be wide enough to have room for the width of the popup. Please try to add another panel that floats to the right so that the config panel should open to the right. |
aschempp commentedJan 13, 2016
fabpot commentedJan 25, 2016
What's the status of this PR?@javiereguiluz Can you have a look at this one? |
javiereguiluz commentedJan 25, 2016
I can confirm that this PR fixes the issue:
Thanks@aschempp. |
fabpot commentedJan 25, 2016
Thank you@aschempp. |
…(aschempp)This PR was merged into the 2.8 branch.Discussion----------Overriding profiler position in CSS breaks JS positioning| Q | A| ------------- | ---| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | -| License | MIT| Doc PR | -The positioning of a profiler info block (open to the left or right) is [calculated using Javascript](https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_js.html.twig#L35). Since Symfony 2.8, the config/version panel is right-aligned and opens to the left. If another panel is added to the right of it, the panel cannot open correctly.Styles are unset inhttps://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_js.html.twig#L46-L47 but that means it is set back to the stylesheet settings, which results in `right:0, left:0` on the element.Manual testing is fairly easy: Just add a CSS class `sf-toolbar-block-right` on one or multiple panels (e.g. Doctrine) that result in the Config panel to have enough room to open to the right.Here's a screenshot of the problem:The other option would be to set the position in javascript to `right: auto` instead of unsetting, but I prefer to fix invalid CSS ;-)Commits-------79474a6 Profiler CSS position conflicts with JS detection
…ioning (aschempp)This PR was merged into the 2.8 branch.Discussion----------Overriding profiler position in CSS breaks JS positioning| Q | A| ------------- | ---| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | -| License | MIT| Doc PR | -The positioning of a profiler info block (open to the left or right) is [calculated using Javascript](https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_js.html.twig#L35). Since Symfony 2.8, the config/version panel is right-aligned and opens to the left. If another panel is added to the right of it, the panel cannot open correctly.Styles are unset inhttps://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_js.html.twig#L46-L47 but that means it is set back to the stylesheet settings, which results in `right:0, left:0` on the element.Manual testing is fairly easy: Just add a CSS class `sf-toolbar-block-right` on one or multiple panels (e.g. Doctrine) that result in the Config panel to have enough room to open to the right.Here's a screenshot of the problem:The other option would be to set the position in javascript to `right: auto` instead of unsetting, but I prefer to fix invalid CSS ;-)Commits-------79474a6 Profiler CSS position conflicts with JS detection




The positioning of a profiler info block (open to the left or right) iscalculated using Javascript. Since Symfony 2.8, the config/version panel is right-aligned and opens to the left. If another panel is added to the right of it, the panel cannot open correctly.
Styles are unset inhttps://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar_js.html.twig#L46-L47 but that means it is set back to the stylesheet settings, which results in
right:0, left:0on the element.Manual testing is fairly easy: Just add a CSS class
sf-toolbar-block-righton one or multiple panels (e.g. Doctrine) that result in the Config panel to have enough room to open to the right.Here's a screenshot of the problem:

The other option would be to set the position in javascript to
right: autoinstead of unsetting, but I prefer to fix invalid CSS ;-)