Pavilion Header Search Theme Component

Thank you! I checked Github, but could not find any new commits there yet.

Thanks for the tip on the color, I actual meant to say the color of the border of the search box (to white). Is there a way to also do this?

Screenshot from 2023-03-02 10-13-59

That means you’re not using this theme component :slight_smile: Share a link to the github repository you just checked.

1 Like

Could this component actually work with the keyboard shortcut for search (“/”)? Right now using the shortcut makes it switch back to the search icon and drop-down:

For reference, the official Header Search component has a slightly different glitch: it enters the search field when using the shortcut, but then only shows results after actually selecting the field with a mouse click:

So I wonder if there’s a way to make header search fully compatible with using the keyboard shortcut?

1 Like

Actually I believe your updates were to the theme, as in entire theme (note the name of the repo):

I was talking about the component: GitHub - discourse/discourse-header-search

It seems to have a different owner, I probably mixed things up, sorry

Yup, that’s right. That’s the repo associated with this topic, even if it’s not correctly named. See the OP

You want this one

1 Like

okay thank you, if this also a component, I can use it in conjunction with my theme. I’ll try this one out as well then. Thanks for your help.

Maybe you could update this in the OP to make clear its a component (maybe there are others like me that would avoid a theme, but like a component)

Recently, with the latest update of the discourse source code, the theme component had a conflict and the discourse header bar disappeared.

From what I see, the component uses deprecated code. I believe it’s expected not to work anymore with all the recent modernization changes happening in the core.

As an alternative, you have these two official theme components:

1 Like

I’ve marked this as broken for now. @angus please feel free to remove the tag if/when it’s been updated.

As well as the deprecations, core’s search implementation recently switched from Widgets to Glimmer Components, so I imagine this theme would need significant refactoring to get it up-and-running again.

As @Arkshine said, we have a couple of similar official theme components, so they are a good alternative (or a good reference on how to re-implement this one)

2 Likes

This was the first thing I built as a software developer, all the way back in 2015 (albeit it was a plugin then as theme components didn’t exist; same code though), so I feel a bit nostalgic about it. But unless anyone seriously wants this instead of the components mentioned by @Arkshine, this is going to stay broken.

4 Likes

@angus I’ve opened a PR here to make it auto-disable on recent versions of Discourse, and add a description to say it’s no longer supported:

Also added a :warning: to the OP here with a link to official alternatives.

3 Likes