רכיבי נושא כותרות קטגוריות דיון

@NateDhaliwal בסדר, תודה שבדקת את זה! די מאוכזבים כי ממש אהבנו את ה-TC הזה, אבל אם אי אפשר לתקן את זה ולהציג את זה באתר שלנו, אני פשוט אשאיר את זה כרגע ואחפש דרכים אחרות לגרום לכותרות הקטגוריות להיראות יפה.

@jackierenee I have taken the liberty to step in and have a look at your site.
It seems you had only removed the theme component from the parent theme, updated it and added it back.

The problem is that Discourse does not recover when a theme component is updated beyond compatibility and after that a pin is added.

The correct way to recover from such a situation is:

  • go to the theme component
  • scroll all the way down
  • copy the settings from “settings editor”
  • store them in a text editor
  • completely remove ( :wastebasket: delete) the theme component
  • add it back from the Github repository
  • copy the settings from the text editor and paste them in “Settings editor”
  • make corrections if you have to (sometimes settings are added in the new version so you have to remove them again, the editor will tell you what to do when you try to save them)
  • add the theme component to the parent theme.

I have done this on your site and the banners are now showing again.

For theme component authors: it helps a lot if you utilize the version field in about.json so it is actually visible to the administrator on what version a theme component is. Unfortunately Discourse does not show commit versions for theme components as it does with plugins.

8 לייקים

That seems polite. I’ll endeavor to add a github action that will automatically update a version at each new commit to main.

4 לייקים

You should be able to easily achieve that by using the Show category name setting of this Theme Component - it is designed specifically for your use case.

Sounds like a very good idea! Please document how to do this, and add to the Developing Theme Components for Dummies guide (if there is one).

I’ve tried it - all of my concerns have been resolved, and it looks great. Nice work!!!

Hey, how hard would it be to add the ability to specify how many paragraphs of the About topic to utilise for the description? Personally, I find the single paragraph quite restrictive and would love to be able to specify (perhaps per category) how many paragraphs to utilise.

Lastly (while still focused on this TC), do you think it would be good to more the “Read more…” to the end of the last paragraph? That would certainly save a lot of wasted space in my instance. But then again, if we could use multiple paragraphs it might clash somewhat with the second paragraph if it was links and the like. :thinking:.

Hmm… the way the code accesses the category description is using this.args.category.description. IIRC it already comes as 1 paragraph. I’ll take a look into it. Perhaps I could do a fetch() or ajax, but that may be alower.

Maybe a setting to select if it’s inline or not? Let me take a look.

לייק 1

שלום, שמתי לב שהגופן של טקסט הקטגוריה, כאשר מוגדר ל"קטן יותר", אינו נלקח בחשבון, הוא תמיד גדול (קרה לפני יום או יומיים לדעתי).

שינינו את זה, כך שתאור הקטגוריה יהיה קטן יותר או גדול יותר מברירת המחדל בליבה (מה שנראה שהוגדל לאחרונה).

אני אלך ואבדוק שוב שאין איזה קונפליקט ערכות נושא שהיה כאן הסחת דעת.

לייק 1

Hi @RGJ thank you so so much for this! I had no idea that theme components worked this way. I will definitely keep this in mind if we run into this situation again. Really appreciate your help! :folded_hands:

2 לייקים

This is a very rare and specific situation, with odd behavior, and hopefully we’ll not encounter this for a while!

3 לייקים

היי, פתרתי את הבעיה עם ה-CSS הזה:

.category-title-description .cooked {
  font-size: small;
}

אני גם מקבל דפי קטגוריות ריקים בדפדפני שולחן עבודה וניידים בגרסת Discourse 3.5.0.beta8-dev כאשר לרכיב זה יש את ההגדרה הבאה:

  "setting": "show_mobile",
	"value": false

כאשר אני מאפס אותו לברירת מחדל (true) הדפים מוצגים כראוי.

לייק 1

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

@HTW יישמתי תיקון. עדכן אותי אם זה עובד עכשיו!

לייק 1

תוקן. תודה רבה.

נראה שישנם שינויים אחרונים בליבת ה-Category Headers, מה שאומר שליבת ה-Headers כבר אינה מוסתרת כאשר משתמשים ברכיב זה.

האם עלינו לנסות להתאים את הרכיב הזה לשינויי הסגנון בליבה?

3 לייקים

הממ… מה השינויים כאן? אולי צילום מסך? תודה.

With the TC active on a freshly updated site (clearly the styling has gone a little crazy):

With the TC inactive:

לייק 1

האם הוספתי !important לחלק האחורי… האם זה עובד עכשיו?

2 לייקים

תצפית קטנה: גודל טקסט התיאור עדיין גדול מדי. אפילו האפשרות “קטן יותר” משתמשת ב-var(--font-up-2). יש סיכוי להוסיף את var(--font-0) (“הכי קטן” או “ברירת מחדל”) כאפשרות.

או שתקבלו PR בשביל זה?

לייק 1

@jrgong I just merged a PR that adds a ‘smallest’ option, with the value of $font-0. Let me know if you encounter any issues!

2 לייקים