Allow Re-Ordering of Sources in a Column#245
Merged
ricoberger merged 1 commit intomainfrom Apr 19, 2025
Merged
Conversation
It is now possible to re-order sources in a column by dragging them into a new position. To achieve this a new `position` field was added to the `sources` column, which contains the index of the source in the column. We also added a new `updateSourcePositions` function, which is used to sort the sources locally and update `position` field in the database afterwards. The dragging is handled via a `ReorderableListView` widget. Last but not least the selection of sources from the database was changed, so order them by the `position` column and if the column is `null` by the `createdAt` data as it was before.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It is now possible to re-order sources in a column by dragging them into
a new position. To achieve this a new
positionfield was added to thesourcescolumn, which contains the index of the source in the column.We also added a new
updateSourcePositionsfunction, which is used tosort the sources locally and update
positionfield in the databaseafterwards. The dragging is handled via a
ReorderableListViewwidget.Last but not least the selection of sources from the database was
changed, so order them by the
positioncolumn and if the column isnullby thecreatedAtdata as it was before.