mirror of
https://github.com/plankanban/planka.git
synced 2026-02-05 00:39:58 +03:00
Bug: Cards added to list appear at wrong order when filtering is on #276
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @RARgames on GitHub (Jan 11, 2023).
Cards added to list appear at wrong order when filtering is on.
How to reproduce:
In the demo - Sample Project - List: Doing - Filterby: Label1 - Cards don't appear at the end.
@meltyshev commented on GitHub (Jan 11, 2023):
I've thought about it and haven't figured out how it should work. For example, where should a card be placed if it's moved between two cards during the filter 🤔 And probably we need to use
endposition instead of its index when a card is moved to the end of the list.@RARgames commented on GitHub (Jan 11, 2023):
I don't think that it is moved. If I understand it correctly (using the example below): If card "4" is moved below card "6" during filtering, they should change places so the "6" is before "4" after filtering is over. This seems to be the most logical. :) So the order after filtering should be: 1,2,3,6,4,5,7,8,9,10.
In my testing I just created some new cards when the filter was active. After turning it off, new cards were somewhere near the middle of the list. Here is an example of the steps taken and the correct order:

@meltyshev commented on GitHub (Jan 12, 2023):
I completely agree that it would make more sense. But so far I have no idea how this can be achieved, since the position now calculates as
(nextCardPosition - prevCardPosition) / 2and during the filter, we don't know what position the card is in in relation to all the available cards 🤔 I need to think about it, maybe reconsider the positioning system or look at how this is solved in other systems.