Skip to content

feat(card-browser): new UI to select sort order#20240

Draft
david-allison wants to merge 4 commits intoankidroid:mainfrom
david-allison:sort-order-ui-model
Draft

feat(card-browser): new UI to select sort order#20240
david-allison wants to merge 4 commits intoankidroid:mainfrom
david-allison:sort-order-ui-model

Conversation

@david-allison
Copy link
Copy Markdown
Member

@david-allison david-allison commented Jan 27, 2026

Purpose / Description

We define and use SortOrderBottomSheetFragment, a bottom sheet fragment which supports:

  • All sortable Anki Columns
  • 'No sorting' (AnkiDroid specific)
  • Display of disabled columns (FSRS columns, if not enabled, 'question' and 'answer' in cards mode)

The order of columns is:

  • No Sorting
  • Columns available in the UI
  • Remaining columns, which are not disabled, in AnkiDroid's default column order
  • Disabled columns which are NOT in the UI

This replaces the previous implementation

Fixes

Approach

Define a standard bottom sheet fragment: SortOrderBottomSheetFragment with newInstance() to initialize args from the collection

Define an adapter, which does most of the heavy lifting

⚠️ This was borderline using itemViewType for the logic - didn't feel worthwhile

How Has This Been Tested?

Extensive unit tests

Screenshot 2026-01-30 at 15 22 40

Checklist

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • [⚠️] UI Changes: You have tested your change using the Google Accessibility Scanner

@david-allison david-allison added the Needs Author Reply Waiting for a reply from the original author label Jan 27, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Important

Maintainers: This PR contains Strings changes

  1. Sync Translations before merging this PR and wait for the action to complete
  2. Review and merge the auto-generated PR in order to sync all user-submitted translations
  3. Sync Translations again and merge the PR so the huge automated string changes caused by merging this PR are by themselves and easy to review

@david-allison david-allison added Blocked by dependency Currently blocked by some other dependent / related change and removed Needs Author Reply Waiting for a reply from the original author labels Jan 30, 2026
*
* 'Question' is unavailable in Cards mode
*/
val available: Boolean
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename to canBeSorted

@david-allison
Copy link
Copy Markdown
Member Author

david-allison commented Feb 1, 2026

Use the colors/style in bc78d4a for the buttons. Much better than my attempt

@david-allison david-allison changed the title feat(card-browser): new UI to select sort order [DRAFT] feat(card-browser): new UI to select sort order Mar 5, 2026
@david-allison david-allison added Needs Author Reply Waiting for a reply from the original author and removed Blocked by dependency Currently blocked by some other dependent / related change labels Apr 19, 2026
@david-allison david-allison marked this pull request as ready for review April 19, 2026 14:41
@david-allison david-allison added the Next version Changes to be merged in the next version, to keep the current release stable. label Apr 20, 2026
@david-allison david-allison changed the title [DRAFT] feat(card-browser): new UI to select sort order feat(card-browser): new UI to select sort order Apr 20, 2026
@david-allison david-allison marked this pull request as draft April 23, 2026 11:14
@david-allison
Copy link
Copy Markdown
Member Author

De-conflicted, but I'd like to re-design, at least to use our new button design

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Author Reply Waiting for a reply from the original author Next version Changes to be merged in the next version, to keep the current release stable. Strings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Card Browser: Convert Display Order to Chip for sorting

1 participant