[GH-ISSUE #3108] [Bug] bugs when sorting in multi-sort #1365

Closed
opened 2026-03-23 20:48:21 +00:00 by mirror · 0 comments
Owner

Originally created by @richardshiue on GitHub (Aug 3, 2023).
Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/3108

Originally assigned to: @richardshiue on GitHub.

Bug Description

Currently, when a field is being sorted, the following happens following a previous PR https://github.com/AppFlowy-IO/AppFlowy/pull/2953 . For the sake of explanation, we'll assume Ascending sort for now.

  • If the cell is empty (as in it isn't initialized), it is immediately moved to the bottom.
  • If the cell is initialized, but the content is empty (such as a being an empty string, or the timestamp of a date field is None), it is then moved to the bottom.

This works well for the most part: empty cells are moved to the bottom and not sorted. However, if you look at the order of these rows closely, it's not quite right:

https://github.com/AppFlowy-IO/AppFlowy/assets/71320345/b428d4ef-2dc5-461f-a8c0-6c8a3b6aaf52

By typing text into the cell and then clearing it, I initialize it and then clear the value. Following the checkbox, that row that was previously below another empty row, suddenly rises above it after the sort. This is unexpected because natural order should be preserved.

The following example illustrates what happens during multi-sort

https://github.com/AppFlowy-IO/AppFlowy/assets/71320345/8314b6f3-1cf2-4943-89f7-603af8b96698

How to Reproduce

Please refer to the description for what exactly is happening.

Expected Behavior

The sort results should be intuitive and reasonable to the user.

Operating System

Fedora Linux 38

AppFlowy Version(s)

0.2.8

Screenshots

No response

Additional Context

No response

Originally created by @richardshiue on GitHub (Aug 3, 2023). Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/3108 Originally assigned to: @richardshiue on GitHub. ### Bug Description Currently, when a field is being sorted, the following happens following a previous PR https://github.com/AppFlowy-IO/AppFlowy/pull/2953 . For the sake of explanation, we'll assume Ascending sort for now. - If the cell is empty (as in it isn't initialized), it is immediately moved to the bottom. - If the cell is initialized, but the content is empty (such as a being an empty string, or the timestamp of a date field is None), it is then moved to the bottom. This works well for the most part: empty cells are moved to the bottom and not sorted. However, if you look at the order of these rows closely, it's not quite right: https://github.com/AppFlowy-IO/AppFlowy/assets/71320345/b428d4ef-2dc5-461f-a8c0-6c8a3b6aaf52 By typing text into the cell and then clearing it, I initialize it and then clear the value. Following the checkbox, that row that was previously below another empty row, suddenly rises above it after the sort. This is unexpected because natural order should be preserved. The following example illustrates what happens during multi-sort https://github.com/AppFlowy-IO/AppFlowy/assets/71320345/8314b6f3-1cf2-4943-89f7-603af8b96698 ### How to Reproduce Please refer to the description for what exactly is happening. ### Expected Behavior The sort results should be intuitive and reasonable to the user. ### Operating System Fedora Linux 38 ### AppFlowy Version(s) 0.2.8 ### Screenshots _No response_ ### Additional Context _No response_
mirror 2026-03-23 20:48:21 +00:00
  • closed this issue
  • added the
    grid
    bug
    labels
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#1365
No description provided.