Stop hiding search box in menu bar #1147

Closed
opened 2025-12-29 16:29:26 +01:00 by adam · 15 comments
Owner

Originally created by @awfki on GitHub (Aug 4, 2017).

Issue type: feature request

Python version: 2.7.5
NetBox version: 2.1.1

The search box in the menu bar (upper-right corner next to the login name) is hidden when the window is less than 1600 pixels wide. At 1200 pixels wide there still seems to be plenty of space for that box. That's a key UI element for my users so I'd love it if we could leave it visible as much as possible.
Originally created by @awfki on GitHub (Aug 4, 2017). <!-- Please note: GitHub issues are to be used only for feature requests and bug reports. For installation assistance or general discussion, please join us on the mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please indicate "bug report" or "feature request" below. Be sure to search the existing set of issues (both open and closed) to see if a similar issue has already been raised. --> ### Issue type: feature request <!-- If filing a bug, please indicate the version of Python and NetBox you are running. (This is not necessary for feature requests.) --> **Python version: 2.7.5** **NetBox version: 2.1.1** <!-- If filing a bug, please record the exact steps taken to reproduce the bug and any errors messages that are generated. If filing a feature request, please precisely describe the data model or workflow you would like to see implemented, and provide a use case. --> The search box in the menu bar (upper-right corner next to the login name) is hidden when the window is less than 1600 pixels wide. At 1200 pixels wide there still seems to be plenty of space for that box. That's a key UI element for my users so I'd love it if we could leave it visible as much as possible.
adam added the type: feature label 2025-12-29 16:29:26 +01:00
adam closed this issue 2025-12-29 16:29:26 +01:00
Author
Owner

@jeremystretch commented on GitHub (Aug 7, 2017):

Could you please submit a pull request with the modified CSS you'd like to implement?

@jeremystretch commented on GitHub (Aug 7, 2017): Could you please submit a pull request with the modified CSS you'd like to implement?
Author
Owner

@awfki commented on GitHub (Aug 8, 2017):

Created PR 1404.
https://github.com/digitalocean/netbox/pull/1404

@awfki commented on GitHub (Aug 8, 2017): Created PR 1404. https://github.com/digitalocean/netbox/pull/1404
Author
Owner

@jeremystretch commented on GitHub (Aug 8, 2017):

The problem with this is that the search box gets bumped down a line with longer usernames (e.g. when email addresses are used as usernames).

@jeremystretch commented on GitHub (Aug 8, 2017): The problem with this is that the search box gets bumped down a line with longer usernames (e.g. when email addresses are used as usernames).
Author
Owner

@bellwood commented on GitHub (Aug 9, 2017):

I would say:

  1. at that breakpoint, provide an icon that when clicked gives search in a drop down

  2. when the navbar collapses, add search to the head of the menuing items

Would be similar to this:
https://bootsnipp.com/snippets/featured/navbar-search-add-on-bs-3

...but with the added dropdown for search at the larger breakpoint

If this is something agreeable I will make a UI PR

@bellwood commented on GitHub (Aug 9, 2017): I would say: 1) at that breakpoint, provide an icon that when clicked gives search in a drop down 2) when the navbar collapses, add search to the head of the menuing items Would be similar to this: https://bootsnipp.com/snippets/featured/navbar-search-add-on-bs-3 ...but with the added dropdown for search at the larger breakpoint If this is something agreeable I will make a UI PR
Author
Owner

@jeremystretch commented on GitHub (Aug 9, 2017):

@bellwood sounds good to me.

@jeremystretch commented on GitHub (Aug 9, 2017): @bellwood sounds good to me.
Author
Owner

@bellwood commented on GitHub (Aug 9, 2017):

Will do

@bellwood commented on GitHub (Aug 9, 2017): Will do
Author
Owner

@bellwood commented on GitHub (Aug 10, 2017):

So some thoughts here... Being that we can't assume how long a username will be and therefore accommodate every installation, what if we simply moved the search out of the nav header and either:

  1. sticky a container wide search bar under the nav header that is always persistent

  2. move the search to an off-screen canvas that you can pull out when needed

In the spirit of keep things simple and universal, option 1 seems best, however I can see how some folks may not want to give up 50-ish pixels of vertical real-estate.

As a compromise for option 1 we could add an icon to the menu that toggles the visibility of the search box

Just wanted some further input before I make PR's without the input of other users.

@bellwood commented on GitHub (Aug 10, 2017): So some thoughts here... Being that we can't assume how long a username will be and therefore accommodate every installation, what if we simply moved the search out of the nav header and either: 1) sticky a container wide search bar under the nav header that is always persistent 2) move the search to an off-screen canvas that you can pull out when needed In the spirit of keep things simple and universal, option 1 seems best, however I can see how some folks may not want to give up 50-ish pixels of vertical real-estate. As a compromise for option 1 we could add an icon to the menu that toggles the visibility of the search box Just wanted some further input before I make PR's without the input of other users.
Author
Owner

@jeremystretch commented on GitHub (Aug 10, 2017):

The first option I think is too wasteful of screen space. I like the idea of an icon that pops down a little search box. It'd still be just one click if showing the dropdown autofocuses on the search field.

@jeremystretch commented on GitHub (Aug 10, 2017): The first option I think is too wasteful of screen space. I like the idea of an icon that pops down a little search box. It'd still be just one click if showing the dropdown autofocuses on the search field.
Author
Owner

@bellwood commented on GitHub (Aug 10, 2017):

ScreenShot 1

ScreenShot 2

ScreenShot 3

How does this look for the various screen sizes?

Edit: no clue why GH isn't inlining the screenshots

@bellwood commented on GitHub (Aug 10, 2017): ![ScreenShot 1](https://user-images.githubusercontent.com/2453632/29186418-6b26b6e4-7dda-11e7-9f4b-681e6f9409d7.png) ![ScreenShot 2](https://user-images.githubusercontent.com/2453632/29186417-6b21420e-7dda-11e7-891f-65cc4e2b7d54.png) ![ScreenShot 3](https://user-images.githubusercontent.com/2453632/29186416-6b2053ee-7dda-11e7-9a28-5b449b089f84.png) How does this look for the various screen sizes? Edit: no clue why GH isn't inlining the screenshots
Author
Owner

@bellwood commented on GitHub (Aug 23, 2017):

Feedback on this, anyone?

@bellwood commented on GitHub (Aug 23, 2017): Feedback on this, anyone?
Author
Owner

@jeremystretch commented on GitHub (Aug 23, 2017):

@bellwood might make sense to have the search bar both embedded in the nav menu and as a dropdown, and only display one or the other depending on the screen size (so that the search bar appears to condense into a dropdown when the screen shrinks).

@jeremystretch commented on GitHub (Aug 23, 2017): @bellwood might make sense to have the search bar both embedded in the nav menu _and_ as a dropdown, and only display one or the other depending on the screen size (so that the search bar appears to condense into a dropdown when the screen shrinks).
Author
Owner

@awfki commented on GitHub (Aug 23, 2017):

That would be acceptable though my preference would be to keep the search
box visible all the time.

I'd prefer condensing the username into an icon or condensing the menu by
hiding the sub-menus one at a time. So for instance, Secrets shifts to a
drop down on the end of the menu, then Circuits, etc.

On Wed, Aug 23, 2017 at 9:16 AM, Jeremy Stretch notifications@github.com
wrote:

@bellwood https://github.com/bellwood might make sense to have the
search bar both embedded in the nav menu and as a dropdown, and only
display one or the other depending on the screen size (so that the search
bar appears to condense into a dropdown when the screen shrinks).


You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/digitalocean/netbox/issues/1397#issuecomment-324327312,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEAkYjqFQWIoT0Kcfo-L3zSYFk4sqo3wks5sbCYygaJpZM4Otyt1
.

@awfki commented on GitHub (Aug 23, 2017): That would be acceptable though my preference would be to keep the search box visible all the time. I'd prefer condensing the username into an icon or condensing the menu by hiding the sub-menus one at a time. So for instance, Secrets shifts to a drop down on the end of the menu, then Circuits, etc. On Wed, Aug 23, 2017 at 9:16 AM, Jeremy Stretch <notifications@github.com> wrote: > @bellwood <https://github.com/bellwood> might make sense to have the > search bar both embedded in the nav menu *and* as a dropdown, and only > display one or the other depending on the screen size (so that the search > bar appears to condense into a dropdown when the screen shrinks). > > — > You are receiving this because you modified the open/close state. > Reply to this email directly, view it on GitHub > <https://github.com/digitalocean/netbox/issues/1397#issuecomment-324327312>, > or mute the thread > <https://github.com/notifications/unsubscribe-auth/AEAkYjqFQWIoT0Kcfo-L3zSYFk4sqo3wks5sbCYygaJpZM4Otyt1> > . >
Author
Owner

@bellwood commented on GitHub (Aug 24, 2017):

I'd prefer condensing the username into an icon

That may honestly be preferable, then the search as it exists (with a change to the CSS media query to hide it) would natively collapse on its own...

Would be as simple as wrapping the username in a span that hides at the same collapse point as the rest of the menu

I'm all for keeping things simple

@bellwood commented on GitHub (Aug 24, 2017): >> I'd prefer condensing the username into an icon That may honestly be preferable, then the search as it exists (with a change to the CSS media query to hide it) would natively collapse on its own... Would be as simple as wrapping the username in a span that hides at the same collapse point as the rest of the menu I'm all for keeping things simple
Author
Owner

@traveler3468 commented on GitHub (Aug 24, 2017):

Im ok with the way things are to be honest. The global search doesnt need to be visible while viewing more specific data. As long as the search for the specific data is available then you dont need to global search. If youre searching globally then go back to the home page and search there.

@traveler3468 commented on GitHub (Aug 24, 2017): Im ok with the way things are to be honest. The global search doesnt need to be visible while viewing more specific data. As long as the search for the specific data is available then you dont need to global search. If youre searching globally then go back to the home page and search there.
Author
Owner

@jeremystretch commented on GitHub (Nov 15, 2017):

This was addressed in 124878e

@jeremystretch commented on GitHub (Nov 15, 2017): This was addressed in 124878e
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1147