Skip to content

Conversation

@lukstbit
Copy link
Member

@lukstbit lukstbit commented Dec 29, 2025

Purpose / Description

Added an implementation for this feature around the current code of DeckOptionsDestination. I'm open for suggestions on UI, I just added a simple dialog:

Normal decks(and with long names) + filtered decks Screenshot_20251230_093803Screenshot_20251230_093839

Screenshot_20251230_093858Screenshot_20251230_093915

Notice: the contrast isn't great for filtered deck color and black background.

Screenshot_20251230_093932Screenshot_20251230_094001

Screenshot_20251230_094023Screenshot_20251230_094049

Fixes

How Has This Been Tested?

Opened a lot of decks options screens, verified other usages of DeckOptionsDestination, ran tests.

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
Copy link
Member

david-allison commented Dec 29, 2025

Awesome!


Something feels like it's missing visually, but I don't know what

What happens when a deck in the list is long and truncation occurs? Does :: cause problems here

What if there's a lot of entries in the list?

I'd be tempted to add the card count as a subtitle and see how this looks

Can you colour the filtered deck options the same colour as in the deck picker?

Does cancel need to be there? Back or tapping outside should be sufficient

@ZornHadNoChoice
Copy link

I might not be seeing clearly, but the dialog title doesn't feel prominent enough. Also, the Material 2 guidelines agree with david-allison.

The implementation is inserted around the current code so other usages
outside of the new study screen work as before.

See https://github.com/lukstbit/anki/blob/d24d2e33943af2361b5a9880572b30887efcf3ee/qt/aqt/deckoptions.py#L83-L100
@lukstbit lukstbit force-pushed the feat_pickDeckOptionsTarget branch from 354ef23 to 87279d8 Compare December 30, 2025 07:37
@lukstbit
Copy link
Member Author

I updated the images.

What happens when a deck in the list is long and truncation occurs? Does :: cause problems here

Just wraps around and makes the row bigger. I think this is better than truncating.

What if there's a lot of entries in the list?

At most there could be 3 entries based on the implementation.

I'd be tempted to add the card count as a subtitle and see how this looks

I don't think this is a good idea: it would complicate the implementation and I'm not sure what value offers to the user(besides desktop doesn't show this).

Can you colour the filtered deck options the same colour as in the deck picker?

Should've done this from the start.

Does cancel need to be there? Back or tapping outside should be sufficient

No and I removed it. I added it initially to follow the desktop ui.

I updated the dialog appearance by using MaterialAlertDialogBuilder. It has the same surface/container colors issue but this will be fixed later. The contrast for dynamic color on black theme is not great but I'm tempted to leave it for now and wait for the surface colors to be addressed.

Note on the previous design: I just used the normal dialog. Having the title so long probably feels like a message text and not a title.

/**
* True if we need to show to the user a list of decks before going to the deck options, false otherwise.
*/
val DeckOptionsDestination.haMultipleOptions: Boolean
Copy link
Member

Choose a reason for hiding this comment

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

typo: ha -> has

Also, you could have this property inside the class instead of being a extension function on the same file. That way, we don't need to make an extra import on other packages

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Let the user choose which deck's options to open in the reviewer

4 participants