Introduce ChangeNoteType Dialog
Purpose / Description
Introduces the changeNoteTypeDialog and changeNoteTypeViewModel
Fixes
- Fixes #14134
How Has This Been Tested?
Pixel 9 Pro (Android 1
Checklist
Please, go through these checks before submitting the PR.
- [x] You have a descriptive commit message with a short title (first line, max 50 chars).
- [x] You have commented your code, particularly in hard-to-understand areas
- [x] You have performed a self-review of your own code
- [x] UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
- [x] UI Changes: You have tested your change using the Google Accessibility Scanner
- ❗️ It doesn't like the fixed height of our spinner control - we should add an issue
[!IMPORTANT] Maintainers: This PR contains https://github.com/ankidroid/Anki-Android/labels/Strings changes
- Sync Translations before merging this PR and wait for the action to complete
- Review and merge the auto-generated PR in order to sync all user-submitted translations
- 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
Progress temporarily moved to https://github.com/david-allison/Anki-Android/commits/changeNT/. Still rough
I've finished this off with a small number of TODOs remaining and will leave someone else to get this over the finish line in terms of code.
I think we could merge as-is, but there are a few 'nice to haves' which aren't handled yet
I did not test:
- themes other than 'black'
- tablets
- RTL design
- ⚠️ saving and restoring instance state to
SaveHandle
- We don't show the user inputs anywhere in the dialog (selected input note type/ids)
- I don't like the centering of the 'output' template name, but can't figure a better way of doing this
- Long field/card names are a problem due to truncation
@Haz3-jolt I think this is done, if you have free time, could you take a look and be sure you're happy with my changes
@Haz3-jolt It's been a long time since I worked on it.
I believe I was happy at the time, but didn't want to approve my own work.
- Are there util changes which we can extract into a separate PR?
- Can we de-risk this by moving it behind a 'developer-only' flag?
@Haz3-jolt It's been a long time since I worked on it.
I believe I was happy at the time, but didn't want to approve my own work.
* Are there util changes which we can extract into a separate PR? * Can we de-risk this by moving it behind a 'developer-only' flag?
Hey!, currently caught in the middle of finals month, so been stuck with it for a while,
So far in terms of util changes, I wanted to splinter off ViewModelUtils.kt into a separate PR, but not much for the others, since the feature is kinda tightly coupled for all the new files.
And yeah I think we should do developer-only for now, change note type is extremely destructive similar to find-and-replace, plus we have no way of testing for every possible edge case until we get some proper user testing.
But from my testing so far, it does work as intended, and has parity with desktop, so it should be fine.
Also Anki shows a warning dialog, we should also do that and IMO it should not be difficult
Also Anki shows a warning dialog, we should also do that and IMO it should not be difficult
I'll address this tomorrow, it's getting late here.
Also Anki shows a warning dialog, we should also do that and IMO it should not be difficult
Is this something on the mac version? Isn't the case on Windows, it doesn't show up.
this.launchCatchingRequiringOneWaySync { should be showing the dialog; but we likely also want a better 'help' screen here
this.launchCatchingRequiringOneWaySync
I have quite a bit of free time this weekend, can you get me up to speed on what this screen will actually need? Do we copy the warning text on Anki on the Mac platform for our dialog? or do we create our own custom dialog.
(I wrote a reply and lost it, then encountered another bug when trying to test launchCatchingRequiringOneWaySync . I'm not going to have time to give an example, but it SHOULD appear if the user has an AnkiWeb account linked, sync, then uses this screen, and be similar to Anki Desktop):
- I want to focus on getting this merged as a developer setting, it should be good to go now
- I think we can get away with showing a message on the screen, before OK is pressed:
-
This operation requires a one-way sync of your collection [learn more]
-
- I'm concerned this has stalled (not your fault at all!), and I feel the above can be a TODO if this is merged as a developer-only/experimental option
- I'm going to have time for this in 2.24, please push me here, I really want this one in
Should be done with this!
The colors look off in night mode
Fixed!
