Anki-Android icon indicating copy to clipboard operation
Anki-Android copied to clipboard

[View binding] Dialogs package

Open Jatin887 opened this issue 3 years ago • 10 comments

Pull Request template

Purpose / Description

Added ViewBinding for

  1. LocaleSelectionDialog
  2. DeckSelectionDialog
  3. MediaCheckDialog
  4. ScopedStorageMigrationDialog

Fixes

Part of (https://github.com/ankidroid/Anki-Android/issues/11116)

Approach

Removed findViewById with the help of implementing binding class for all the files

How Has This Been Tested?

Physical Device OnePlus Nord2

Checklist

Please, go through these checks before submitting the PR.

  • [x] You have not changed whitespace unnecessarily (it makes diffs hard to read)
  • [x] You have a descriptive commit message with a short title (first line, max 50 chars).
  • [x] Your code follows the style of the project (e.g. never omit braces in if statements)
  • [x] You have commented your code, particularly in hard-to-understand areas
  • [x] 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

Jatin887 avatar May 10 '22 18:05 Jatin887

@david-allison the checks are failed because no viewBinding is available in buildGradle so when the pull request [https://github.com/ankidroid/Anki-Android/pull/11292] will be merged it will work fine image

Jatin887 avatar May 10 '22 19:05 Jatin887

This doesn't compile.

I thought you said you were going to put in one PR for this change?

david-allison avatar May 10 '22 19:05 david-allison

This doesn't compile.

I thought you said you were going to put in one PR for this change?

Because the main branch doesn't have viewBinding = true in buildGradle I added this in pull request [https://github.com/https://github.com/ankidroid/Anki-Android/pull/11292] no i clearly mentioned that i will open one pr for all the files which are available in each package of ichi2\anki and one commit for each file should i change the fomat? What's your opinion

Jatin887 avatar May 10 '22 19:05 Jatin887

I misread, apologies. How many PRs is this going to be?

david-allison avatar May 10 '22 19:05 david-allison

I misread, apologies. How many PRs is this going to be?

Approximately 4-5 Pull requests

Jatin887 avatar May 10 '22 19:05 Jatin887

That's fine with me. Could you 'draft' them until they're all ready?

david-allison avatar May 10 '22 19:05 david-allison

That's fine with me. Could you 'draft' them until they're all ready?

But all the checks for the pr's will going to be failed because this pr [https://github.com/ankidroid/Anki-Android/pull/11292] contain the changes in build gradle and that should be merged in main I guess to run all checks?

Jatin887 avatar May 10 '22 19:05 Jatin887

That's fine with me. Could you 'draft' them until they're all ready?

But all the checks for the pr's will going to be failed because this pr [https://github.com//pull/11292] contain the changes in build gradle and that should be merged in main I guess to run all checks?

I wouldn't be opposed to cherry picking one commit onto the 'tail' of each PR to get CI to go green, as long as the PRs are drafts (where 'tail' is the first commit in the PR, opposite of HEAD WRT the source of the branch)

david-allison avatar May 11 '22 04:05 david-allison

@Jatin887 You should add the code to enable viewBinding to all of your PRs. If you place the lines on the same position you shouldn't get a conflict and we get the ability to run the checks.

lukstbit avatar May 11 '22 09:05 lukstbit

Hello 👋, this PR has been opened for more than 2 months with no activity on it. If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing! You have 7 days until this gets closed automatically

github-actions[bot] avatar Aug 12 '22 09:08 github-actions[bot]

Hello 👋, this PR has been opened for more than 2 months with no activity on it. If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing! You have 7 days until this gets closed automatically

github-actions[bot] avatar Dec 11 '22 11:12 github-actions[bot]