Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# DEPRECATED

Search Banner theme component is deprecated in favor of Discourse's core Welcome banner.

More details about deprecating Search Banner: https://meta.discourse.org/t/deprecating-the-search-banner-theme-component/379322.

More about Welcome Banner: https://meta.discourse.org/t/creating-a-banner-to-display-at-the-top-of-your-site/153718#p-762961-welcome-banner-1.
---

This is a component that puts a search bar along with optional headline and subhead text in a banner above the main topic list navigation of a Discourse community.

By default this banner appears on all top-level topic pages (latest/new/unread/top/categories... anything in the `top menu` site setting) but it can also be set to only display on a community's homepage.
Expand Down
8 changes: 8 additions & 0 deletions javascripts/discourse/components/search-banner.gjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { service } from "@ember/service";
import { htmlSafe } from "@ember/template";
import PluginOutlet from "discourse/components/plugin-outlet";
import SearchMenu from "discourse/components/search-menu";
import deprecated from "discourse/lib/deprecated";
import { defaultHomepage } from "discourse/lib/utilities";
import { i18n } from "discourse-i18n";
import SearchIcon from "./search-icon";
Expand All @@ -16,6 +17,13 @@ export default class SearchBanner extends Component {
@service siteSettings;
@service currentUser;

constructor() {
super(...arguments);
deprecated("Search Banner is deprecated in favor of core Welcome banner.", {
id: "search-banner.deprecated",
});
}

@action
willDestroy() {
super.willDestroy(...arguments);
Expand Down
1 change: 1 addition & 0 deletions locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ en:
search_button_text: ""
theme_metadata:
description: "Advanced Search Banner puts a search bar along with optional headline and subhead text in a banner above the main topic list navigation"
deprecation_warning: "The Search Banner theme component is deprecated in favor of the core Welcome banner. Please migrate to the Welcome banner"