Blog on Streamlining Search in MadCap Flare with a Dynamic Dropdown

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
rogersm
Sr. Propeller Head
Posts: 106
Joined: Fri Nov 07, 2014 4:29 am

Blog on Streamlining Search in MadCap Flare with a Dynamic Dropdown

Post by rogersm »

Hi all,

There is a blog on the madcap site around search from Mattias Sander (https://www.madcapsoftware.com/blog/fla ... -dropdown/). It is very nice. Unfortunately, there is no way to respond to Mattias directly from the blog to ask a question. Anyway, I tried out his update and it works well, but I have noticed an issue with it that maybe someone else has noticed or fixed. Here are the steps to reproduce the issue:
  • Enter a search term in the search box, the search drop-down displays results.
  • Click away from the search box, maybe some whitespace in the page and the search drop-down disappears
  • Delete the search term in the search box
  • Enter a search term in the search box, the drop-down does not display. If I refresh the browser window and enter the search term again, the drop-down will display.
Is there something in the javascript provided by Mattias that could be updated to fix this?

thanks,
mark
AlexFox
Sr. Propeller Head
Posts: 265
Joined: Thu Oct 19, 2017 1:56 am

Re: Blog on Streamlining Search in MadCap Flare with a Dynamic Dropdown

Post by AlexFox »

Hi,

Mattias is the owner of ImprovementSoft and makes several MadCap plugins, you should be able to contact him at mattias@improvementsoft.com
rogersm
Sr. Propeller Head
Posts: 106
Joined: Fri Nov 07, 2014 4:29 am

Re: Blog on Streamlining Search in MadCap Flare with a Dynamic Dropdown

Post by rogersm »

Thank Alex, I'll contact him separately.
Nita Beck
Senior Propellus Maximus
Posts: 3672
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Blog on Streamlining Search in MadCap Flare with a Dynamic Dropdown

Post by Nita Beck »

Mattias also has his own #improvement-soft channel in the Flare Slack community. He regularly engages there.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Nita Beck
Senior Propellus Maximus
Posts: 3672
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Blog on Streamlining Search in MadCap Flare with a Dynamic Dropdown

Post by Nita Beck »

Correction: His channel is called #improvementsoft-plugins.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
rogersm
Sr. Propeller Head
Posts: 106
Joined: Fri Nov 07, 2014 4:29 am

Re: Blog on Streamlining Search in MadCap Flare with a Dynamic Dropdown

Post by rogersm »

Thanks Nita, yes he got back to me by email and adjusted the javascript so all good.
AlexFox
Sr. Propeller Head
Posts: 265
Joined: Thu Oct 19, 2017 1:56 am

Re: Blog on Streamlining Search in MadCap Flare with a Dynamic Dropdown

Post by AlexFox »

Please share the fix here if possible, just in case others stumble across this thread with the same problem :D
rogersm
Sr. Propeller Head
Posts: 106
Joined: Fri Nov 07, 2014 4:29 am

Re: Blog on Streamlining Search in MadCap Flare with a Dynamic Dropdown

Post by rogersm »

The updated code is here: https://www.improvementsoft.com/blog/fl ... h-dropdown. Mattias intends to update the Madcap blog with the same.
JHolmes2022ukg
Jr. Propeller Head
Posts: 7
Joined: Fri Jun 17, 2022 8:58 am

Re: Blog on Streamlining Search in MadCap Flare with a Dynamic Dropdown

Post by JHolmes2022ukg »

First, this is awesome! Thanks to Mattias Sander for sharing this!

However, though I can apply this to a search bar proxy, I'd like to apply it to the search bar in the header of the skin. I'm using a sidenav skin, so there is no toolbar proxy available. Any suggestions? Has anyone else done this?

Thanks in advance!
JHolmes2022ukg
Jr. Propeller Head
Posts: 7
Joined: Fri Jun 17, 2022 8:58 am

Re: Blog on Streamlining Search in MadCap Flare with a Dynamic Dropdown

Post by JHolmes2022ukg »

Just in case it helps someone else, I figured out how to add the dynamic dropdown to the search bar in the header.

In the javascript, replace the '.main-section' selector with the selector for the search bar in the header (found this using the developer tools in Chrome). In my skin, the selector was '.nav-search-wrapper.'

Call the js file from the master page. I put the script call at the top of the body, just after the open tag.

Thank you to all the more adept javascript people for helping the rest of us out! :D
rogersm
Sr. Propeller Head
Posts: 106
Joined: Fri Nov 07, 2014 4:29 am

Re: Blog on Streamlining Search in MadCap Flare with a Dynamic Dropdown

Post by rogersm »

Just for information. I noticed an issue if a search query in the dynamic dialog box includes a quotation mark “ or the Boolean keyword not. The attached dialog box displays.
dropdowndialogpopup.png
This dialog displays in the normal search box also but after have you hit the Enter key, but it is just more apparent in the dynamic dropdown. I have relayed this to Mattias.
You do not have the required permissions to view the files attached to this post.
rogersm
Sr. Propeller Head
Posts: 106
Joined: Fri Nov 07, 2014 4:29 am

Re: Blog on Streamlining Search in MadCap Flare with a Dynamic Dropdown

Post by rogersm »

The issue with quotation marks and Boolean keywords that I previously referenced has now been resolved by Mattias. You need to replace the handleSearch function with what is attached. I have tested and it works okay for me.
You do not have the required permissions to view the files attached to this post.
ryanr
Jr. Propeller Head
Posts: 5
Joined: Mon Jul 17, 2017 2:08 pm

Re: Blog on Streamlining Search in MadCap Flare with a Dynamic Dropdown

Post by ryanr »

Hi all,

I'm doing a POC for incorporating this type ahead search into our company doc sites. (Thank you, Mattias! It is such a nice improvement!)

It is all working well in my POC, except for this: When I click a search result from the type ahead dropdown and go to that page, the search terms are not highlighted. If I hit enter while searching to go to my standard search results page, and then select a page from there, the highlights DO appear as they always have.

Is that expected behavior, or have I done something wrong?

Thanks!
Ryan
rogersm
Sr. Propeller Head
Posts: 106
Joined: Fri Nov 07, 2014 4:29 am

Re: Blog on Streamlining Search in MadCap Flare with a Dynamic Dropdown

Post by rogersm »

Might be best to contact Mattias directly about this issue. I don't use search highlighting so it is not something I tested for.
Post Reply