AppFlowy-IO / AppFlowy-IO/AppFlowy
[FR] Grid Select & Multiselect fields should be able to sort in arbitrary orders
- Dominant language
- Dart
- Stars
- 76.6k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
### Description
Right now it appears that Select and Multiselect fields - when used in sorts - only function as text fields, and only sort alphabetically.
However, Select and Multiselect fields essentially operate like labels, which means their alphabetical value may not necessarily correspond to their relationship to other items.
For example, imagine a Select with two options: "Ready for Work" and "Done".
In this case, "Ready for Work" conceptually should come before "Done," and sorts of the Grid should reflect that.
At present, the only way to do this is to sort in Descending order.
Now imagine, however, that another option is added: "Being Worked On".
In reverse order, "Being Worked On" will appear last in the Grid. In normal order, it would appear first. There's no way - using just text - to sort these items appropriately.
AppFlowy already supports manually re-arranging the items in a Multi/Select.
The addition for this feature would be to add another option to the Multi/Select field that enables something like "Manual" or "Arbitrary" sorting. Like the Numbers field, Multi/Select would have an additional option like "Sort by" with two options: "Alphabetical" or "Arbitrary". Alphabetical would work like today, Arbitrary would depend on the order of the items in the "Options" subheading.
### Impact
Any Grid user, power grid users, project planners
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the Grid Select and Multiselect sorting implementation and the Options ordering UI. Define completion as adding an explicit Alphabetical or Arbitrary choice, with Arbitrary following the manually arranged option order for both field types while Alphabetical keeps its current behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- database, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100