Skip to content

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

Open
david-allison wants to merge 7 commits intoankidroid:mainfrom
david-allison:sort-order-ui-model
Open

feat(card-browser): new UI to select sort order#20240
david-allison wants to merge 7 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 a 'Pill' View, which handles the selection of ordering

Define an adapter, which does most of the heavy lifting

How Has This Been Tested?

Screenshot_20260426_131645 Screenshot_20260426_131727 Screenshot_20260426_131800 Screenshot_20260426_131825 Screenshot_20260426_131854 Screenshot 2026-04-26 at 13 45 15 Screenshot 2026-04-26 at 13 48 52

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
    • ❗️ There are warnings that the '1' does not appear in the accessible description, this is correct

@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
@david-allison

This comment has been minimized.

@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

This comment has been minimized.

Ensures that searches aren't performed twice

Assisted-by: Claude Opus 4.7
@david-allison

This comment was marked as resolved.

@david-allison david-allison force-pushed the sort-order-ui-model branch 2 times, most recently from d445929 to 36e5ab0 Compare April 26, 2026 00:26
A control which allows a user to select 1 of 2 options. The options are
obviously linked, with a visual identifier.

In our case, the 2 sides of the pill are: `1↓ | 9↓`, representing
ascending and descending order.

Prep for issue 17732

Assisted-by: Claude Opus 4.7 - most of the design
@david-allison david-allison added Needs Review and removed Needs Author Reply Waiting for a reply from the original author labels Apr 26, 2026
@david-allison david-allison marked this pull request as ready for review April 26, 2026 13:06
Prep for issue 17732

Assisted-by: Claude Opus 4.7 - refactorings and partial rewrite
And remove old implementation

Fixes 17732
Prep for issue 17732

Assisted-by: Claude Ops 4.7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review 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