Topic List Previews


(Pad Pors) #467

a very slight request, regarding the UI of the plugin:

the avatar and information of each topic is written between the topic title and the topic excerpt. it’s somehow like a break in the flow of the subject.

can these extra information go somewhere else? I had two suggestions for the new position shown in blue arrows in the image:

can this be handled via css tricks?


(OG) #468

There is slight bug in plugin.rb currently that prevents generating of thumbnails and leads to error
Job exception: undefined local variable or method url' for #<CookedPostProcessor:> Did you mean? URI

You need to add

    url = img["src"][0...255]

before

      create_topic_thumbnails(url) #line 73

(Roland) #469

I like this. However if using the sidebar option this completely throws off the structure and breaks the css.

I attempted to fix with css here

.topic-thumbnail {
    float: left;
    padding-right: 15px;
    max-width: 60px !important;
}

and the container now does not run over into the sidebar but the img is still stretched out. and the topic list thumbnail width does not hold.


(Angus McLeod) #470

Hey @Nam_Nguyen,

  1. Please take a screenshot of our current settings.
  2. Did you upload those thumbnails while the settings were what they are currently, or before?

(Angus McLeod) #471

Well caught! Thanks. Fixed.

@Nam_Nguyen I’ve also made a fix for the issue you were seeing.


(Angus McLeod) #472

Hey @Ham, which sidebar option are you referring to? Is it a plugin?


(Roland) #473

Yes it is. I PMd you a screenshot.


(Angus McLeod) #474

Ok cool. I might ask @pmusaraj to handle that one, as he is both the author of that plugin and has write access to this Topic Previews.


(Pad Pors) #475

slight issue: it seems that the social UI is not responsive, and when the page width is less than 600px, it doesn’t get scale.


#476

Posted a PR with some responsive fixes for desktop devices only:

  • social layout column now will have a max-width of 600px, meaning that if space allocated is below 600px, that column will downsize accordingly
  • i set max-width:100% to thumbnails in social layout as well – this may cause squished thumbnails in really small screen sizes, but it makes sure that the layout doesn’t break. Note, that it also limits the maximum width of a thumbnail to be 600px, since the max-width of the column is 600px.

PR here: CSS adjustments to fix for small screens (still desktop) and layouts … by pmusaraj · Pull Request #22 · angusmcleod/discourse-topic-previews · GitHub

This fixes the two issues above (@ham’s issue with sidebar, @Pad_Pors’s responsive issue).


(Angus McLeod) #477

Merged!

https://github.com/angusmcleod/discourse-topic-previews/pull/22


(Nam Nguyen) #478

@angus can you fix show thumbnail on Suggested topics?


I tested with latest Discourse, thumbnail and excerpt not work with suggested topic like old version.
Thanks!


(Pad Pors) #479
  • the social UI in our forum is not responsive yet, already updated to the last version.

  • I think at some point the thumbnails were has gone to this state:

but now they are just as before, all of the thumbnails are forced to be 600px in width, for social UI:

it doesn’t have the best view. may it be fixed please?

anyway, thanks guys for your effort + :hand_splayed: :ok_hand:


(Angus McLeod) #480

Hey Nam, the removal of thumbnails from suggested topics is intentional. It causes issues if added like the other topic lists. We can add proper support for thumbnails in suggested topics in the next version.


(Angus McLeod) #481

hm, this is not what I’m seeing. Did you update you social media settings when we made the switch to the new settings style? Can you post a screenshot of your social media setting input?


(Sawood Alam) #482

I casually looked at this quite long thread. Did I fail to notice an option to select author’s avatar, first letter of the title, or a placeholder image to be used as an alternate in case the first post does not have an image/media?


(Nam Nguyen) #483

When post a topic without image (or post cannot generate thumbnail) like this,
If user edit post, and (add) upload image, can plugin re-generate new thumbnail)? I try with current vesion, it cannot generate new thumbnail.


(Pad Pors) #484

hmm, these settings do you mean or something else?

p.s.: translating the Persian parts:

  • the topic-excerpt length is 200
  • thumbnail width: 600
  • thumbnail height: 150

(Angus McLeod) #485

Indeed! There is such an option. It can be set for the non-category discovery routes in Settings > Plugins and for individual categories in Category Settings > Settings.


(Angus McLeod) #486

Testing this now, I’m seeing the image update every time when I add a new image on edit. But please rebake the post from the admin menu if this happens and the updated image should take.