feat: New intuitive edit notetype field screen#20453
feat: New intuitive edit notetype field screen#20453S-H-Y-A wants to merge 19 commits intoankidroid:mainfrom
Conversation
Introduced viewModel to NoteTypeFieldEditor
Migrated from listview to recyclerview and Made it pssible to drag and drop or swipe to edit notetypeField, and edit field names directly. Rmoved menu buttons. Show the current language settings.
…celed. Reset view.transitionX by calling notifyItemChanged method.
Record changes to make it possible to undo from deck picker screen. Extra: undo delete multiple Notetypes operation at a once.
…ure in notetypefield screen.
Add save button to save all changes at once. Show undo snackbar when notetypefields are changed. Show one-way sync confirmation dialog before saving all changes.
…ze operations Fixed too fast drag speed when moving editing field. Fixed uncorrect rename operation. Use LinerLayout insted of ConstraintLayout to scroll smoothly. Did away with holding unsaved operation when Activity is recreated, avoiding operation stack inconsistency.
Ensure thread safety during diffing.
…er's confirmation
|
Important Maintainers: This PR contains Strings changes
|
This comment was marked as resolved.
This comment was marked as resolved.
Removed the confirmation dialog when deleting a field. Disabled individual undo actions for field operations except for delete. Cleaned up strings.
|
|
Hi again! Seeing that you've worked on this screen, would you consider updating the "Add field" dialog as in #18553? It's totally fine if you don't want to. The things that should be changed
Reference images |
Shold these changes be appiled to only the new filed dialog editext, or all edittexts? |
|
The red warning should be shown for the dialog as well as the edittexts (by which I assume you mean the input boxes containing the names of the fields). The name in the border should only be for the dialog. |
Extracted field name validation logic. Implemented real-time validation in the field editor. Use `ConstraintLayout` to avoid UI corruption when error/helper text is showed. Added a reset button in the text box to restore the original field name.
Re-enabled undo snackbar appearing when renaming a field, to notify users when users scroll recyclerview and the new name is automatically saved.
There was a problem hiding this comment.
Thank you for the PR.
For future contributions please wait a bit for feedback in the forums from a maintainer just so you are sure you don't work on something that might not be accepted.
This PR is really big and the proposed UI change has a lower priority so it will take a while until it could get discussed and merged. I recommend that you extract smaller PRs from this one to make it easier to review and to merge. A first PR could be the first two commits, once we get the ViewModel in then we could discuss the actual UI change.
Some other notes after a quick look:
- the third commit feels that is not needed, I don't see why all those classes were created
- string changes should be done only in the values folder, our automatic system will take care of the strings for the other languages
- I would expect for tests to be updated and not be deleted
- you can reduce the size of the image posted here in Android Studio(example 50%)
I'm on a rare break for a week, so It seems that I was feeling rushed to compelete this PR during that vacation. The answers to the questions:
|
|
(The same content with what I wrote in #20480) I have been working on this PR this week. |
No need to apologize in any way, it's perfectly fine. |








Purpose / Description
All actions in the note-type field screen are tucked away in the menu, and the UI is not intuitive. On this new screen, users can remove and reposition fields by dragging and dropping or swiping, and just tap buttons to change the sort field or language hint.
Approach
refactor
feature
How Has This Been Tested?
screen-20260313-191456-17733968665982.mp4
Physical Phone
Pixel 7a
Android16
Learning (optional, can help others)
https://forums.ankiweb.net/t/intuitive-field-management-screen/69113
https://developer.android.com/develop/ui/views/layout/recyclerview
Checklist
Please, go through these checks before submitting the PR.