fluentui-blazor icon indicating copy to clipboard operation
fluentui-blazor copied to clipboard

[Doc] Search for NavMenu

Open franklupo opened this issue 1 year ago • 9 comments

I added Search for NavMenu.

image

franklupo avatar Jun 28 '24 20:06 franklupo

What is the difference between this and the search top right?

Like the tags idea though. That could be useful.

vnbaaij avatar Jun 29 '24 05:06 vnbaaij

I like it above the menu, and I think the mobile experience is better.

franklupo avatar Jun 29 '24 07:06 franklupo

So there is no real difference between the two?

Could you include a video of how it works so we don't have to check out the branch ourselves? (tip, we use Peek to create animated gifs. Bit lighter then mp4 files)

I agree on the mobile experience argument. But if we are going to do this, then this needs to be a complete PR that also removes the other search option. I see no point in having both.

vnbaaij avatar Jun 29 '24 07:06 vnbaaij

peek_1

franklupo avatar Jun 29 '24 08:06 franklupo

Hmm, I would expect it to work more like the current search. So typing 'serv' would give you: image

I think when showing a search result, having the groups as entry point is not desirable. Just show the results. But then again, it does not give you the context of in what group an item lives anymore. I think adding this this will always introduce trade-offs.

Maybe it is better to not mix these two functionalities (search and navmenu) but just to move existing search to show above the nav menu (so we have a better mobile experience) and integrate in this existing search the tags functionality you added (to get better results) and not filter the menu.

vnbaaij avatar Jun 29 '24 08:06 vnbaaij

the idea is to help the user know where he is

franklupo avatar Jun 29 '24 08:06 franklupo

I don't see the advantage of adding functionality that already exists on the website.

On the other hand, I prefer this location (above the navigation)... but then several points need to be reviewed:

  1. It's not a "Search" but a "Filter".
  2. Add Immediate="true" ImmediateDelay="100".
  3. Groups must be automatically Expanded when filtering is applied (this is currently not the case), and using the "normal" state when no filter is applied.
  4. This filter zone is not responsive, which contradicts the advantage of using it on Mobile.
  5. I don't agree with changing the data model, adding Visible to handle a UI feature. We need to find another way, via a method that returns the list of useful navMenuItems for example. And put this code in a DemoNavMenu.razor.cs file and not in @code section.
  6. Who defines tag content? What criteria? It's great to have a feature, but it needs to be used.

dvoituron avatar Jun 29 '24 08:06 dvoituron

the idea is to help the user know where he is

You have the title of the page and the indication in the menu on the left for that.

dvoituron avatar Jun 29 '24 08:06 dvoituron

I don't see the advantage of adding functionality that already exists on the website.

Agreed, there should only be one

On the other hand, I prefer this location (above the navigation)...

Agreed

  1. It's not a "Search" but a "Filter".

I think and end user does not make that distinction.

  1. Add Immediate="true" ImmediateDelay="100".

Agreed

  1. Groups must be automatically Expanded when filtering is applied (this is currently not the case), and using the "normal" state when no filter is applied.

Agreed, but this wil be difficult to achieve as we don't have any notion of parent/child in the menu data structures. Should we add that?

  1. This filter zone is not responsive, which contradicts the advantage of using it on Mobile. Agreed
  1. I don't agree with changing the data model, adding Visible to handle a UI feature. We need to find another way, via a method that returns the list of useful navMenuItems for example. And put this code in a DemoNavMenu.razor.cs file and not in @code section.

Agreed

  1. Who defines tag content? What criteria? It's great to have a feature, but it needs to be used.

We could perhaps better use the Data property that we already have for this tagging info (every FluentComponentBase derived component has Data parameter). Then the dev can just add that either in a declarative ay or when building the Items collection.

Maybe we should not try to integrate this into the NavMenu but make it a separate component akin to the FluentPaginator/FluentDataGrid. If you want to use it, you set a parameter on the NavMenu and it will be used.

vnbaaij avatar Jun 30 '24 08:06 vnbaaij

Closing this as there has been no activity for a while.

vnbaaij avatar Nov 19 '24 08:11 vnbaaij