UX: let search button click through to full search (#29)

This commit is contained in:
Kris 2023-04-05 17:07:32 -04:00 committed by GitHub
parent 7dd9002c9f
commit 5f6eddaabc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 4 deletions

View File

@ -78,6 +78,9 @@ $max-width: 600px;
order: 2;
right: 0;
background: transparent;
.d-icon {
margin: 0;
}
.discourse-no-touch & {
&:hover {
background: transparent;

View File

@ -1,5 +1,6 @@
import { apiInitializer } from "discourse/lib/api";
import { logSearchLinkClick } from "discourse/lib/search";
import { iconNode } from "discourse-common/lib/icon-library";
export default apiInitializer("0.8", (api) => {
const enableConnectorName = settings.plugin_outlet;
@ -111,10 +112,11 @@ export default apiInitializer("0.8", (api) => {
if (formFactor === "widget") {
contents.push(
this.attach("button", {
icon: "search",
className: "search-icon",
action: "showResults",
this.attach("link", {
href: this.fullSearchUrl({ expanded: true }),
contents: () => iconNode("search"),
className: "btn search-icon",
title: "search.open_advanced",
})
);
}