Simple Machines Community Forum

SMF Development => Feature Requests => Applied or Declined Requests => Topic started by: pulha on March 01, 2008, 06:21:28 PM

Title: Preventing Forum refresh when collapsing/expanding an Categorie.
Post by: pulha on March 01, 2008, 06:21:28 PM
Would be great if was an update, mod or in next release that the forum dont refresh when collapsing/expanding an Categorie.

Sry my english :)
Title: Re: Preventing Forum refresh when collapsing/expanding an Categorie.
Post by: Eliana Tamerin on March 04, 2008, 12:56:10 PM
The SMF category collapse system works by saving your preferences when it collapses. So it's not just collapsing it through javascript, but saving that information to your session. So, when you login again, those same categories are collapsed, so you don't have to go through all of it again. Unfortunately, the only way to safely do this is with a page refresh. But never fear, after you've done that once, you need not do so again.
Title: Re: Preventing Forum refresh when collapsing/expanding an Categorie.
Post by: metallica48423 on March 04, 2008, 04:29:43 PM
Theres other reasons as well -- for collapsed categories i believe it doesn't load the board information, which can also speed up your surfing by reducing your load times and amount of data you must download to get a page.  But i could be wrong
Title: Re: Preventing Forum refresh when collapsing/expanding an Categorie.
Post by: Charles Hill on March 08, 2008, 02:21:59 PM
Wouldn't it be more efficient and more user-friendly to use ajax to collapse things?
Title: Re: Preventing Forum refresh when collapsing/expanding an Categorie.
Post by: Thantos on March 10, 2008, 09:55:08 AM
Quote from: metallica48423 on March 04, 2008, 04:29:43 PM
Theres other reasons as well -- for collapsed categories i believe it doesn't load the board information
You are correct.

I haven't taken a good look but I have a feeling that the amount of code needed to handle AJAX loading of a category would enough that it'd just be better to load the board information and use javascript to handle expanding it.

We could use the smfToggle class to allow collapsing (and expanding on the same page load) but that would be a lot of inline javascript to create all those objects.

The only really feasible change I see is to add in some ids and change the collapse link to call a JS function that makes the request to SMF (in order to save your preference) and then hides the boards.  For expanding I really don't see any good alternative to a page load.
Title: Re: Preventing Forum refresh when collapsing/expanding an Categorie.
Post by: Ben_S on March 10, 2008, 10:52:06 AM
How often do people expand / collapse a category, using AJAX for that would be nothing but pointless bloat.
Title: Re: Preventing Forum refresh when collapsing/expanding an Categorie.
Post by: Eliana Tamerin on March 10, 2008, 11:01:37 AM
I know once I collapse categories, I don't usually expand them again but for one or two peeks every once in a while. I can deal with a page refresh, it's a low priority for me. Depends on how the forum is set up, if you're expanding and collapsing categories every day, maybe it's better to just leave them open.
Title: Re: Preventing Forum refresh when collapsing/expanding an Categorie.
Post by: Charles Hill on March 11, 2008, 05:32:38 AM
Points well taken... After I initially responded to this topic I looked into what it would take to use ajax to accomplish category expand/collapse and I realized it'd be a lot more complex than I had initially thought.