Topic List Previews


(Luka Renko) #192

Yes, it looks like the problem is with smaller images like logo. 250x250px seems to be already enough for preview to pick it up. However, something is still wrong for images that do not have same weight and height - this is example of 500x333px image that does not get in preview.


#193

Luka, can you double check you have the thumbnail turned on in the TLP Category settings for that Category?


(Luka Renko) #194

I did enable only in Settings - Plugins:
topic list thumbnail - added all desktop lists
topic list set category defaults - enabled
topic list previews enabled - enabled

All others are left on default and nothing was configured on per-category level.


(Luka Renko) #196

Is it possible that this is due to the fact that topic is wiki? I have noticed another wiki topic without preview image.


#197

I personally have never tested that. I’ll try and repro when I get chance.


(Bart) #198

Since I updated TLP this week I’ve noticed a significant slowdown of my site. Tracking it down with the mini profiler, it seems to be caused by TLP - this one particular query often takes up to one full second to complete. Could this be due to the change that you made to the thumbnail custom meta this week, @angus?


(Luka Renko) #199

@merefield I think I have found the root cause of missing previews: they do not show for images that have scaling added, e.g.

![anchor|115x105,60%](upload://st8dnQ5PLu65ME8ybJI5xxIzuBP.jpeg)

I noticed this on one post that had preview before, but lost it after my edit when I fixed scaling to make the post more readable. I checked other posts and removed scaling and the preview shows immediately and is removed when scaling is added back.


#200

Luka that’s a great find, thank you and glad you have sorted it. Does anything show in your logs when scaling is added?


(Luka Renko) #201

Did not notice anything suspicious in production.log, but I am new to Discourse so not sure if there is any other log that I should check.


#202

should show up in the browser (if at all) @ example.com/logs


(Luka Renko) #203

There is nothing there.


#204

Hi,

Is there a sane way to modify the tile view layout? (apart from the jquery way)

I’m still fairly new to the customization, usually, from my understanding, you would overwrite topic-list-item template, but because it’s overwritten by the plugin, you can’t use it (it would seem).

I’m just looking for a clean way to do that.


#205

By CSS or fork the plugin.

What was your aim?


#206

Moving around HTML elements when CSS is not enough or too tricky. Like, for example, moving some of the metadata such as the actions or category at the top. I believe there is no easy way to achieve that only in CSS (unless there are no nested elements, and I think you could play with the grid system).

It would have been be easier if you could place the elements like you want, avoiding dirty stuffs.

Also, more generally I wanted to know if customization is still possible in this context.
Thanks for the answer.


On a unrelated side node, it reminds me that because this plugin overwrites this view, it looks like it has side-effects on the Topic Rating plugin: the ratings HTML doesn’t appear in the tile view. I’ve actually posted on the concerned topic, but I’m not sure whether it should be asked here. Is there something which can be done to fix this issue?


#207

I’m literally right now mid-coding a PR to improve the layout for tiles (Category is going up under the title and there will be better handling for the user list display). It got delayed slightly due to competing priorities but back on it.

Yes this requires changes to the plugin unfortunately because nested CSS grids need nested elements - you can’t just do that with CSS (which is a shame). I’d suggest you wait for the improved layout and decide if you like it. Actions is going bottom right (because this is where your thumb is usually (sorry left handers!)).

No, tiles was never designed/tested to support the ratings plugin but support could be added at some stage.


#208

I see. I’m looking forward to the improvements then!

About the rating, that would be welcomed if it was supported.
Do you know some possible workaround to show them? I’m still new to the API stuff, but maybe it would be possible to access topic data (not sure how, I think the topic list is saved into the session at some point, maybe that), retrieving the current rating and inserting the rating HTML?


#209

I’m just guessing but I think there must be a hook of some kind that is missing. I’ve not studied the ratings plugin. Angus is better to comment.

You can always help priority by sponsoring the work (or you could have a crack at it yourself and submit a PR :slight_smile: )


(Luka Renko) #210

Is there a way to get topics thumbnails on Categories+Latest view?
I have enabled topics preview thumbnails on all views on desktop, but this one stays with icon images.

I have also evaluated mobile- views, but it gets very strange looking, as some topics have no thumbnail, some thumbnail, but some image of last poster (user). The list looks very broken…


#211

Not that I’m aware of, the template simply isn’t over-ridden for that view.

Just guessing but I suspect the original intention was to include the user avatar where there was no thumbnail. The lack of either is more concerning and may relate to the issues you mentioned previously.

I’m currently putting finishing touches to a PR that will provide Tiles view on Mobile.


(David Kingham) #212

I’ve just noticed that the featured topics are not updating on my site. Take a look at https://community.naturephotographers.network/ and then look at the tag Topics tagged editors-pick there are new posts with that tag which are missing.