Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
fabpot merged 1 commit intosymfony:2.8fromaschempp:patch-1
Jan 25, 2016

Conversation

@aschempp
Copy link
Contributor

QA
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets-
LicenseMIT
Doc PR-

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 inright:0, left:0 on the element.

Manual testing is fairly easy: Just add a CSS classsf-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:
bildschirmfoto 2015-12-11 um 10 27 55

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

@nicolas-grekas
Copy link
Member

ping@javiereguiluz

@javiereguiluz
Copy link
Member

I can't reproduce the issue (Sf 3.0, Chrome 47, Mac):

panel_right

@aschempp
Copy link
ContributorAuthor

@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.
Also be aware that the rule is only active if the screen size is at least 768px.

@aschempp
Copy link
ContributorAuthor

Here's a follow-up screencast to show the problem.

uls4fk8jke

@fabpot
Copy link
Member

What's the status of this PR?@javiereguiluz Can you have a look at this one?

@javiereguiluz
Copy link
Member

I can confirm that this PR fixes the issue:

BeforeAfter
beforeafter

Thanks@aschempp.

@fabpot
Copy link
Member

Thank you@aschempp.

@fabpotfabpot merged commit79474a6 intosymfony:2.8Jan 25, 2016
fabpot added a commit that referenced this pull requestJan 25, 2016
…(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:![bildschirmfoto 2015-12-11 um 10 27 55](https://cloud.githubusercontent.com/assets/1073273/11740305/e2c94cfc-9ff1-11e5-86ae-1fd94ec5a93e.png)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
@fabpotfabpot mentioned this pull requestFeb 3, 2016
@fabpotfabpot mentioned this pull requestFeb 28, 2016
ostrolucky pushed a commit to ostrolucky/symfony that referenced this pull requestMar 25, 2018
…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:![bildschirmfoto 2015-12-11 um 10 27 55](https://cloud.githubusercontent.com/assets/1073273/11740305/e2c94cfc-9ff1-11e5-86ae-1fd94ec5a93e.png)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
@aschemppaschempp deleted the patch-1 branchNovember 23, 2019 10:51
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@aschempp@nicolas-grekas@javiereguiluz@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp