Collapsible Node Categories

Collapsible Node Categories

Which solution?
I'm guessing the CSS change of icons to chevrons, posted back here:
 
Yes, that's correct. Change icons to chevrons.

But it would be very nice if someone could find a solution to fix the issue without having to change the button design.
 
@ioneti
Problem solved. I have commented margin-right of &is-active:before

Here is the complete code to have original buttons (not chevrons ones)

CSS:
/* Node Collapse */
.block--category
{
    .collapseTrigger
    {
        opacity: 0.5;
        transition: opacity 0.3s;
        margin-right: 10px;

        &.is-active:before
        {
            content: "\f205";
            transform: scale(-1, 1);
            //margin-right: -8px;
        }
        &:before
        {
            content: "\f205";
            font-size: 80%;
        }
    }
    .block-container:hover .collapseTrigger
    {
        opacity: 1;
    }
}


.collapsible-nodes
{
        .block-header
        {
            display: flex;
        }
        .block-header--left
        {
            margin-right: auto;
            max-width: 100%;
        }
}
.block-body.block-body--collapsible
{
    transition: all 0.3s cubic-bezier(0.43, 0.01, 0.5, 1.5);
    -webkit-transition-property: all, -xf-opacity;
    transition-property: all, -xf-opacity;
    overflow-y: hidden;
    height: 0;
    -webkit-transition-property: all, -xf-height;
    transition-property: all, -xf-height;
}
 
@ioneti
Problem solved. I have commented margin-right of &is-active:before

Here is the complete code to have original buttons (not chevrons ones)

CSS:
/* Node Collapse */
.block--category
{
    .collapseTrigger
    {
        opacity: 0.5;
        transition: opacity 0.3s;
        margin-right: 10px;

        &.is-active:before
        {
            content: "\f205";
            transform: scale(-1, 1);
            //margin-right: -8px;
        }
        &:before
        {
            content: "\f205";
            font-size: 80%;
        }
    }
    .block-container:hover .collapseTrigger
    {
        opacity: 1;
    }
}


.collapsible-nodes
{
        .block-header
        {
            display: flex;
        }
        .block-header--left
        {
            margin-right: auto;
            max-width: 100%;
        }
}
.block-body.block-body--collapsible
{
    transition: all 0.3s cubic-bezier(0.43, 0.01, 0.5, 1.5);
    -webkit-transition-property: all, -xf-opacity;
    transition-property: all, -xf-opacity;
    overflow-y: hidden;
    height: 0;
    -webkit-transition-property: all, -xf-height;
    transition-property: all, -xf-height;
}
Un extra.less?
 
i tested it in 2.3.4 and it works smoothly

32.gif

Edit : i got better results when I deleted the part.
Code:
 &.is-active:before

            margin-right: -8px; (delete)
 
Last edited:
Hey guys, I really like the idea of Collapsable Categories / Nodes for our forum - which uses standard XF style
However we:
1. are not happy to do all the editing of templates shown above (lack of skill, and worried about ease of maintenance)
2. would prefer to use conventional up and down chevron style
3. need it to store the user's preferences, even if he logs out
4. would like to specify the default initial state - all collapsed - which would be how any new user would see the forum when they first logged in. All subsequent changes made by that user would be remembered so it would appear as it did when he last was logged in.
5. are currently using XF 2.2.16 and intend to migrate to 2.3.x as soon as all our add-ons are compatible

So, would it be possible to upgrade the existing excellent add-on Collapsible Category 2.5.0 to do the above please?
Hoping that is possible🤞🤞🤞
Regards, Mike
 
Last edited:
I've got this to work quite well for a grid display which gives an overlay that shows the expanded content when toggled. I need it to default to the collapsed view, which it does on Firefox, but Chrome defaults all the categories to expanded. Any Ideas?
 
Back
Top Bottom