RFC: Search box to browse the menus


#1

I think that it would be nice to have a search box at the top of the Foreman UI, so we can start writing the name of the section we are looking for instead of searching it at the menus.

As an example, sometimes it’s difficult to remember where the “Operating Systems” section was, so I think it could be great to have something like this:

I think I could implement it and send a PR!


#2

Sergio, welcome to the forums.

It’s definitely an interesting idea, but I feel like having two search boxes on a page is not best user experience - we already do have one search box on almost all index pages. We do have a long-term goal providing single search box in the future however, that would be appreciated if you would like to work towards that. Be warned this is ton of work.

But let me ask you, why would you want to do that? Is my assumption correct that you find our main menu confusing? I find it too and some of us agreed on this, yet we were not able to come up with some good solution to this problem:

I belive the menu needs to be redesigned.


#3

if you are considering implementing this, there are a few things to take into account:

first, have a look at exiting issues (and related issues) such as Feature #5455: Have a quicksearch across the application - Foreman
second, you should be aware that a rewrite of the search bar is pending merge at https://github.com/theforeman/foreman/pull/5771, so any improvements should be based on top of that work.

Thanks for starting this conversation!


#4

Thanks for the answers! :slight_smile:

Yeah! The reason I’m proposing it is that I feel the main menu a little bit confusing. Sometimes I have to spend time trying to find in which menu is the section I’m looking for.

If we had a “menu search” feature as this one, it would be possible to open the sections directly just writing the name of the section we want to use as we open the Satellite UI.

I think that having two search boxes could be a little bit confusing too, but I think it might be possible to design them so there are no confussions.

For example, the top search bar could have a color really close to the background color present on the bar, and at the same time, a placeholder showing something as “Menu search”, while the search boxes which are present at the index pages currently have a different and clear style.

As long as it would be just to search through the menus as a navigation complement, I think it would not be extremely complicated to implement it, since it would not be related to any of the existing search functionalities, and everything would be done at the frontend.

But, I would say that this idea is decoupled from the current search functionalities, since it would not search on any resources but on the navigation menu!


#5

Sure, those are good arguments to have a common search, I would love to have google-like experience. Bare in mind that if you attempt to drop a second search component onto page, you will hit bugs - our code currently assumes that there is just one search box on a page. It probably can be fixed somehow :slight_smile:


#6

Which code are you referring to?


#7

Sorry I don’t remember anymore, I had issues in discovery long ago. Dropdown was not working properly.


#8

I’ve been wishing this for ages and talking about that for a long time. @Shimon_Shtein even tried to create something like this as a dashboard widget, but faced a lot of limitations by the dashboard page. So unfortunately it never happened.

As a regular Foreman user, I must say it’s way too complicated to browse to a host (or any other object). Having a global search would solve this perfectly. I think having a global search box would improve UX a whole lot. Big :+1: from me.


#9

Would be happy to heard the @ui_ux team weigh in on this as well


#10

Just as a workaround I created a small plugin that uses browser’s omnibox/search box to search for any object.
Hope it helps.