Feature request: option to disable swimlane features


#1

Migrating from Trello to Kanboard atm. I’m not going to use swimlanes, but there isn’t a way to disable them currently.

An example; at the top of one column, the column title is “(5) Up Next (5)”.

I could hide the default swimlane count with CSS but that would be a kludge. Might it be possible to get an option to disable the display of swimlane details, either totally or when there is just one swimlane?

Thanks btw for the software!


#2

@milk

As in, you’re looking for the core software to have this feature? If CSS is a kludge, i would imagine you’d feel similar to a plugin, but you could easily turn your required CSS into a plugin and add an enable disable toggle or conditionally check how many swimlanes are being used, not the approach i’d take, but code is code imo. You could always make a Pull Request as well…

Always happy to help with a plugin though.


#3

My request would be to have this option in the core software, so as to disable the feature server side, rather than client side.

The logical conclusion of this suggestion would be to make the core modular and implementing advanced features such as swimlanes as plugins so that each install can keep it’s setup lean, but that would likely require a major refactor. I guess this occurrence might come at some point in the next few years, but until then, maybe there is a simple way of adding a feature to disable swimlanes in the core code, this this request.


#4

I can only speculate, but having been using kanboard and developing plugins for awhile now, I would speculate that “advanced” goes against the “simplicity”, so I’d be surprised if this feature was implemented as an “advanced” feature. Take that with a grain of salt though, I have nothing to do with Kanboard. I’ve also noticed, that features like that come from contributors, and it is highly possible that someone might take that on.

As for simple way to do what you want, absolutely. whether in the core or in a plugin. I would suggest a plugin, keeps the core intact, and if you ever need to upgrade, you won’t have to re-edit. Off the top of my head, you would simply override the table_column template, and change the condition before it writes the </span>

<?php if (! empty($column['column_nb_tasks'])): ?>
            <span title="<?= t('Total number of tasks in this column across all swimlanes') ?>" class="board-column-header-task-count">

in all the instances it’s showing the full swimlane counts.

Once you figure out the appropriate conditions, you can hook a toggle switch anywhere you want, and in the initialize(), conditionally turn the override on/off based on the toggle.


#5

@milk

Here is a simple example for you, as a plugin. Put the toggle switch in “Settings>Board Settings”, once active it will remove the Second set of parentheses in the column header referring to the total task count in all swimlanes, if 1 swimlane is being used.

The added condition in the template is $swimlane['nb_swimlanes'] > 1, if there were more things you wanted to hide, you would do the same.

Hope that helps.


User "Remove" Permissions for Task