'Always include topic excerpt' setting

Continuing the discussion from Horizon: High Context Topic Cards:

I am a little confused by this description. I have used the topic list excerpts theme component on my forum without issues before. So, what exactly does the setting change? The description reads as if I can only use excerpts while the setting is enabled and I use a component that shows them, but excerpts seem to work on my forum with the setting disabled and only topic list excerpts enabled. What would be different if I enabled the setting?

Side note: Is there a reason why this setting wasn’t added to an “area” like ‘layout’?

3 לייקים

Looks like I don’t need to understand

3 לייקים

Yes this is related to Horizon: High Context Topic Cards, the original thought was that we need to expose this setting so people can turn on excerpts in those Horizon topic cards without console access… but it’s a little bit of a dangerous setting to expose because if you enable it you add a lot of data to the topic list even if excerpts aren’t being shown in the current theme.

The follow-up is to instead enable the hidden site setting when the Horizon theme has topic card high context enabled… that way the setting is constrained to a situation where it will be used.

By default, we only serialize excerpts for :pushpin: pinned topics

Unless the always_include_topic_excerpts site setting is enabled, or a theme is using a “theme modifier”. Maybe the theme you’re using is using the modifier?

לייק 1

so what is the rationale for making new features horizon only? making new features limited to an in-core theme that can’t be customized seems to go against the general Discourse ethos? we can’t even use it in foundation? there are lines of code in core for horizon fixes specifically…

לייק 1

So, if I change the setting in Horizon, it will change the hidden site setting? Does that mean that it will also be activated in safe mode because it is a site setting? I expected that, similar to what zogstrip just described, the Horizon theme would activate excerpts regardless of the setting, just like you can by adding the topic list excerpts component to Foundation.

לייק 1

Time and complexity really, to add a view like this for Foundation we need to update the API to work with more flexible layouts… so we’d need to create new APIs, maintain both for some period, then deprecate old ones.

Horizon is more of a clean slate, has more limits on customization, and by default lacks some information like tags in the topic list… so it was easier to prioritize without worrying about backwards compatibility. Ideally we’ll take what we learn from Horizon and use that to update Foundation too.

Sorry you’re right, that was a bit off… it doesn’t literally enable that site setting… but it does the same thing (serialize excerpts) only for the theme using a theme modifier

2 לייקים

I’m not sure what you’re getting at. I said that the topic list excerpts component worked without the setting before:

So I assume it was using the modifier, but the new description of the site setting said that even after you enabled it, you would need the “topic list excerpts” component to see them.

My question was why I need the site setting if the component seems to enable excerpts without it.

This excerpt may not be visible unless a theme component like “Topic list excerpts” is enabled

My question was not why it works, but why I would use the setting, because that’s the information I expect from a description. And that’s why I said it seems I don’t need to understand because the description is no longer needed since it was removed.

2 לייקים

To be clear: the topic excerpts feature is not horizon-only. Any theme can enable it via the theme-modifier. Many themes do this.

The site setting was the old way to do this, before theme modifiers existed. It was unhidden today because we briefly thought that it was the only way to make it a toggle-able option for users of horizon. But in fact, there is a way to make theme modifiers link to theme settings, which is what we’ve now done in horizon.

We’ve also documented that strategy, so that it’s clear how other themes can do it. (And so we don’t forget about it ourselves :sweat_smile:)

https://github.com/discourse/discourse-developer-docs/commit/61535d93ea257a6d6da1fc22abd6f5012d7ba263

3 לייקים

oh yea i understand now. i just wasn’t clear because i thought these were different excerpts, not the same being used in a new way in horizon.

4 לייקים