Topic List Previews Theme Component

Hi @merefield, any way to show links thumbnail for the above?
i have added a link instead of writing a post, but cannot preview the link thumbnail, although “topic list excerpt” enabled.

Not entirely sure what you mean by this.

Does a onebox render for the link? If not the target website may be missing the appropriate og tags …

I do not maintain the code which creates the excerpts, that’s core Discourse, I just include it.

1 Like

Yes it does, but the preview of the link thumbnail is not showing in the listing, only inside the post.

In some cases, Discourse will deem a thumbnail unsuitable for preview. Have you tried installing the sidecar plugin? That modifies the criteria slightly to be more inclusive.

1 Like

I’m wondering, is there a “TODO” topic for noobs?

Just by swapping out the original plugin with the TC and sidecar, does it “Just Works”? Including the previous settings on my categories? Or do I have to manually redo every single one of them?

1 Like

There’s no migration automation nor guide as felt it was simply too straightforward and it’s a once only event.

Your question was not in vain though, as I checked a setting whose functionality was not migrated over at all, but without it makes the set up task a lot more laborious for many users:

topic_list_set_category_defaults should set all your individual Categories to behave as per the main Discovery list settings when TRUE.

It is default OFF.

When OFF, you need to add each individual Category to each option as you see fit.

It wasn’t working as intended but now should be on the beta branch of the component.

PR here:

Feel free to try this branch.

I’ll merge it within a week if I receive no negative feedback.

1 Like

For some reason this default button doesn’t seem to do anything.

I have to manually add each individual category into each feature.

And, BTW, it seems that the “tiles” mode conflict with the “thumbnails” mode for the top-most “latest” page. If I add “latest” into both tiles and thumbnails modes, then the top-most “latest” page shows up in tiles.

I ended up having to remove everything from “tiles” and then it now works fine.

1 Like

Did you use the beta branch? That’s the point of the fix and PR. As stated it’s not merged yet. I’m grateful for feedback from the beta branch.

That’s expected behaviour. By default they are both set so it’s easier for people to get started. If you don’t want tiles you have to remove the settings. Tiles determines if you see tiles, and thumbnails, pictures. They are independent. You should see “tiles” with “thumbnail” previews if both are set.

So tiles didn’t work when tiles was enabled?

Ah, no I didn’t. I just turned the setting on. I’ll do another build with the PR branch and see.

Sorry, I didn’t know that was by design. Basically, I wanted the home screen to be thumbnails only, while just a few categories to be tiles.

I ended up having to remove everything in “tiles”, then the home screen works.

Then I added the few categories to tiles and they work fine.

A bit confusing and took some experimentation, if you’d ask my honest opinion.

3 Likes

You don’t need to rebuild. It’s just a TC. Many thanks.

It’s to avoid more confusion on how to add settings since they are essentially free-form. I’ll add a note to the OP to state that its preseeded though.

Thanks for your feedback.

3 Likes

Well, turns out there is no way to manually reconfig a TC to another branch, so I ended up installing the beta branch separately and disabled the original TC.

Works fine, but it seems topic_list_set_category_defaults still defaults to OFF.

Turning it to ON makes the site default work. Kudos!

However, one nit-pick: maybe you should have a way to turn OFF the site-wide default for particular categories?

3 Likes

Yes I tend to run two TC’s one for each branch. Then add them into the Theme as required.

Thanks! I’ll merge it as is.

Not a bad idea but providing opt-out Categories is going to seriously complicate the settings or interpretation of them? (Not to mention the code!) I’ll have a think about that one …

Turning it on by default may make more sense as a quick improvement? The issue there though is it may change people’s existing installs unexpectedly.

1 Like

True. Then keep it OFF as default then!

1 Like

Change is merged so setting should now work for everyone.

3 Likes

Topic list default thumbnail fallback no longger work!

Are you sure the request is not being rejected? Any errors on the browser console?

Please upload that image locally and try it as local image. It’s actually never intended to work with a remote image. If it works, great.

1 Like

Does imgur allow embedding like that?

3 Likes

I using this a long time with no problem, but when plug-in move to TC, default thumbnail fallback no longger work.

Now i am change to local image, still no work.

Yes!

It’s working for me. Please provide console errors if any.

No console error appear: