Skip to content

fix: improve Study by card state or tag dialog#20615

Closed
Hammadtanveer wants to merge 3 commits intoankidroid:mainfrom
Hammadtanveer:fix/issue/20601
Closed

fix: improve Study by card state or tag dialog#20615
Hammadtanveer wants to merge 3 commits intoankidroid:mainfrom
Hammadtanveer:fix/issue/20601

Conversation

@Hammadtanveer
Copy link
Copy Markdown
Contributor

@Hammadtanveer Hammadtanveer commented Mar 28, 2026

Purpose / Description

Improves the UI of Custom Study dialogs (Study by card state/tag and Review Ahead).

Removes extra text and makes the input clearer and more consistent.

Fixes

Approach

  • Added title to the dialog
  • Removed old select cards text
  • Added outlined text field with number of cards hint (only on Study by card state or tag)
  • Added select all on focus behavior
  • Changed button text to Create
  • Added inline red warning when no cards match
  • Button disables when warning shown
  • Button re-enables when user changes dropdown

Note: Two items from the issue are not addressed in this PR:

  • Input validation will be handled in a separate PR
  • Error dialog instead of inline warning when tags selected
    but no cards match is a backend level issue

How Has This Been Tested?

Tested on physical device (Android 14):

  • Dialog title visible on Study by card state or tag only
  • Number of cards hint visible on Study by card state or tag only
  • Other dialogs show no hint
  • Inline warning appears when no cards match
  • Button disabled with warning shown
  • Button re-enables on dropdown change
  • Create button visible on all custom study options

IMG_20260328_180048.jpg

Checklist

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens

@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

@ZornHadNoChoice
Copy link
Copy Markdown
Collaborator

Hi, a quick "visual review" from a non-dev:

  • The title of the PR doesn't match the changes (you changed the Review ahead dialog too).
  • The changes made to the Review ahead dialog aren't complete/are wrong.
  • Now that I see it, the "card”/"cards" unit is unnecessary.
  • There is an extra "Number of cards" in the Study by card state or tag dialog.
  • The red text is hard to read. It also needs more padding.
  • The numbers' backgrounds are white, is that normal?

@Hammadtanveer Hammadtanveer changed the title feat: improve study by card state or tag dialog Issue #20601 fix: improve Study by card state or tag dialog Mar 28, 2026
@DoomsCoder
Copy link
Copy Markdown
Contributor

Hi @Hammadtanveer 👋
One small thing I noticed. If there a fixed height set on the images, it might be better to remove it and keep the width around 300 to 350. It should make the screenshots easier to view and scroll.

Totally optional, just sharing 👍

@Hammadtanveer Hammadtanveer changed the title fix: improve Study by card state or tag dialog fix: improve Custom Study input dialogs UI Mar 28, 2026
@Hammadtanveer
Copy link
Copy Markdown
Contributor Author

Hi @ZornHadNoChoice, I’ve made all the updates please review when you have time.

@ZornHadNoChoice
Copy link
Copy Markdown
Collaborator

  • Looking at the linked issue, I see that it's only about the Study by card state or tag dialog. So unless it's a by-product of the changes to this dialog, no other dialogs should be changed.
  • The selection wasn't changed.

There are other things that I can't verify visually.

@Hammadtanveer Hammadtanveer changed the title fix: improve Custom Study input dialogs UI fix: improve Study by card state or tag dialog Apr 6, 2026
@Hammadtanveer
Copy link
Copy Markdown
Contributor Author

Hi @ZornHadNoChoice , thanks for reviewing.

I've updated the title to focus on just the "Study by card state or tag" dialog.

About the selection the "100" is a hint that clears when you start typing . Nothing extra needed there.

Let me know if I missed something. Thanks!

<string name="sentence_all_fields">All fields</string>
<string name="sentence_check_media_delete_unused">Delete unused</string>
<string name="sentence_choose_tags">Choose tags</string>
<string name="sentence_study_by_card_state_or_tag">Study by card state or tag</string>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This isn't necessary. the original string is in sentence case

android:id="@+id/details_edit_text_2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why was the margin removed?

// skip tag selection if there's no tags to select
if (nids.isEmpty()) {
launchCustomStudy(contextMenuOption, n)
binding.warningText.visibility = android.view.View.VISIBLE
Copy link
Copy Markdown
Member

@david-allison david-allison Apr 6, 2026

Choose a reason for hiding this comment

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

⚠️ This blocks a user from submitting if there's no tags

android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
style="@style/Widget.Material3.TextInputLayout.OutlinedBox">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This adds a white background to the text

Image

@david-allison
Copy link
Copy Markdown
Member

I'm closing this due to quality concerns, these issues should have been picked up during your testing.

@ZornHadNoChoice
Copy link
Copy Markdown
Collaborator

About the selection the "100" is a hint that clears when you start typing . Nothing extra needed there.

Just so that you know, one of the points in the attached issue is to change the selection, and it has a link to a PR that does that.

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.

Improve the Study by card state or tag dialog

4 participants