Multiple View Options

AI-generated summary

The discussion revolves around the idea of providing multiple view options for users on a Discourse forum. jimkleiber expresses frustration with the current Topic Thumbnails view, suggesting it can be ambiguous and make browsing lists more difficult. They propose allowing users to choose their preferred view, similar to the Craigslist app.

jimkleiber also shares an image illustrating their idea. merefield responds, pointing out that this is almost possible with current functionality by leveraging the Hamburger theme selector. They suggest configuring multiple themes with different Topic List Previews component settings, allowing users to switch between them.

Furthermore, merefield shares their own experience using this technique to enable users to switch between different themes, including one with a computational ly expensive rotating moon animation. They also propose an alternative method using a theme component with buttons to amend CSS and switch individual parts on and off. jimkleiber expresses appreciation for the suggestion, finding it a viable solution.

I was thinking about something similar today as I browsed both the Customization > Plugin and Customization > Theme categories and felt frustrated trying to skim through the lists.

I almost wished there were a way for the user to choose how they wanted to view it, like how the craigslist app will give the options for list, thumbnails, grid, or gallery (and map sometimes, too), instead of making the admin choose the only view.

Maybe this should be a new topic tho.

6 Likes

That’s almost completely possible today without any code changes, leveraging Hamburger Theme Selector

A simple workaround with current set-up and code would be to just configure say three different Themes with different instances of the Topic List Previews component (or equivalent) that has different settings, call them something obvious and allow the user to switch between them. No code work, uses core functionality. Done.

I use this technique at the moment to allow a user to switch on and off a rather computationally expensive rotating moon animation (see https://starzen.space). Default off, if you want the animated moon and stars, you select the other Theme from the Hamburger menu, which is otherwise identical. If you just want a boring list view without any distractions, there’s a “Maintenance” theme (which in my case includes images, but you get the idea). Easy!

Another way to make that a little more flexible would be to add a TC with buttons to amend CSS and switch the individual parts on and off. Then you might only need two themes, one for masonry and the other list?

4 Likes

I never even thought about this as an option and I love it, thank you for suggesting it!

1 Like