Topic List Previews Theme Component

Ah you running this on top of News Plugin? I’m afraid the results of that are not predictable and it might be causing the issue. The News Plugin is not explicitly supported as it has its own templates.

If you remove the News Plugin, does the issue go away?

3 Likes

Tiles Enhancements and Intra-tile Layout Changes

@nathank and I have been working on some optimisations to the layout within the Tile

  • Rearrange items to make better use of space, specifically:
    • move posters to tile footer, allowing more width for title, category, tags
    • ensure posters just take up one line, add number representing number of additional posters if large list
    • wrap meta to leave space for more posters
    • move tags alongside Category and continue to allow them to wrap
    • optimise padding
  • Add new share button :chains: so you can share a topic straight from the Topic List :rocket:
  • Various fixes to action button behaviour and formatting
  • Removal of grey bar at top of topic list
  • Reduction of redundancy in CSS (esp. between desktop and mobile).

NB You are recommended to test this out on a test site first to double check if any of your CSS overrides are working correctly.

Thanks to @nathank for supporting this work, testing the results and offering so many great suggestions

NB I’ve customised my tile slightly by starting the posters from the right, default is from the left as per core:

.topic-list.tiles-style {
  .topic-users {
    justify-content: flex-end;
  }
}

You may notice the meta is now wrapped by default. This was done with a heavy heart and is because we are trying to maximise the number of posters that can be depicted. I will revisit this if/when we get container queries in browsers so we can base the width of the meta on the number of posters.

7 Likes

We can not select thumbnail right? Sometime first image is not the best image for thumbnail!

1 Like

Yes you can. Install the sidecar plugin and there is a UI to select thumbnail behind the topic meta editor.

If you can’t install plugins there’s also a way of selecting the thumbnail as per core.

In a topic, if you would like to select a different image from the OP, add |thumbnail to the markdown. For example

![alttext|100x100](upload://aaa)
![alttext|100x100|thumbnail](upload://bbb) << this one will be the thumbnail

The UI plugin solution is better because you can select any image in any post. The Markdown solution is restricted to OP.

4 Likes

@merefield Since the linked feature request wizard is not active anymore, I will just post it here

For the sidecar plugin, is there any way to allow staff (mods, admins) to change the thumbnail for the user?

1 Like

That should already be possible, are you having an issue?

1 Like

Yes. As an admin, I cannot change the thumbnail of other users topics. Already tried renewing HTML of the post. Or do I maybe need to rebake?

We run on latest tests-passed

1 Like

Are you getting an error message in logs? At what point does it fail? I trust you are using the UI provided?

1 Like

Nothing in logs
No images are displayed in prompt
Not sure what you mean with “UI provided”, but here is a quick demo of the issue:

CleanShot 2022-09-08 at 14.25.04

1 Like

On a sidenote, there is another small issue:

Even when TLP is not activated for a topic list, the following CSS is sneaks in:

.mobile-view .topic-list .right {
  margin-left: 95px;
}

See vid:

CleanShot 2022-09-08 at 14.32.24

3 Likes

My bad, you need to be the user or admin currently:

Happy to consider that as a feature request to extend it to Moderators

3 Likes

My issue is that the issue appears while I am admin.

1 Like

Are the images uploads? They must have an upload id.

1 Like

Hey Robert

I was able to pinpoint the issue! As admin the issuea appears only for topics which were created before the sidecar plugin was installed.

:heart: Our mods will certainly be very happy with that :slight_smile:

1 Like

This was happening because the way we set up the staging site for jrgongs forum, storing images on S3 buckets on the original forum where the staging site is pointing to. The staging site has a different current_db name so Post::each_upload_url fails to find the uploads.
The it failed was not because posts were made before the sidecar plugin was installed, it failed on posts that were made before the production site was copied to staging.

5 Likes

Ah … do you need any action from me?

After a round of updating my discourse instance I noticed that featured topics (those set with the featured tag) were no longer showing on the initial page load and wouldn’t appear until manually selecting one of the categories, latest, etc topic lists. In this case I have the user interface setting default home page set to categories, which had previously worked as expected. If latest, new or unread are set as the default home page, the featured topics will display on the page as anticipated without having to manually select a topic list. If categories or top are selected, they will not appear until the user manually changes the topic list. I’m not sure if I have missed something or if perhaps a change to the core discourse has changed this behavior.

3 Likes

Done.

You should now be able to access thumbnails as moderator.

This also fixes a glaring logic error here where there was an assignment not an equivalence check! :open_mouth: :+1:

Really the UI & security logic needs a bit of further improvement here. The button should really be hidden if you don’t meet the criteria. I’ll follow up with that in the TC at some point … Also the API isn’t properly secure with regards to this logic as all it is currently doing is preventing you seeing the buttons. It needs further changes to fully secure it. But given this is such a low risk action I don’t think this is a massive priority.

5 Likes

Nope, this was basically a false alarm, thanks!

3 Likes

Thx for the fix! We will test it once we deploy it on live :slight_smile:

Do you see any chance to display the “Choose thumbnail” button only for topics which are in a category or have a tag with thumbnails enabled in TLP tc? Or would this be a bigger effort to implement?

3 Likes