Skip to content

Commit e00b4e1

Browse files
DEV: Update theme name to Advanced Search Banner (#84)
Since we are moving a simplified version of this into core at discourse/discourse#31516, this component becomes Advanced Search Banner. The core welcome banner will be hidden if this component is installed. This commit also re-enables previously disabled specs that would have failed the core PR.
1 parent 1569086 commit e00b4e1

File tree

5 files changed

+14
-8
lines changed

5 files changed

+14
-8
lines changed

about.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"name": "Search Banner",
2+
"name": "Advanced Search Banner",
33
"component": true,
4-
"about_url": "https://meta.discourse.org/t/search-banner-theme-component/122939",
5-
"license_url": "https://github.com/discourse/discourse-search-banner/blob/master/LICENSE",
4+
"about_url": "https://meta.discourse.org/t/-/122939",
5+
"license_url": "https://github.com/discourse/discourse-search-banner/blob/main/LICENSE",
66
"assets": {},
77
"color_schemes": {}
88
}

common/common.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,5 +163,9 @@ $max-width: 600px;
163163
}
164164
}
165165

166+
.welcome-banner {
167+
display: none;
168+
}
169+
166170
// these are add-on styles controlled by settings
167171
@import "special-styles";

locales/en.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ en:
33
headline: "Welcome to our community"
44
subhead: "We're happy to have you here. If you need help, please search before you post."
55
search_button_text: ""
6+
theme_metadata:
7+
description: "Advanced Search Banner puts a search bar along with optional headline and subhead text in a banner above the main topic list navigation"

spec/system/viewing_search_banner_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
fab!(:topic)
66
let(:topic_page) { PageObjects::Pages::Topic.new }
77

8-
xit "should display the search banner below the site header when `plugin_outlet` theme setting is set to `below-site-header`" do
8+
it "should display the search banner below the site header when `plugin_outlet` theme setting is set to `below-site-header`" do
99
theme.update_setting(:plugin_outlet, "below-site-header")
1010
theme.save!
1111

@@ -15,7 +15,7 @@
1515
expect(page).to_not have_css("#main-outlet .custom-search-banner")
1616
end
1717

18-
xit "should display the search banner above the main container when `plugin_outlet` theme setting is set to `above-main-container`" do
18+
it "should display the search banner above the main container when `plugin_outlet` theme setting is set to `above-main-container`" do
1919
theme.update_setting(:plugin_outlet, "above-main-container")
2020
theme.save!
2121

@@ -24,7 +24,7 @@
2424
expect(page).to have_css("#main-outlet .custom-search-banner")
2525
end
2626

27-
xit "should display the search icon when searching within a topic when search button text is present" do
27+
it "should display the search icon when searching within a topic when search button text is present" do
2828
theme.update_setting(:show_on, "all")
2929
theme.update_translation("search_banner.search_button_text", "Foo")
3030
theme.save!

test/acceptance/search-banner-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ import { click, fillIn, triggerKeyEvent, visit } from "@ember/test-helpers";
22
import { test } from "qunit";
33
import { acceptance, query } from "discourse/tests/helpers/qunit-helpers";
44

5-
acceptance("Discourse Search Banner", function (needs) {
5+
acceptance("Discourse Advanced Search Banner", function (needs) {
66
needs.user({ admin: true, experimental_search_menu_groups_enabled: true });
77

8-
test("Search Banner is present", async function (assert) {
8+
test("Advanced Search Banner is present", async function (assert) {
99
await visit("/");
1010
assert.dom(".custom-search-banner input#search-term").exists();
1111
});

0 commit comments

Comments
 (0)