Header search plugin

(Erlend Sogge Heggen) #17

Depends on which one-click install you’re talking about. There might be some installers out there that don’t use our standard Docker image, which could make them incompatible with custom plugins.

But the Digital Ocean installer? Yes.


The header search plugin interferes with the poll plugin, in particular the un-ordered list elements to hide the search area also hide the poll’s results.

I listed the bug here and removed all plugins to see where the issue was. After re-adding the header search plugin, the polls results start being hidden again (when scrolling or clicking away from the poll area).

I believe the problem is this line in the SCSS, which seems to effect all ul elements, so I’m guessing it instead needs to specify the header search’s class or id only.

(Angus McLeod) #19

@romdos Hey thanks for the bug report. tbh I’ve never made a poll before. On a brief attempt on my local the plugin doesnt seem to work…aren’t you just mean’t to include 'Poll: ’ in the topic title?

In terms of the source of the issue I doubt it’s that line of CSS as that is actually nested inside header-search-contents. See here: discourse-header-search/header-search.scss at master · angusmcleod/discourse-header-search · GitHub

In other words, that CSS selector actually resolves to .header-search-contents .results ul.

(Kane York) #20

It’s changed, make a list surrounded by [poll].

- A banana charade
- Defensive egg fortress

(iminai008) #21

Hi, I really like this plugin.
But when I update discourse to [v1.6.0.beta2 ] yesterday, it does not showed up.

Thanks for your help.

(Angus McLeod) #22

Hey @iminai008, this is because the Discourse header logic has changed significantly in the latest releases. I will be updating this plugin soon. I am updating Quick Messages first, then I will get to this one.

(iminai008) #23

Wonderful news, thank you.

(Angus McLeod) #24

Hey @iminai008 I’ve just committed an update for this plugin so that it’s fully compatible with the new header. I basically had to re-write it, so let me know if there are any issues. Cheers, Angus.

Help us test the new header code!
(iminai008) #25

Thank you very much, it works. :beer:

(Pradeep Kumar) #26

Hi @angus, I’m getting the search box on our mobile version, is there any way to disable it?

(Angus McLeod) #27

Fixed :slight_smile:

(Angus McLeod) #29

You need to update to the latest commit on the plugin by rebuilding your docker container.

(Sam Saffron) #30

One big concern I have with this plugin is that it will be terribly broken on all iDevices, if you ever focus on a INPUT on a fixed panel on iOS it will scroll the whole page either to the top or the bottom. There are no workarounds short of taking every single element on the page out of standard layout.

(Angus McLeod) #31

I’ve previously precluded the search bar widget from being attached in mobileView which includes iPhones.

Just testing it now on my iPad it seems to work fine.

Looking around the interwebs, I see there is an issue with .focus() on iOS, however I’m not using that method.

Could you point me in the right direction to understand / test the issue? Cheers.

(Sam Saffron) #32

It works fine, if you are at the top of the topic, try scrolling down a bit.

(Victoria Hedenmalm) #33


I have this plugin and am running it on a mac in chrome. The header is rearranged in a weird way when resizing the window and making it small, picture below:

I really like this search bar, but for some reason the original search button is also still visible. Do you know if there is any smart way to hide it?

(Angus McLeod) #34

Hey, thanks for using this plugin and for giving feedback. I’ll be fixing this tomorrow I hope, so stay tuned…

(Angus McLeod) #35

Both of these are fixed now.

(Angus McLeod) #36

When you scroll down on a topic the header search is hidden in favor of the ‘extra info’ and the normal search icon re-appears.

The transition between the two states was indeed not amazing on iPad, as it wasn’t handling the scrollTop that occurs when you focus on the normal search input while scrolled on a topic. I’ve added some better show / hide handling for that.

(Pankaj Gupta) #37

When I am using header search plugin. It is showing error in console like this:

Error: Could not find module discourse/views/application imported from discourse/plugins/discourse-header-search/discourse/initializers/header-search-edits.
Pls help me to solve this error.