-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add functionality to custom study by tags or card state #17948
base: main
Are you sure you want to change the base?
Add functionality to custom study by tags or card state #17948
Conversation
Important Maintainers: This PR contains Strings changes
|
896f7f1
to
00505b8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! Don't let any of these nitpicks get in the way of getting it in. It's more than 'good enough'
Mostly UI nitpicks:
Margins are off:
![Screenshot 2025-02-13 at 09 10 08](https://private-user-images.githubusercontent.com/62114487/412811218-686d1768-4fc1-4449-b08f-4cd3362a26ed.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1ODM1MjksIm5iZiI6MTczOTU4MzIyOSwicGF0aCI6Ii82MjExNDQ4Ny80MTI4MTEyMTgtNjg2ZDE3NjgtNGZjMS00NDQ5LWIwOGYtNGNkMzM2MmEyNmVkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDAxMzM0OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZjYzk2YjllYWE1MjU0ZTJhYmQ5ZjY4ZjRlZGNlN2ZjYTQyNmU1ODA5NTNiNGFjZGRiZWI1NjRhMjUyMTYxNTgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.k2YEFbFFuhoES9IHMHclSDHNlADLJ993GurZslJZxW4)
- add a little more spacing between the 'Select tags to exclude' and the list
- if there is a scrollbar, always show it in the selection dialog
- make the 'Select tags to exclude' label look like a title
- Anki replaces
"_"
with" "
when visually displaying tags in this screen. Optional if you want to do this - (optional/add as TODO): it feels like we want a ripple select
- I /think/ the highlighting should go away if a user unchecks the checkbox
AnkiDroid/src/main/java/com/ichi2/anki/dialogs/customstudy/IncludedExcludedTagsAdapter.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/dialogs/customstudy/IncludedExcludedTagsAdapter.kt
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/dialogs/customstudy/CustomStudyDialog.kt
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/dialogs/customstudy/CustomStudyDialog.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/dialogs/customstudy/CustomStudyDialog.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/dialogs/customstudy/IncludedExcludedTagsAdapter.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/dialogs/customstudy/IncludedExcludedTagsAdapter.kt
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/dialogs/customstudy/TagLimitFragment.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/dialogs/customstudy/TagLimitFragment.kt
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/dialogs/customstudy/TagLimitFragment.kt
Outdated
Show resolved
Hide resolved
This is a no-op commit that adds the required code for CustomStudyDialog to handle the STUDY_TAGS option like the other paths. The new code is not used yet as the dialog will still go through TagsDialog. For tags, the ui will show an input box to enter the amount of cards(like the other options) but it will also show a Spinner with 4 entries to select a card state to further limit the cards available for studying. The enum CustomStudyCardState models the 4 cards states the user can select from before selecting the tags.
a2540a4
to
3dd0757
Compare
Folow ui/functionality from desktop. A new dialog(instead of using/absuing TagsDialog), TagLimit, was created to show the same ui as desktop.
3dd0757
to
e2fcdc7
Compare
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like a minor re-think of the design of "select tags to exclude", as it still doesn't fully feel like a title
But this is great
AnkiDroid/src/main/java/com/ichi2/anki/dialogs/customstudy/CustomStudyDialog.kt
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/dialogs/customstudy/IncludedExcludedTagsAdapter.kt
Show resolved
Hide resolved
position: Int, | ||
) { | ||
val model = tags[position] | ||
holder.tagView.text = model.name.replace("_", " ") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be tempted to name this label
, or userFacingLabel
on the class
Purpose / Description
Enables for the app the full desktop functionality related to custom study by tags. Some notes related to the implementation:
How it looks on mobile
How it looks on desktop
Fixes
How Has This Been Tested?
Ran the tests, manually verified the new dialogs/code paths.
Checklist