Skip to content

feat: support manual ordering of groups and feeds - #1326

Open
mlkgrnt wants to merge 3 commits into
ReadYouApp:mainfrom
mlkgrnt:feat/group-feed-reorder
Open

feat: support manual ordering of groups and feeds#1326
mlkgrnt wants to merge 3 commits into
ReadYouApp:mainfrom
mlkgrnt:feat/group-feed-reorder

Conversation

@mlkgrnt

@mlkgrnt mlkgrnt commented Sep 3, 2026

Copy link
Copy Markdown

PR: feat: support manual ordering of groups and feeds

分支 feat/group-feed-reorder · 单 commit c53b5923 · 基于 upstream main (d2b979cc)
15 files changed, 887 insertions(+), 34 deletions(-)


Problem

Groups and feeds always render in a fixed order (the order they were created in the database), with no way for the user to arrange them. Once a user subscribes to many feeds, the list becomes hard to scan and important groups/feeds cannot be surfaced to the top. There is also no way to create an empty group to organize feeds into before subscribing to anything.

Changes

UI: drag-and-drop reordering (FeedsReorderMode.kt, new)

  • The feeds page title row gains a sort button (Icons.Rounded.SwapVert). Tapping it switches the content into FeedsReorderMode.
  • In reorder mode:
    • Whole groups can be dragged up/down via rememberReorderableLazyListState (lazy list variant).
    • Feeds inside each group can be dragged via the embedded non-lazy ReorderableColumn with a handle on each feed row.
    • A top toolbar shows a hint (reorder_tips) and a Done button to exit reorder mode and persist the new order.
  • Uses sh.calvin.reorderable:reorderable:3.1.0 (KMP library; the Android artifact resolves through its reorderable-android variant).

UI: create empty group

  • The title row also gains a + button (Icons.Rounded.Add) that opens a name dialog (TextFieldDialog), letting the user create an empty group before adding any feeds. (Previously groups could only be created implicitly when subscribing a feed.)

Data layer

  • Feed and Group entities gain a position: Int column with @ColumnInfo(defaultValue = "0") so the SQL-level default satisfies the AutoMigration from schema 7 → 8 (a NOT NULL column without a default would fail migration).
  • Feed's secondary constructor was extended with position to keep Room's constructor matching working (the primary constructor carries @Ignore important and therefore never matches the column set directly).
  • AndroidDatabase version bumped 7 → 8 with the exported 8.json schema.

ViewModel

  • FeedsViewModel gains addGroup(name), reorderGroups(ids), and reorderFeeds(groupId, ids) which update the position columns transactionally.

Verification

  • :app:compileGithubReleaseKotlin — BUILD SUCCESSFUL
  • :app:testGithubReleaseUnitTest (same command the upstream CI runs) — BUILD SUCCESSFUL, all tests green

- draggable reordering of groups and feeds (Reorderable 3.1.0)
- create empty group via the + button in the feeds page title row
- data layer: position column with SQL DEFAULT on Feed and Group,
  AutoMigration 7 -> 8, secondary constructor updated to keep Room
  constructor matching working
…rrow top bar

- intercept system back in reorder mode: if the order was changed show a
  save/discard dialog, otherwise exit reorder mode instead of moving the
  app to background
- replace the feeds-page top bar (settings and add-subscription buttons)
  with a back arrow and Reorder title while reorder mode is active
- drop the redundant drag-handle icon from the reorder toolbar
The feeds page hides the special default group (the catch-all for
uncategorized feeds) once it becomes empty, but the move-subscription
target lists in the feed and group option drawers still listed every
group via pullGroups(), so the invisible default group could be picked
as a move target and would then reappear on the feeds page.

Align the two drawers with the feeds-page rule by deriving the group
list from pullFeeds() and dropping the default group while it has no
feeds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant