שורת חיפוש מתקדמת

Not entirely sure what’s causing this, but it seems like it is probably related to Themeable site settings are now available

Which theme are you using? How are these settings for the theme configured?

I think if you have search field in site header set and this component installed, you end up in the state you describe where search is only in the banner and doesn’t appear in the header at all… does that sound accurate?

Using the default theme and these are the settings.

לייק 1

יש לך מושג מהי הבעיה העיקרית והאם היא דורשת תיקון רכיב או תיקון דיון?

I updated one of my sites and this theme component got… squished.

Unfortunately, I don’t have a screenshot of what the homepage looked like before the update, but I’ll post a screenshot of what it looks like now. It’s basically been smashed so it’s not as tall as it used to be.

And here’s the original banner, the search bar used to be in the open area that’s now missing.

לייק 1

נראה שזו לא בעיה עם באנר החיפוש כשלעצמו.

דאגתי לבטל את הסימון של התיבה לעדכון רכיב הנושא עם עדכוני Discourse, ואז עדכנתי את אתר הייצור האחר שלי, וגם הוא הקטין את הבאנר.

איך אני מחזיר את גודל הבאנר המקורי? אלה הקטנים יותר מכוערים.

Found a screenshot of pre-update on my 2nd site.

What it used to look like:

And now:

The admin notice is for an unrelated bit of code and does not exist on my other site.

Same here, for some reason my banner broken

try this temporary fix => desktop => common

.search-banner {
    background-image: url(https://segredin.com/uploads/default/original/1X/3f044a906d2c358806610fc756e09991d25323ed.webp);
    background-size: cover;
    background-repeat: no-repeat;
    border-radius: 15px;
    margin-bottom: 10px !important;
    height: 17em;
    padding-top: 50px
}

@edit

Thanks, that fixes the size of the banner, but the contents are at the top instead of centered.

לייק 1

תוקן עם padding-top: 50px

לייק 1

כמובן שזה עדיין שבור ב-100% במובייל.

לייק 1

מה האתר שלך? במובייל באנר החיפוש הזה פשוט נעלם, אולי איזה קלאס השתנה, אני לא יודע.

Looks like a variable’s name was changed and that broke the padding, I’ve just added a fix FIX: restore padding broken due to missing variable by awesomerobot · Pull Request #100 · discourse/discourse-search-banner · GitHub

So you should be able to restore the previous spacing by updating the component.

Yeah there’s a simpler version of the banner included in Discourse by default now, and there’s some CSS to hide it on mobile… it can be restored with some custom CSS

@use "lib/viewport";

@include viewport.until(sm) {
  .welcome-banner {
    display: block;
  }
}
5 לייקים

מעולה, תודה רבה על השחזור של הרכיב הזה!

האם רכיב זה עוקב אחר נתוני שימוש? נרצה לראות עד כמה הוא יעיל בפועל עבור הקהילה שלנו.

@bartv לא, אני לא מאמין שזה כן.

נראה שהבעיה לא נפתרה. שורת החיפוש בכותרת העליונה של האתר פשוט לא מופיעה. הרגע עדכנתי לגרסה האחרונה 3.6.0 Beta1-Dev והבעיה עדיין קיימת. הדרך היחידה שלי להחזיר את שורת החיפוש בכותרת העליונה של האתר היא לבטל את הרכיב הזה ולהפעיל את רכיב Discourse Header Search.

יש לכם מושג למה זה הפסיק לעבוד? זה היה אחד הרכיבים הנחמדים ביותר שהשתמשתי בהם, אני באמת מתגעגע לתכונות שלו.

I guess that answers my question. After the latest update to the Welcome banner, I just enabled that and it seems to replace the functionality of this component as well as the Discourse Header Search.

The welcome banner is still missing some nice customization this component has like the ability to add a subhead text (extremely helpful as it can prompt users to use the search bar rather than just lie there like an empty box). Hopefully that will make it’s way into the Welcome banner.

On the flip side, is there a way to use the CSS customization feature in discourse to edit the subheading text in the search banner ?

Are you referring to this Advanced Search Banner component? If so, I believe this setting does this:

No, I’m referring to the text inside the search box that says Search

לייק 1

You can change the text variable js.search.title in /admin/customize/site_texts.

But as you mentioned in Creating a banner to display at the top of your site - #23 by RBoy, the more specific variable should be js.welcome_banner.search- but it doesn’t seem to work right now.

2 לייקים