8000 [WebProfilerBundle] Hide debug toolbar in print view by jt2k · Pull Request #38606 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[WebProfilerBundle] Hide debug toolbar in print view #38606

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

Merged
merged 1 commit into from
Oct 16, 2020

Conversation

jt2k
Copy link
Contributor
@jt2k jt2k commented Oct 16, 2020
Q A
Branch? 3.4
Bug fix? yes
New feature? no
Deprecations? no
License MIT

The debug toolbar is intended to be hidden when printed. This was accomplished in 2.8 with this PR. Since then, additional JavaScript code was added which results in display: block being applied directly to the toolbar element. This overrides the print style, which causes the toolbar to show up in the print view. I fixed this by adding !important to the print CSS display rule.

A few notes:

  1. I hesitated to solve this with !important but couldn't come up with another way to make this work with the existing JavaScript code. Also, profiler.css.twig already has some !important styles, so I figured this was acceptable.
  2. I wasn't sure how to write a test for this, but I am open to ideas.

@fabpot
Copy link
Member
fabpot commented Oct 16, 2020

Thank you @jt2k.

@fabpot fabpot merged commit 4b4abc3 into symfony:3.4 Oct 16, 2020
@jt2k
Copy link
Contributor Author
jt2k commented Oct 16, 2020

Thanks, @fabpot and @stof. I see this is already merged, but I am curious about your comment, @jderusse. According to the release page, 3.4 is maintained for bug fixes until November 2020. Are we in a window now where bug fixes targeting 3.4 are discouraged due to the proximity to November 2020?

@jderusse
Copy link
Member

@jt2k yes, you're right. sorry for the confusion

8000

@jt2k
Copy link
Contributor Author
jt2k commented Oct 16, 2020

@jderusse No problem! That was a good reminder for me that 3.4 is going into security-only maintenance soon!

@jt2k jt2k deleted the debug-toolbar-hide-print branch October 16, 2020 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0