Prevent empty widget areas from being hidden



  • Hi

    I would like to keep some widget area even if they are empty. How can I prevent NodeBB from adding the hidden class to them just after load?

    Thanks



  • Probably this line here.

    if (!renderedWidgets.length) {
    	area.addClass('hidden'); //Remove this.
    	ajaxify.widgets.reposition(location);
    }
    

    https://github.com/NodeBB/NodeBB/blob/master/public/src/widgets.js#L68



  • Thanks for that. I would expect some way to configure that. Removing that line would also apply that to all widgets areas, on all themes, right?

    My workaround is to add a plznohide class to the appropriate widget areas' divs and add this to either my theme CSS or the "Custom CSS":

    .hidden.plznohide {
        display: initial !important;
        visibility: visible !important;
    }
    

    It seems to work as expected. Being able to configure if each widget area should be hidden in the ACP would still be nice.


 

| |