Search-menu-results-top outlets not correctly positioned

Hi, I’ve run into an issue when trying to use the search-menu-results-top connector slot for customisation. The slot does not appear to be correctly places at the top of the results (notice that the “Try asking…” call to action is below the results):

Is this expected, or a bug?


1 Like

I think you’re right. The outlet should be placed before the results content here:

Hey there, thank you for the report!

As you have pointed out, the search-menu-results-top plugin outlet was not positioned at the top of results as expected.

Additionally, we have recently upgraded the search menu and its internals to rely on Glimmer. You are not seeing @outletArgs.searchTerm as it was not included (unintentionally) in the search-menu-results-top plugin outlet, attached to the glimmer search menu.

This will be fixed by

see plugin outlet location as well as search term attached


Hi Isaac, thanks for your help. I also believe that a change to the code Arkshine identified needs to be included in that PR to fix the search menu in the navigation bar

Additionally the wrapping divs in discourse/app/assets/javascripts/discourse/app/widgets/search-menu-results.js at e4c373194d95c1393b70f3052ba473ae8faabe8b · discourse/discourse · GitHub and discourse/app/assets/javascripts/discourse/app/widgets/search-menu-results.js at e4c373194d95c1393b70f3052ba473ae8faabe8b · discourse/discourse · GitHub always render (and with an empty class) so it makes it difficult to apply :last-child selectors and the like

The GitHub - discourse/discourse-search-banner is now built upon the glimmer search menu which is why I made the changes there instead of the widget search menu. Additionally, we will be rolling the glimmer search menu out as the new default for all discourse instances in the next month so to take advantage of the changes I have linked (and get one step ahead of the crowd) I would recommend enabling the glimmer search menu on your site. This will solve any issues you are having in the search menu located in the navigation bar.

You can do so by adding a group to the experimental search menu groups site setting. We currently have this enabled for “everyone” on meta.

The code snippets you linked are directly tied to the widget search menu. The same plugin outlets are available on the glimmer search menu, and they are correctly positioned. Let me know if that helps :slight_smile:


Awesome, thanks for the explanation. I’ll enable that setting now


This topic was automatically closed after 4 days. New replies are no longer allowed.