Topic List Previews (legacy)

Is that why after updating the fields like image_url cannot be found in https://meta.discourse.org/latest.json

image

But when using Data Explorer I found it. So why not stay!

Is there a way to handle it manually while waiting for an update?

1 Like

Does switching off Hot-linking help?

Updates may take some time. It is now Pavilion policy we do not support Production outside days 1-5 of the month.

3 Likes

FYI guys, I’m working on an experimental Theme Component version of the plugin.

It’s missing some features and there are still various issues. Use it for fun, but it’s not supported (yet!)

https://github.com/merefield/discourse-topic-list-previews-theme

7 Likes

Yesterday I had to rebuild Discourse for other reasons and an upgrade came with it. Seems to be working so far (we are not using hotlinking).

I like the UI improvements showing views and replies in the tiles, thank you very much. I also like the fact that “hearts” appear in the right places and in the right way. I don’t know exactly what has changed, but before they felt too prominent and visible everywhere.

A suggestion: currently the count of hearts relates to the first post only. Would it be possible to show the total number of hearts in the entire topic? It brings the numbers up, also making more justice to the topic (sometimes the first post might have just 1-2 likes but the discussion is very “liked”). It would be consistent with the data on views and replies, which refer to the entire topic.

Oh, and what about not stretching images beyond their size? Currently big images will be reduced to the max width setting (good), but smaller images are forced to have that max width too, which is probably not desired because pixelation. Having the image centered with its own max size would be better imho.

3 Likes

This is great! Does this mean that thumbnails will now be served from S3 CDN urls instead of directly from S3?

Thank you so much for all your work on Topic List Previews!

2 Likes

Thank you!

That’s something we need to clarify with the Discourse team.

The Theme Component version is being developed to explore the potential to support the emerging extensions to the core API that David has been discussing here.

It is up to Discourse where these come from and how they are handled, as a Theme Component contains no API.

This new extension to the API exposes thumbnails. Historically these were generated by this Plugin. I will be very happy to retire that logic if at all possible, though there may still be work Discourse will need to do to reach the full level of functionality I’d need it to have to do that.

1 Like

Thanks for your nice feedback!

I can’t promise that will be easy or performant, but a nice idea!

For Tiles that won’t work because it would look very strange not to have an image taking up most of the tile width. It would look less blurry, perhaps, but would also look a bit messy as you’d introduce arbitrary new vertical edges on the page.

Another solution, if you have a lot of smaller images, might be to increase the number of columns. You can do that with just CSS.

Alternatively, if you are not referring to tiles view, you could easily use CSS to make the non-tiles view thumbnails appear smaller.

1 Like

I don’t know if you’re looking for feedback yet, but this is what it looks like on my staging site :crazy_face: I have TLP and Topic Thumbnails disabled.

3 Likes

What if smaller images were centered vertically and horizontally within a box to match the size of other posts?

2 Likes

Feel free to experiment with your CSS. If you are using the plugin version you should also be able override the topic list item template too in a theme component.

If you get something looking good please share.

1 Like

Featured Images Is it image_url or thumbnails?
So does Theme Component version of the plugin solve the current problem?

1 Like

What happens if you increase the topic_list_thumbnail_resolution_level (which lowers the res) to 2?

I’ve now made 2 the default (was 0, serving the highest res thumbnails!!) https://github.com/merefield/discourse-topic-list-previews-theme/commit/c668985a4ebc94e89f22b516c09ce6b651daf4b9

Bear in mind for this to work you have to have sidekiq running to prepare the lower resolution thumbnails. For the time they are not available it will serve the higher res or original images and you may run into that issue. That situation should only last minutes.

1 Like

Theme Component does not yet replace the plugin unfortunately. But give me time: I only started on it two days ago!

2 Likes

Sorry I’m just wondering. Thank you

2 Likes

I appreciate your interest. I have a little time today so will take a look at Featured Images in the Theme Component. (Which may allow me to fix it on both)

2 Likes

An early version of Featured Images has been added to the experimental Theme Component. Only tested as working on Discovery routes. I’ve added mobile support though. (not available in the plugin) (@Krischan)

3 Likes

I updated this morning and sidekiq has been running as far as I can tell, but I’m still having the issue. This is what shows up in the console on pages using the component

image

2 Likes

Yup a JavaScript error might well stop the layout code dead.

Have you updated staging and Theme Component to latest?

I trust you have TLP plugin uninstalled?

Oh and have you given it rights to get the required scripts?

Add this to security settings:

content security policy script src: https://unpkg.com

This is no longer necessary, because Discourse’s funky new Theme Modifiers support modifications to CSP which is now implemented in the TC

(that allows ImagesLoaded and dependencies to be downloaded)

2 Likes

That did the trick! I’m impressed how quickly you translated this.

One thing I’ve noticed is I can’t select any tags for topic list featured images tag, I know you’re still working on this, but just in case this is something different…

1 Like

One tag should work. You had to type it in. I’ve released an update which changes that to a picker (amongst a lot of other improvements).

This relied on bespoke API. I’ve rewritten it to exploit the vanilla API. Unfortunately it’s likely to be simpler as a result.

1 Like