Collapsible Category

Collapsible Category 2.5.0

No permission to download
I can confirm that the latest version of this addon running on an up-to-date XF 2.2 install properly stores collapsed state where it would previously frequently be lost in older versions. We've been running the latest version since late January and it has worked without a problem.
 
Running the latest version and tried different browsers and it is happening on log out and log back in. If you don't log out of the site it stays.
That is the behavior which older versions of this addon displayed. Likewise similar addons which have this functionality of allowing categories to be collapsed still have that problem even now AFAIK, but finally not this one.

What version of this addon is shown in your addon list in the admin panel? And what XenForo version is shown at the bottom of the page in your admin panel?
 
250 and 224. It works fine if you don't log out. Tried in different browsers and it's the same thing. Very weird.
 
Same happens here, but I think this is by design.
On logout, all users cookies set by XF are cleared.

If you want cookies to be remembered on logout, you would need to set cookies bypassing XF.
 
Same happens here, but I think this is by design.
On logout, all users cookies set by XF are cleared.
That is how it used to work, partly because that's how XF handles them by default, though recent versions of XenForo fixed a shortcoming that prevented longer storage options from working.
With version 2.5.0 of this addon and Xenforo 2.2.x (not sure which version of XF is actually needed to have it work), the cookie is properly set to be stored for 1 year. This has been working for myself and several others since 2.5.0 was released back in January, and you can see others posting about it likewise now storing correctly for them in the past few pages. I collapsed a couple of categories back then and they've stayed collapsed ever since.

As for why it's not staying stored properly for either of you two, since you're apparently using up to date versions of the addon and XF, I don't know. Perhaps the addon author can help you further.
 
That is weird, as far as I know, all cookies starting with xf_* are flushed on logout, no matter if the cookie is set to be stored for 1 year. At least that is what's happening over here with Edge.
This addon seems to use xf_toggle to store its settings.

@Brettflan, can you confirm that in your situation the cookie xf_toggle is present, and on logout / login the cookie is stil present?
 
That is weird, as far as I know, all cookies starting with xf_* are flushed on logout, no matter if the cookie is set to be stored for 1 year. At least that is what's happening over here with Edge.
This addon seems to use xf_toggle to store its settings.

@Brettflan, can you confirm that in your situation the cookie xf_toggle is present, and on logout / login the cookie is stil present?
We use a custom cookie prefix instead of the default "xf_", but otherwise, yes, I can confirm. What you are describing of all cookies being flushed on logout despite storage length being set is what used to happen in older XenForo versions, but was addressed at some point (again, I don't know offhand which version that happened).

EDIT:
Though it does require a bit of additional code to have it properly stored longer, which this addon specifically implemented.
 
By the way, you can test yourself on our forums to determine whether it's being stored correctly for you or not:
For our forums, the relevant stored cookie is "twf_toggle".

I admit I've only tested in Firefox (which I generally use) and Chrome, not Edge specifically, but I've had none of our users report it as not working correctly.
 
So after some more testing I have found that the only browser to keep the status was Firefox. Chrome and Brave both lose the collapse after a few hours even not logging out. I can see the cookie with the extended time too.
 
So after some more testing I have found that the only browser to keep the status was Firefox. Chrome and Brave both lose the collapse after a few hours even not logging out. I can see the cookie with the extended time too.
Hmm, it has been consistently stored for me in Chrome, which is the only browser I've bothered testing beyond Firefox. Both on Windows 10. I wonder what is different between my Chrome configuration and yours?
 
I have a little problem with this add-on.
Normally I have text central in the categories, but using your add-on text is moved to the left.
Is there a way to have text again central?
 
Great Add-On! The only recommendation I have is that it would be nice to add an option to Categories that would set them to collapsed by default. But this is really nice!
 
One more feature that would be great, though this is probably actually a separate Addn-On, would be collapsable categories in the Node view list in the AdminCP.
 
I noticed, that for my symbolic logic the state of the button should be reversed: not turn the collapsed state of the category on, but turn the category on. Thus I switched it in the stylesheet.

As for the persistency-issue: For me also the state does not survive long. Xf 2.2.9 Addon 2.5.0 Chrome on Windows 10
 
Hello,
I know the chance for answer is little, but would anyone know how to fix this?

The button appears under category name and also it makes the category bar unnecessarily higher.

Would you guide me how to move that ON/OFF button to the right?

Thank you 🙏

1660089316854.webp
 
@KSA Seems to work fine. Except it messes with my style a little... Ideas on how to fix?
 

Attachments

  • Screenshot_16.webp
    Screenshot_16.webp
    55.4 KB · Views: 18
  • Screenshot_17.webp
    Screenshot_17.webp
    49.8 KB · Views: 18
Custom styles with own template codes rearrangements would obviously output unexpected behavior.

Maybe if you share the link to your site I might be able to take a look but just so you know that this addon functions normally on XF default style.
 
I noticed, that for my symbolic logic the state of the button should be reversed: not turn the collapsed state of the category on, but turn the category on. Thus I switched it in the stylesheet.

@voom I would dearly love to know what template or other you did this in.

As an alternate solution, is there something that I can put in extra.less that would cause the default display to be collapsed?
 
Top Bottom