Skip to content
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

fix: Prevent deck creation on 'Enter' key when deck name already exists #17175

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

Giyutomioka-SS
Copy link
Contributor

@Giyutomioka-SS Giyutomioka-SS commented Oct 1, 2024

Purpose / Description

Ensure that pressing the "Enter" key does not create a deck when the deck name already exists, providing a snackbar notification and keeping the dialog open for user correction.

Fixes

How Has This Been Tested?

Realme 6 (API-30) and Emulator

Screen Recording

video_2024-10-01_17-46-57.mp4

Checklist

Please, go through these checks before submitting the PR.

  • 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

Copy link
Member

@Arthur-Milchior Arthur-Milchior left a comment

Choose a reason for hiding this comment

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

Nice touch for the snackbar. Thanks a lot.
I think a short length would be far enough. Implementer choice.

I also think if we can't create the deck, we should return false. The shortcut was not actually used.

I don't know if the returned value is used by anything, so I won't block on this.

@Arthur-Milchior Arthur-Milchior added the Needs Second Approval Has one approval, one more approval to merge label Oct 2, 2024
@david-allison david-allison added Needs Author Reply Waiting for a reply from the original author Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) and removed Needs Second Approval Has one approval, one more approval to merge labels Oct 2, 2024
@david-allison david-allison added Strings and removed Needs Author Reply Waiting for a reply from the original author labels Oct 2, 2024
@david-allison
Copy link
Member

https://github.com/ankidroid/Anki-Android/actions/runs/11149038356

Strings are clear. Let's go

@david-allison david-allison added this pull request to the merge queue Oct 2, 2024
Merged via the queue into ankidroid:main with commit 23aa29b Oct 2, 2024
9 checks passed
@github-actions github-actions bot added this to the 2.19 release milestone Oct 2, 2024
Copy link
Contributor

github-actions bot commented Oct 2, 2024

Maintainers: Please Sync Translations to produce a commit with only the automated changes from this PR.

Read more about updating strings on the wiki,

@github-actions github-actions bot removed the Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) label Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deck picker "enter" key should not create the deck when the "ok" button is disabled
3 participants