Topic List Previews

thanks for your reply, i think it’s difficult for me, i will try oneday, not now.
Thank Robert, have a good day!

2 Likes

Here’s a few customizations for the portfolio feature some may be interested in.

Clean up the user card buttons to make the message button smaller and remove the portfolio text so the buttons do not cover up the users name.

.portfolio-button-inner {
    width: 25px !important;
    min-width: 18px !important;
}

.portfolio-button-inner label {
    display: none !important;
}

.usercard-controls button {
    min-width: 120px !important;
}

Hide the Nav pill for portfolios

[title="portfolio"] {
  display: none;
}
6 Likes

Hi @angus ,

thank you very much for this plugin, We like blenderartists are using this plugin at krtia-artists.org .

The plugin is working correctly except in two cases we didn’t get thumbnails for the image the user has posted. We tried to re upload the image but it did not help.

you can see the post - here , I can’t post the other one due to link limit.

May I request you to help us to find the reason why these are not getting the thumbnails? Are there any restrictions of size, dimensions or image format?

thank you once again for creating this.

1 Like

Have you rebuilt the first post? What happens when you ‘select thumbnail’?

2 Likes

Hey @merefield thank you very much, that sorted it out. Selecting thumbnail and rebuilding did the trick. I had tried the rebuild html option earlier but it hadn’t worked. Thank you

2 Likes

Adding a category to show excerpt on latest does not seem to work for me, category page changes but the latest on the homepage does not change, am I doing something wrong?

Also my suggestions excerpts are disabled everywhere, it seems to show 1 or 2 excerpts on suggestions (mobile) anyway, is this bug known?

1 Like

Would just like to confirm this issue on my forum. Sometimes select thumbnail does nothing and this happens also with regular images (not YT preview images). For this topic I was unable to select specific photo - tried two times, but I was able to select some other one. Only then selecting the wanted photo worked.

1 Like

@Lure That seems to me that maybe the image selector was not cleared. I don’t know how the TLP works behind the scenes to select thumbnails, but I assume there is an img element behind the scenes.

When the img element has a file selected and you try to select the same image again without clearing the img element beforehand, it won’t trigger a change (so it would be like no action was executed by the user). But if you choose another image and then choose the first one the change will be triggered. In SPAs (like discourse) it could be worse if the same img element is used for different pages.

Your issue seems like this, but I don’t know if the original issue is the same. Also, this would only happen if you selected the same image before, so I don’t know if this is really your issue, just my 2 cents. If this is really the issue, the img element should be cleared by the plugin even if the upload was canceled.

No one is seeing excerpts on the suggestions while it is turned off?

All existing bugs are listed and maintained here: Topics tagged topic-list-previews

Suggested topics are not behaving correctly on mobile at present.

Apologies, non-critical bugs are lower on my priority list atm, but I will get more time soon. Thanks for your patience.

2 Likes

Hmmm cannot reproduce. I downloaded several of your images, uploaded them to my site, and was able to select that image, first time:

image

In fact, I could select any of the images, first time.

You are definitely hitting the ‘tick’ and waiting for it to disappear? If you do not hit the ‘tick’ the change won’t take effect. All changes are staged and unless you hit the tick those changes won’t be committed (works same as Category). It might be nice to add a preview at some point in this header interface that reflects the selection to give the user more immediate feedback on what was selected.

image

Are you getting any errors in logs?

1 Like

OK to help with this confusion, I’ve released a small mini-feature, a preview of the selected thumbnail. Don’t forget to hit the tick to commit after choice!

image

2 Likes

Yes, I was clicking the tick. I did this twice on same image without result, then selected other image to make it work, from then on all images worked.

I am thinking since this was on new topic - is it possible to be some cool-down time, like some post-processing is done on new topic or post in topic that breaks this?
I will see if I can reproduce it again.

2 Likes

That’s interesting. Yes this was a very large post and the post processing might have taken a little longer. However that occurs immediately and results should be visible.

Yes please keep me updated.

1 Like

I noticed one more - this topic for sure had preview, but now it does not have one:

When I try to select thumbnail, I get one broken image listed:

For some reason, that image is in tombstone.

However, if I select the first image and save, it does not get shown on the post. :face_with_raised_eyebrow:

In logs I only see this, but 10 minutes before I did the change (maybe from previous try?)

ReferenceError: 'Promise' is undefined
   at o (https://pojalabanda.com/assets/application-1810c9d5ddb900672d673d6e2574094b9987e372710e9d3042c0362468f202b9.js:17:6956)
   at model (https://pojalabanda.com/assets/application-1810c9d5ddb900672d673d6e2574094b9987e372710e9d3042c0362468f202b9.js:17:8099)
   at model (https://pojalabanda.com/assets/plugins/discourse-topic-previews-374835d14821fb055c030ea9402d8ea2b85bb156576b348e2edd0bd1547a58ab.js:1:30985)
   at n (https://pojalabanda.com/assets/ember_jquery-7d202b640076468b0bd81a4231650174c1a75aec26f132bb7dc3dfad7985b6ff.js:10:4398)
   at a.deserialize (https://pojalabanda.com/assets/ember_jquery-7d202b640076468b0bd81a4231650174c1a75aec26f132bb7dc3dfad7985b6ff.js:8:10391)
   at t.prototype.getModel (https://pojalabanda.com/assets/ember_jquery-7d202b640076468b0bd81a4231650174c1a75aec26f132bb7dc3dfad7985b6ff.js:17:16974)
   at Anonymous function (https://pojalabanda.com/assets/ember_jquery-7d202b640076468b0bd81a4231650174c1a75aec26f132bb7dc3dfad7985b6ff.js:17:14354)
   at f (https://pojalabanda.com/assets/ember_jquery-7d202b640076468b0bd81a4231650174c1a75aec26f132bb7dc3dfad7985b6ff.js:18:1109)
   at T (https://pojalabanda.com/assets/ember_jquery-7d202b640076468b0bd81a4231650174c1a75aec26f132bb7dc3dfad7985b6ff.js:18:2492)
   at E (https://pojalabanda.com/assets/ember_jquery-7d202b640076468b0bd81a4231650174c1a75aec26f132bb7dc3dfad7985b6ff.js:18:2402)
Error: Nothing handled the action 'postChangedRoute'. If you did handle the action, this error can be caused by returning true from an action handler in a controller, causing the action to bubble.
    at n.x (https://pojalabanda.com/assets/ember_jquery-7d202b640076468b0bd81a4231650174c1a75aec26f132bb7dc3dfad7985b6ff.js:8:17883)
    at u.c.triggerEvent (https://pojalabanda.com/assets/ember_jquery-7d202b640076468b0bd81a4231650174c1a75aec26f132bb7dc3dfad7985b6ff.js:8:21275)
    at u.n.trigger (https://pojalabanda.com/assets/ember_jquery-7d202b640076468b0bd81a4231650174c1a75aec26f132bb7dc3dfad7985b6ff.js:18:7)
    at n.s.send (https://pojalabanda.com/assets/ember_jquery-7d202b640076468b0bd81a4231650174c1a75aec26f132bb7dc3dfad7985b6ff.js:8:25013)
    at n.send (https://pojalabanda.com/assets/ember_jquery-7d202b640076468b0bd81a4231650174c1a75aec26f132bb7dc3dfad7985b6ff.js:9:11577)
    at https://pojalabanda.com/assets/application-1810c9d5ddb900672d673d6e2574094b9987e372710e9d3042c0362468f202b9.js:25:706
    at f (https://pojalabanda.com/assets/ember_jquery-7d202b640076468b0bd81a4231650174c1a75aec26f132bb7dc3dfad7985b6ff.js:18:1126)
    at T (https://pojalabanda.com/assets/ember_jquery-7d202b640076468b0bd81a4231650174c1a75aec26f132bb7dc3dfad7985b6ff.js:18:2503)
    at E (https://pojalabanda.com/assets/ember_jquery-7d202b640076468b0bd81a4231650174c1a75aec26f132bb7dc3dfad7985b6ff.js:18:2402)
    at t.invoke (https://pojalabanda.com/assets/ember_jquery-7d202b640076468b0bd81a4231650174c1a75aec26f132bb7dc3dfad7985b6ff.js:16:9739)
1 Like

postChangedRoute action does not smack of a TLP issue. Odd.

That second one is possibly the YT thumbnail issue coming back (previously dicusssed). Probably not related to issue with first thumbnail.

I recreated a simulation of your Topic and was immediately able to select any of those images. I’ll leave it for some time and try it again later. UPDATE: switching to thumbnails on (as apposed to direct images) causes some unexpected issues, investigating!

image

1 Like

@lure, sorry for frustration, this is now fixed:

The code committing the final thumbnail was not broad enough in its image selection criteria. The way Discourse handles YT embeds is different to normal images and you have to rely on the fact that it stores the posts image url in image_url instead of a tag in the cooked post (of which there can be many).

Unfortunately there is only one image_url field per post and this means this will not find all images in posts with more than one YT posted. In which case try to post each YT in its own post. I’m not aware of any easy way we can resolve that. Treat it as a limitation.

NB This may resolve some of the tombstoning too but I’ve not checked. If not I will look deeper.

FYI @lucasbasquerotto

4 Likes

I have good and bad news:

Good: I can now finally select YT or onebox images properly as thumbnails and they actually appear on the tiles! Major improvement and thanks for this!

Bad: while I was going through many topics to try to select images, I still got cases where Select thumbnail does not change the image in the tile.

For example this topic looks like this on the tile:

However, this is not the image I have selected and is shown on edit topic mode:

I tried to change the image 3 times, no success, no error in /logs. :frowning:
I had similar problem on some other topics, some resolved by trying to select some other image first, to make it then somehow persistent.

2 Likes

Yes there’s still some creases to work out on this. I’ll take another look and see if I can improve it further.

2 Likes

I was playing some more, and now one image is shown twice:

Good news is then after selecting other image(s) and then back to the middle one, I was able to eventually switch to the right image.

1 Like