Skip to content

Fix #20475 improve labels in Deck dialogs#20492

Open
UdaybhanRaj-Dev wants to merge 1 commit intoankidroid:mainfrom
UdaybhanRaj-Dev:fix-deck-dialog-label-20475
Open

Fix #20475 improve labels in Deck dialogs#20492
UdaybhanRaj-Dev wants to merge 1 commit intoankidroid:mainfrom
UdaybhanRaj-Dev:fix-deck-dialog-label-20475

Conversation

@UdaybhanRaj-Dev
Copy link

@UdaybhanRaj-Dev UdaybhanRaj-Dev commented Mar 16, 2026

Purpose / Description

This PR improves the input field labels used in the following dialogs:

  • Create Deck
  • Create Subdeck
  • Rename Deck

Previously the dialog used a generic text input field without a clear label, which could make it unclear what users should enter.
This change adds contextual hints depending on the dialog type to improve clarity and user experience.

Fixes

Fixes #20475

Approach

The dialogs use a shared reusable layout dialog_generic_text_input.xml.
Instead of creating multiple layouts, the hint for the TextInputLayout is set dynamically in CreateDeckDialog.kt depending on the DeckDialogType.

The following hints are applied:

  • Create Deck → "Deck name"
  • Create Subdeck → "Sub deck name"
  • Rename Deck → "New deck name"

New string resources added:

  • deck_name
  • sub_deck_name
  • new_deck_name

This keeps the UI layout reusable while providing clearer input labels for each dialog.

How Has This Been Tested?

Tested locally by running the app and verifying the dialogs.

Steps:

  1. Open Create Deck dialog → shows hint "Deck name"
  2. Open Create Subdeck dialog → shows hint "Sub deck name"
  3. Open Rename Deck dialog → shows hint "New deck name"

Test environment:
Tested using a physical Android device and emulator

The existing validation and dialog behavior remain unchanged.

Learning (optional, can help others)

While working on this issue, I explored how reusable dialog layouts are implemented in the project and how TextInputLayout hints can be updated dynamically depending on dialog context.

Screenshots

Create Deck Create Subdeck Rename Deck
Screenshot_20260315_222225 Screenshot_20260315_222449 Screenshot_20260315_222417

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 UI Changes: You have tested your change using the Google Accessibility Scanner
    (https://play.google.com/store/apps/details?id=com.google.android.apps.accessibility.auditor)

@github-actions
Copy link
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

@manocormen
Copy link
Contributor

Hi. Just a couple of suggestions:

  • You may want to shorten your commit message; the PR template checklist asks to limit it to 50 chars.
  • More generally, you may want to keep the template checklist in your PR description, and tick items off as you complete them. Most notably, it'd be good to know if/how you've tested your PR.

@UdaybhanRaj-Dev
Copy link
Author

Hi. Just a couple of suggestions:

  • You may want to shorten your commit message; the PR template checklist asks to limit it to 50 chars.
  • More generally, you may want to keep the template checklist in your PR description, and tick items off as you complete them. Most notably, it'd be good to know if/how you've tested your PR.

Thank you for the suggestions. I have shortened the commit message and updated the PR description with the checklist and testing details.

@UdaybhanRaj-Dev UdaybhanRaj-Dev force-pushed the fix-deck-dialog-label-20475 branch from 2caf48f to b4ac4fd Compare March 16, 2026 12:57
@UdaybhanRaj-Dev UdaybhanRaj-Dev changed the title Improve labels in Create Deck, Create Subdeck, and Rename Deck dialogs (#20475) Fix #20475 improve labels in Deck dialogs Mar 16, 2026
@Ayush-Patel-56
Copy link
Contributor

Hi @UdaybhanRaj-Dev, using semantic commits is a good approach. Try to use that in future PRs.

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 "Create deck", "Create subdeck", and "Rename deck" dialogs

3 participants