Topic List Previews (legacy)

do you know of a way to make it run more often? like every 5 seconds or so?

2 Likes

You can find these things out for yourself by looking at the Discourse source code (TLP is not involved here)

LMGTFY :wink: ā€¦

ā€¦ Looks like it is linked to the editing grace period. Shorten that and it will run sooner.

2 Likes

yep someone fortuitously posted it right around the same time

3 Likes

Hi, this is a question about permissions. If a Discourse instance has featured images enabled in the non-category pages and the instance has public and private categoriesā€¦ what images are supposed to be shown to whom?

Ideally users see the featured images corresponding to the topics they have access too, and they donā€™t see the featured images from topics they donā€™t have access to. Therefore, the featured images displayed to different users will be different depending on their permissions. Is this correct?

1 Like

Another question about permissions, this one probably simpler. Is there a way to select featured images other than adding the defined tag to posts? The concern is that in our Discourse right now pretty much everyone can add tags, and therefore pretty much anyone can decide that an image is featured. This opens the door to potential abuse and need for moderation.

We could raise the trust level for adding tags, but that has other consequences. Iā€™m curious about how others are approaching this question.

1 Like
  1. TLP respects permissions, you canā€™t see anything different. Featured Images will be limited to things to which you have access. The set may be bigger for some users.

  2. Core Discourse functionality solves this for you, you have to keep your chosen tag in a Tag Group which is set up so only staff can set the tag:

image

2 Likes

Thank you so much! This addresses all our concerns.

1 Like

I am looking with big delight at the use of Featured Images (the horizontal row of images) on https://realtimevfx.com/. Any advice about how to implement the improvements they have made?

Specifically:

  • How to make the text with the title and author visible without hovering?
  • How to get those arrows to scroll left and right?
  • How to get rid of the horizontal scroll bar?
1 Like

That doesnā€™t look like the same component. You could check by inspecting the html for the same classes in your browser inspector.

You can style scroll bars in CSS. I posted something along those lines further up in the Topic.

Ask them? You might even be able to identify their javascript and CSS. Or post in marketplace if you need help?

2 Likes

Thank you. Good to know that it isnā€™t the same component. I did ask them, and they respondedā€¦ that itā€™s complicated. :slight_smile:

@merefield, before I consider a request in the marketplace, are you open to integrate these as improvements to this plugin. Although I really like that UI, Iā€™m not sure I want to maintain a patched instance for it.

2 Likes

Sorry for slow response.

If you are willing to fund it, Iā€™d happily look at creating a Theme Component you can add to your instance and ensure this works with TLP installed.

Iā€™m trying to get away from increasing the complexity of the core plugin.

Feel free to PM me.

4 Likes

OK big PR incoming for the Theme Component version of this add-on:

Changes:

  • REFACTOR: Eliminates* jQuery :trumpet:
  • REFACTOR: Converts route and layout feature determination to an Ember Service (similar to TLT Component, credit for approach to @David) - this is MUCH more reliable and eliminates at least one bug.
  • REFACTOR: squashes a LOT of deprecation warnings.
  • FEATURE: Allows you to specify layout features by specific Tag now (not just globally on Tags) (same approach as TLT)

NB The CSS hierarchy is simpler and slightly changed, so be aware if you have customisations!

branch is add_ember_service_remove_jquery

If you want to test it (would be appreciated), you can load this as an additional Component (fill in the branch box under Advanced), edit itā€™s name (call it ā€œTopic List Previews (Beta)ā€?) and add it to a Theme you can switch to that your users donā€™t normally use.

Remember to refresh Browser after every settings change.

Quite a lot has changed, so it will need a good checkover and sadly no automated tests yet. Iā€™ve obviously done quite a bit of testing myself.

I will merge in a couple of weeks or so after a period of open testing.

In time these changes may get adopted by the Plugin too ā€¦

*I believe there is still a little jQuery, Iā€™ll follow up

7 Likes

There is possible to exclude a specific category from image and excerpt previews?

EDIT: Sorry, I see that you have a request space. Iā€™ll put it there.

1 Like

Yes, that should be possible.

2 Likes

@merefield the new changes look great! Havenā€™t noticed any issues so far. I had one suggestion - in the current TC, all tags are styled by default. With the new branch, the tags have to be named individually in the settings. Given that there are numerous tags (and can also be created) can we have all tags styled by default (or have a setting that allows all tags)?

2 Likes

Totally experimental WIP at this stage, but hereā€™s what Iā€™ve been working on, a massive modernisation of the TLP look & feel:

(to see the live demo go to: https://rideables.tech)

(and sure I used the excellent Microsoft Edgeā€™s ā€˜Feedā€™ for inspiration :heart_eyes: ).

6 Likes

The solution is quite simple as it turns out:

  • tags route is now just tag

Iā€™ve updated the add_ember_service_remove_jquery branch with that change (just to default settings) (along with a boat load of other unrelated changes). If youā€™ve changed defaults just swap out tags for tag and tags-mobile for tag-mobile.

Thanks for testing!

2 Likes

Looks awesome both on PC and mobile!

2 Likes

Great news on the Chrome rendering limitation for the TC (limited scroll distance before corruption).

Fixed in Chrome 96: 688640 - chromium - An open-source project to help move the web forward. - Monorail.

Thatā€™s currently their Canary Build (Iā€™ve tested it, and it works now with no issue).

(Now we just need: 1076027 - chromium - An open-source project to help move the web forward. - Monorail so we can dump the javascript)

4 Likes

@merefield thanks for this but it is breaking the site for me. Have updated but all that I see is the time period dropdown. I will try and test without plugins and let you know.

2 Likes