Hide Light/Dark Mode and Login Info from Printed Pages #10553

Closed
opened 2025-12-29 21:33:04 +01:00 by adam · 2 comments
Owner

Originally created by @jchambers2012 on GitHub (Dec 9, 2024).

Originally assigned to: @jchambers2012 on GitHub.

Deployment Type

Self-hosted

Triage priority

I volunteer to perform this work (if approved)

NetBox Version

v4.1.7

Python Version

3.10

Steps to Reproduce

  1. Goto any object page at https://demo.netbox.dev/
  2. Ctrl-P
  3. View that the Lightmode/User menu exists.
    image

Expected Behavior

The site should suppress these items as they are also in the same section as the search input “d-print-none” 674af4d6bc/netbox/templates/base/layout.html (L60)

Observed Behavior

It looks like the desktop version print view is somehow using/trigger the mobile view. I tested on both Chrome (131.0.6778.109 (Official Build) (64-bit)) and Firefox (128.5.1esr (64-bit)). Adding “d-print-none” to mobile view fixes the issue.
image

Originally created by @jchambers2012 on GitHub (Dec 9, 2024). Originally assigned to: @jchambers2012 on GitHub. ### Deployment Type Self-hosted ### Triage priority I volunteer to perform this work (if approved) ### NetBox Version v4.1.7 ### Python Version 3.10 ### Steps to Reproduce 1. Goto any object page at https://demo.netbox.dev/ 2. Ctrl-P 3. View that the Lightmode/User menu exists. ![image](https://github.com/user-attachments/assets/19d8d757-40dd-406a-9424-63ec6b464072) ### Expected Behavior The site should suppress these items as they are also in the same section as the search input “d-print-none” https://github.com/netbox-community/netbox/blob/674af4d6bcfd724aef2c1d24bcc2725cb6b14c0e/netbox/templates/base/layout.html#L60 ### Observed Behavior It looks like the desktop version print view is somehow using/trigger the mobile view. I tested on both Chrome (131.0.6778.109 (Official Build) (64-bit)) and Firefox (128.5.1esr (64-bit)). Adding “d-print-none” to mobile view fixes the issue. ![image](https://github.com/user-attachments/assets/8cfff0cc-e9b0-4bf2-87d0-f3c11009df9c)
adam added the type: bugstatus: acceptedseverity: low labels 2025-12-29 21:33:04 +01:00
adam closed this issue 2025-12-29 21:33:04 +01:00
Author
Owner

@jchambers2012 commented on GitHub (Dec 9, 2024):

I can submit a PR is wanted for this fix: 458633275a

@jchambers2012 commented on GitHub (Dec 9, 2024): I can submit a PR is wanted for this fix: https://github.com/jchambers2012/netbox/commit/458633275aab0a6500d522afd07365d5b8447ed4
Author
Owner

@jeremystretch commented on GitHub (Dec 9, 2024):

Thanks @jchambers2012 I'll assign this to you for a PR.

@jeremystretch commented on GitHub (Dec 9, 2024): Thanks @jchambers2012 I'll assign this to you for a PR.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10553