Topic List Previews Theme Component

Oh there is no urgency. :+1: Please check it out when you have time according to the priority. Meanwhile I’ll test some more and report if there is any issue.

3 Likes

BTW am seeing overlaps of topic list items on category pages with display of sub-categories, this might affect user experience…

1 Like

That’s probably down to a JS error from either the TLP TC or something else.

The layout requires working JS. If something breaks the JS on the page, it can halt the TLP “renderer”.

What happens when you refresh the page?

Do you see an error in the console? I cannot currently repro, e.g.: Uncategorized - StarZen: The Unofficial Star Citizen Community

1 Like

I successfully reproduced it (still tiles and excerpts enabled).

And yes, when refreshed the layout became normal, for a short period. Btw the blank at the bottom of tiles doesn’t seem normal. I didn’t see any errors in the console other than a “add a pluginId key to your modifyClass call” reminder.

After refreshing a few more times, the layout broke again in the way shown in the first image.

Hmm the category in your link doesn’t have a sub-category, it seems. The layout break only happens when there’s a sub-category list on the category page.

Cannot repro that either, just created a sub category, navigated to it and tiles render fine.

Try removing all other TCs and plugins and work out if something is causing a break.

3 Likes

Hey Robert

found another small issue: Whenever TLP tc is activated, even without enabling it in a specific view, the width of the div tag with the class category-and-tags is squeezed together in regular topic list. I could not pinpoint the exact CSS which causes the issue though.

With TLP enabled

Without TLP enabled

1 Like

I made this change in response to your prior feedback
This is deliberate to accommodate actions. It’s a trade off. When we have container queries on all main browsers I can make this more intelligent. Firefox is currently outstanding.

It definitely looks more odd because you haven’t enabled actions.

Here’s an example with them enabled:

If you are fine with the end of tags not lining up vertically with actions one could design this differently but that would be wasteful in an different way

I might be able to add a tweak to reduce the actions ‘column’ it they don’t exist.

Tbh tiles is the most sophisticated layout option for mobile

1 Like

Hey merefield. Thx for the detailed explanation.

In my specific case I have TLP enabled solely to display the topic thumbnail picker (while all other settings are disabled).

if there was a way to display the thumbnail picker without TLP tc active, I would go with that. Hence I submitted that "bug"report. Since the TLP TC is active without having any active settings, I did not expect

If this “bug” is not critical, then I can submit a feature request for an option to activate the thumbnail picker via plugin options without the need to have TLP TC enabled. Is that something feasible?

1 Like

I’ve tweaked it to give you (quite a bit) more room if you aren’t using actions:

Please update and give that a whirl

4 Likes

Hey Robert

thx for the quick fix, realy appreciate it! It’s already closer to expected behaviour, but since the space on mobile is so highly limited, we would like to maximize it.

Following up on this. Such a feature would eliminate the issue above.

1 Like

The TC and the plugin are only split so that some users without plugin capability can make use of the basic features and provide very fast rollouts of front end changes.

I have no plans to change that division of responsibility at present and plan to keep all front end code in the TC. My time is also pretty limited.

3 Likes

I broke the Topic List Like in a recent refactor, apologies. This is now fixed FIX: refactor broke Like · paviliondev/discourse-tc-topic-list-previews@f41d9de · GitHub

3 Likes

@Kuro22 did you solve this, did you manage to find any clashes with other components/plugins or see an error?

1 Like

Hi, I’m getting an error after updating the component:

I tried disabling all other components, also switching to different themes - it does not go away.
At least it is only showed when I log in, and I didn’t notice any real problems apart of the warning.

The logs

Topic List Previews theme/component is throwing errors:

initialize@https://mydomain.com/theme-javascripts/b44a9c3c1aecf9da1fde6508abfa890657ed08b0.js?__ws=mydomain.com:953:21
_prepareInitializer/init.initialize@https://mydomain.com/assets/application-b796ecb1e6cc40160bed7938dadcbb11fb359f74cf8e1065c0d7c2a0c69b2e82.js:9:12432
runInstanceInitializers/<@https://mydomain.com/assets/vendor-e356674b67559130cbeca4530a0a5a00e71144f5e7556902f8a5efc8ac3f2282.js:21:22368
Vertices</Vertices.prototype.each@https://mydomain.com/assets/vendor-e356674b67559130cbeca4530a0a5a00e71144f5e7556902f8a5efc8ac3f2282.js:30:11271
Vertices</Vertices.prototype.walk@https://mydomain.com/assets/vendor-e356674b67559130cbeca4530a0a5a00e71144f5e7556902f8a5efc8ac3f2282.js:30:10019
DAG</DAG.prototype.each@https://mydomain.com/assets/vendor-e356674b67559130cbeca4530a0a5a00e71144f5e7556902f8a5efc8ac3f2282.js:30:9174
DAG</DAG.prototype.topsort@https://mydomain.com/assets/vendor-e356674b67559130cbeca4530a0a5a00e71144f5e7556902f8a5efc8ac3f2282.js:30:9236
_runInitializer@https://mydomain.com/assets/vendor-e356674b67559130cbeca4530a0a5a00e71144f5e7556902f8a5efc8ac3f2282.js:21:22761
runInstanceInitializers@https://mydomain.com/assets/vendor-e356674b67559130cbeca4530a0a5a00e71144f5e7556902f8a5efc8ac3f2282.js:21:22177
_bootSync@https://mydomain.com/assets/vendor-e356674b67559130cbeca4530a0a5a00e71144f5e7556902f8a5efc8ac3f2282.js:20:24938
didBecomeReady@https://mydomain.com/assets/vendor-e356674b67559130cbeca4530a0a5a00e71144f5e7556902f8a5efc8ac3f2282.js:21:241
invoke@https://mydomain.com/assets/vendor-e356674b67559130cbeca4530a0a5a00e71144f5e7556902f8a5efc8ac3f2282.js:29:24903
flush@https://mydomain.com/assets/vendor-e356674b67559130cbeca4530a0a5a00e71144f5e7556902f8a5efc8ac3f2282.js:29:23174
flush@https://mydomain.com/assets/vendor-e356674b67559130cbeca4530a0a5a00e71144f5e7556902f8a5efc8ac3f2282.js:29:26603
_end@https://mydomain.com/assets/vendor-e356674b67559130cbeca4530a0a5a00e71144f5e7556902f8a5efc8ac3f2282.js:30:3918
end@https://mydomain.com/assets/vendor-e356674b67559130cbeca4530a0a5a00e71144f5e7556902f8a5efc8ac3f2282.js:29:30629
_run@https://mydomain.com/assets/vendor-e356674b67559130cbeca4530a0a5a00e71144f5e7556902f8a5efc8ac3f2282.js:30:4816
_join@https://mydomain.com/assets/vendor-e356674b67559130cbeca4530a0a5a00e71144f5e7556902f8a5efc8ac3f2282.js:30:4445
join@https://mydomain.com/assets/vendor-e356674b67559130cbeca4530a0a5a00e71144f5e7556902f8a5efc8ac3f2282.js:29:31756
join@https://mydomain.com/assets/vendor-e356674b67559130cbeca4530a0a5a00e71144f5e7556902f8a5efc8ac3f2282.js:23:2782
bind/<@https://mydomain.com/assets/vendor-e356674b67559130cbeca4530a0a5a00e71144f5e7556902f8a5efc8ac3f2282.js:23:3839
mightThrow@https://mydomain.com/assets/vendor-e356674b67559130cbeca4530a0a5a00e71144f5e7556902f8a5efc8ac3f2282.js:2:15381
resolve/</process<@https://mydomain.com/assets/vendor-e356674b67559130cbeca4530a0a5a00e71144f5e7556902f8a5efc8ac3f2282.js:2:16035

Using Discourse 2.8.8 (2.8.9 is not yet available via Yunohost).

1 Like

This is most likely your problem.

TLP only supports latest tests-passed (ie right now 2.9.0.beta10)

I updated literally 2 days ago with no issue. (Update: just performed another update on another site just now and it’s fine too).

I’m afraid you are going to need to update to latest to get this working again. The problem currently is Discourse core is moving Ember versions very fast, so TLP has to do the same and keep up. It seems the modern TLP code no longer works on Discourse 2.8.8.

If you can find the breaking commit and wish to submit a PR, I’d accept a version pin: Pinning plugin and theme versions for older Discourse installs

1 Like

Thanks for the reply!
Is it possible to downgrade TLP for now?

1 Like

See my update above, I’ll accept a pin in a PR but you’d have to do the research to find the breaking commit.

1 Like

That’s more like a ‘no’ with my skills :slight_smile:
Should I expect any real issues if I leave it like this untill the updates come?

1 Like

I cannot give you any promises, but the Component will only affect the front end, so fairly harmless. You’ll have to test it thoroughly - from that message something has broken but I’ve no idea what! There’s probably core code you can delve into to work out what might trigger this message.

In any case you really need to find a way to get yourself on the test-passed track or you will be hit by this again and again.

1 Like

There appears to be a minor bug with the sidecar #plugin.

If you watch this video, you might be able to notice that the topic previews move slightly to the right when the like/link buttons are clicked on.

1 Like