ElkArte Community

General => Site Feedback => Topic started by: ahrasis on October 18, 2014, 03:36:35 am

Title: Category Collapse
Post by: ahrasis on October 18, 2014, 03:36:35 am
I noticed that clicking category collapse button refreshes the page before it takes effect. I don't think that this intended. It happens here as well.

I believe it should be using ajax as others do. Any fix?
Title: Re: Category Collapse
Post by: emanuele on October 18, 2014, 04:06:59 am
It is.
Convert it to a proper "AJAX" call requires a bit of work (and TBH I'm not entirely sure it is worth, but I wouldn't be against it), the most viable would be to just hide the collapsed categories via javascript.

Though, it has (still) some interesting performance impact (see this topic (http://www.elkarte.net/community/index.php?topic=837.0) for data).
In particular, in the current setting, we are talking about these data:
  • admin:
    • 12.16 not collapsed
      5.18 collapsed
  • normal user:
    • 4.47 not collapsed
      2.26 collapsed

Of course, the most important consideration is: how many people actually collapse categories?
From what I remember the number is very, very small, less than 1%, so the performance impact would be irrelevant.
Title: Re: Category Collapse
Post by: ahrasis on October 18, 2014, 04:48:54 am
No problem with removing that button. But refreshing a page is not good though.
Title: Re: Category Collapse
Post by: emanuele on October 18, 2014, 05:06:50 am
It's not that refreshing the page kills kittens. :P
It may happen once in a lifetime (last time I collapsed a category was about 2 years ago, I was still a developer at SMF), and most of the people would never use it.

From my perspective is a "nice to have", but not something that I'm going to kill to have.
Of course that's my own personal opinion, the project is open and anyone can push it one direction or the other. ;)
Title: Re: Category Collapse
Post by: Joshua Dickerson on October 18, 2014, 05:40:27 pm
This is the same discussion that happened years ago at SMF. Pretty much the same things were said and the same outcome came of it.
Title: Re: Category Collapse
Post by: emanuele on October 18, 2014, 06:30:40 pm
I'm pretty sure if nobody else does it, I will do it for 1.1 (just because it means get rid of a table in favour of a "preference" and I'm all for get rid of some less-used tables). But if anyone else is interested, it would mean less work for me and more community involvement. ;)
Title: Re: Category Collapse
Post by: ahrasis on October 18, 2014, 10:37:40 pm
Rather than refreshing, hide and show using css is better IMO. I will try to create a push a sample.