Is your feature request related to a problem? Please describe.
The search navigation web part reduced the complexity required within each search page. Additionally as search verticals were not working perfectly in previous releases many clients used search navigation. They were also useful to add direct links into specific vertical searches which may be scattered around an Intranet/Teams tabs.
Describe the solution you'd like
Concerned some clients may see this breaking change as happening to fast & refactoring required being too significant to comfortably move forward with these modern search webparts. Restore the search navigation web part in this release and deprecate over a longer period of time (if at all).
Describe alternatives you've considered
Refactoring existing implementation. May be too significant a change that implies a full rewrite is required. Clients are weary of customizations already so we need a better upgrade path allowing early adopters to maintain existing implementations while keeping components upgraded.
Additional context
Appreciate the effort & want to reiterate what a good job you guys are doing!
Agreed. We use search navigation to push our intranet users from site to site with different search verticals in different sites. Mainly we are pushing users from a custom search in a site up to our overall company default search of a hub. Navigation webpart was used to do this.
Ok I understand. What if features of the search navigation were integrated in the search verticals WP? Basically the ability to redirect to a custom link when a category is clicked, so we would have to modes (query template vs direct link? For now you can stick to the 3.10.0 version if an upgrade is not possible. I'll try to update this in the next release.
That would work for me. I just need a way to pass the current search query over to another search page in a totally different site.
That would work for me too. Only caveat being not to over complicate any code. The way the search navigation worked was totally fine! Thanks @FranckyC !! Would also like to contribute soon and eagerly awaiting the docs on how to participate. Have a couple suggestions with working code I can post in a fork!
@malcom1120 @MakingThingsWorkToronto should be resolved by #211 . Please take a look and tell me if it suits your requirements. Pay attention to the doc also for tokens (not published yet, so use md files for now).
That fix looks like what we need. Thanks for quickly getting that done.
@malcom1120 Could you test against develop branch and tell me if everything ok for you?
@FranckyC I tested the develop branch and not sure the tokens are working. Connected the search results web part to the verticals. The search box is connected to the page query string q and the search results are connected to the search box.
Updated people search vertical to "Is Hyperlink" and configured the URL for testing as follows:
https://tenant.sharepoint.com/sites/react-search-refiners/SitePages/People-Search.aspx?q={searchTerms}&d={CurrentDate}&y={CurrentYear}&m={CurrentMonth}&qs={QueryString.q}&tu={TenantUrl}&sbq={SearchBoxQuery}
The page navigated to the following URL:
https://tenant.sharepoint.com/sites/react-search-refiners/SitePages/People-Search.aspx?q=undefined&d=26&y=2020&m=4&qs=ContentTypeId:%220x01004E708E11E08923449EEB1E4B2E802579%22&tu=https://tenant.sharepoint.com&sbq=undefined
Neither the {searchTerms} nor {SearchBoxQuery} are populated. The work around is obviously to use the {QueryString.q} token, however I'm curious if this is by design?
Additional feedback:
Thanks for adding this functionality!
@FranckyC - I just tested as well. I got the same results. The {searchTerms} and {SearchBoxQuery} tokens didn't work, but the {QueryString.q} did for me.
I too would like the option to show a Icon or not. Right now, I don't see a need for the icon in my scenario since I will have three links and I didn't see a way to pick my Icon so they would all be the same icon. I would just prefer to not have the icon.
@malcom1120 What s your setup. BTW if you don't want an icon, simply leave the field blank. For the search tokens, they are populated when the search text is submitted (i.e. when you press enter in the search box). Is it what you are doing during your tests?
@FranckyC - Let me try again. I did leave the icon field blank, but it still put the link icon. I looked at the code and it looks like it forces an icon if the vertical is a link. Either the External or Link icons depending on the behavior type.
So what I was doing is coming to my search page using the q parameter from another site collection (part of a hub, but the default search page for this site is another search page in another site collecition). It performs the search are returns results. They I click on the link to send the result back up to another search page (this one is the main hub search page) using the q parameter. If I make it the {searchTerm} token it doesn't work, but the querystring.q one did.
Now I didn't test that if I change the query in the search box, did it work. It could be timing on initial load.
Let me do some more testing.
@FranckyC - I just retested with {searchTerms} - It works if you change the query in the search box, but not on the initial load. So if the user doesn't do anything, they get the undefined on the link.
@malcom1120 SHould be fixed in the develop branch by now. Can you test again?
@FranckyC - I can confirm the tokens are now populated.
Can also confirm the icon for the vertical can be removed as you suggested.
However I still see the new tab / link icon visible. Most non-technical users won't understand what this means - if there is no option to disable that I'd vote it off the island :)
Great work & thanks again!
I'll leave this for now. We'll see if users are complaining ;)
Most helpful comment
Ok I understand. What if features of the search navigation were integrated in the search verticals WP? Basically the ability to redirect to a custom link when a category is clicked, so we would have to modes (query template vs direct link? For now you can stick to the 3.10.0 version if an upgrade is not possible. I'll try to update this in the next release.