Bug: Cards added to list appear at wrong order when filtering is on #276

Open
opened 2026-02-04 18:19:31 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @RARgames on GitHub (Jan 11, 2023).

Cards added to list appear at wrong order when filtering is on.

How to reproduce:

  • FIlter cards by labels or members (you need to have at least a few labelled cards)
  • Add a few new cards
  • Turn filters off and check order

In the demo - Sample Project - List: Doing - Filterby: Label1 - Cards don't appear at the end.

Originally created by @RARgames on GitHub (Jan 11, 2023). Cards added to list appear at wrong order when filtering is on. How to reproduce: - FIlter cards by labels or members (you need to have at least a few labelled cards) - Add a few new cards - Turn filters off and check order In the demo - Sample Project - List: Doing - Filterby: Label1 - Cards don't appear at the end.
Author
Owner

@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 end position instead of its index when a card is moved to the end of the list.

@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 `end` position instead of its index when a card is moved to the end of the list.
Author
Owner

@RARgames commented on GitHub (Jan 11, 2023):

if it's moved between two cards during the filter

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:
image

@RARgames commented on GitHub (Jan 11, 2023): > if it's moved between two cards during the filter 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: ![image](https://user-images.githubusercontent.com/13639766/211872022-15002da8-f3e4-45fb-9497-9227ac412fa5.png)
Author
Owner

@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) / 2 and 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.

@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) / 2` and 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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/planka#276