Topic List Previews

The experimental Theme Component is currently working. :slight_smile:

2 Likes

Yes, I’m on the latest TC, some of the topics are sort of working:

1 Like

That’s all kinds of not right. Not sure what’s wrong with your setup but that’s definitely not the latest TC code running. Odd!

I have it on two production sites and the thumbnail picker is working perfectly on both (albeit it excludes very small images at mo)

Please double check you’ve updated to latest TC.

1 Like

I was going to start disabling things to figure this out, but switching to a different theme and then switching back somehow fixed it, so odd!

2 Likes

Yeah possibly a caching issue. Good stuff!

Always remember to refresh your webpage after updating a Theme Component. Switching Theme does that for you I suspect.

Next I will be bringing back the action buttons.

Appreciate the testing David!

3 Likes

OK updates to the main plugin to support the new Discourse Thumbnails.

Basically this involves stripping out the code TLP had built to create and manage thumbnails and add new interfaces to work with core thumbnails.

This is a rather large update, but benefits heavily from my work on the TC version:

Because Discourse presently only generates Thumbnails from within Theme Components, you must also add this very simple Theme Component to initiate the thumbnail creation: @David would be great to have a plugin only option here

NB I’m not sure how long the full plugin version will stick around. I’m likely to focus on the Theme Component and the Plugin Sidecar going forward

Please test this out in staging before committing to Production if you can. I have tested it in Production but your mileage may vary. And of course let me know of any issues …

2 Likes

I get this error when installing the generator component

Import Error: about.json does not exist, or is invalid

2 Likes

Let me revert. Thanks for testing.

UPDATE: Apologies! That’s fixed and tested in Production, please update it and refresh your browser.

Moral of the story: don’t release things late in evening when tired! (I had somehow forgotten to push the very file that was critical for it to work!). The readme wasn’t going to get anyone anywhere fast!

2 Likes

OK I’d better summarise the current status as things are getting confusing:

There are now two distinct setups:

  1. Existing, standard, Plugin based one. I’m thinking of replacing it with 2 though (I will give notice).
  • Plugin https://github.com/paviliondev/discourse-topic-previews

OR:

  1. TC based, experimental, expect minor issues but added bonuses of Featured Images on mobile and responsiveness to sidebars … optional plugin sidecar that adds features
  • Theme Component https://github.com/merefield/discourse-topic-list-previews-theme

  • Add the sidecar plugin if you want more features: - git clone https://github.com/merefield/discourse-topic-previews.git -b "theme_sidecar". This adds ‘actions’ (bookmarking and liking from Topic List) and the Thumbnail Picker in the Topic Meta Editor.

Sorry for any confusion on different setups

10 Likes

The component is live now and it works really well, thanks again!

The only challenge we have now is that "topic list thumbnail resolution level’ affects the featured images as well. So we have either featured images that are a bit too small or thumbnails in the topic list that are too large. Would it be possible to have a “topic list featured images resolution level”?

Edit: And another thing: Apparently, the Topic list preview plugin sorted the featured images by tagging date which makes a lot sense imho. The theme component sorts by last post date which makes the featured images change quite rapidly. Would it be possible to sort by tagging date? Thanks so much!

3 Likes

Good suggestion, that’s implemented: FEATURE: offer independent Featured Images resolution level · merefield/discourse-topic-list-previews-theme@0b90138 · GitHub

Please update and let me know how you get on.

5 Likes

Works like a charm, thanks so much! :slight_smile:

Would it be also possible to sort the featured images by tagging date (see above)?

1 Like

The plugin has it’s own API changes, unfortunately the TC does not, so not unless I can pull that from a simple existing HTTP request in one go.

1 Like

Would the publication date work? Since we do a magazine with discourse and your TC, it would be odd, if a user could change the headlines by writing a comment. :wink:

1 Like

Or can you get that feed “/tag/{tag}.json?ascending=false&order=created”?

2 Likes

And the plan is to continue moving forward primarily with the TC, correct?

1 Like

Yep that could work. And perhaps a setting for latest versus created

2 Likes

Yes correct. For all the reasons outlined earlier.

I don’t envisage needing to drop support for the plugin imminently but the TC will have the focus for new features.

The recent changes in Discourse are slightly unprecedented so hopefully we can look forward to a bit more stability in the coming months.

2 Likes

hi,
2. TC based, experimental, expect minor issues but added bonuses of Featured Images on mobile and responsiveness to sidebars … optional plugin sidecar that adds features

  • Theme Component https://github.com/merefield/discourse-topic-list-previews-theme
  • Add the sidecar plugin if you want more features: - git clone https://github.com/merefield/discourse-topic-previews.git -b "theme_sidecar" . At this point this is functionally very very similar to plugin.


I followed these steps.

the like button does not appear. How can I show the like button ?

2 Likes

I’ve yet to implement that in this configuration. It’s coming :wink:

2 Likes