-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Enhancement: Card Browser two taps to change column #17920
base: main
Are you sure you want to change the base?
Enhancement: Card Browser two taps to change column #17920
Conversation
Important Maintainers: This PR contains Strings changes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Particularly, I prefer the previews of the manage columns dialog because the previewed value is on a separate line
Agreed |
okay, I will do the changes |
AnkiDroid/src/main/java/com/ichi2/anki/browser/ColumnSelectionDialogFragment.kt
Outdated
Show resolved
Hide resolved
Note: strongly prefer to rebase onto We don't merge PRs with merge commits, so this would need to be squahsed |
3061d3c
to
4b0012a
Compare
bd70465
to
45afce7
Compare
45afce7
to
b64ce1b
Compare
- Single tap selects the column, triggering a dialog. - Dialog displays available columns along with a preview of their data. - Selecting a column from the dialog instantly updates it without reloading all columns.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cheers!
- There is no longer a ripple effect on the columns
- The title of the dialog needs a little more thought, just 'Sort Field' on its own isn't useful enough to a user
AnkiDroid/src/main/java/com/ichi2/anki/browser/ColumnSelectionDialogFragment.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/browser/ColumnSelectionDialogFragment.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/browser/ColumnSelectionDialogFragment.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/browser/ColumnSelectionDialogFragment.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/browser/ColumnSelectionDialogFragment.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/browser/CardBrowserViewModel.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/browser/CardBrowserViewModel.kt
Outdated
Show resolved
Hide resolved
- Moved to a dedicated XML layout file. - Replaced LiveData with Flow to simplify state management. - Used a compat method for improved cross-version support. - Updated dialog title to display 'Column: Sort Field' for better user clarity. Co-authored-by: David Allison <davidallisongithub@gmail.com>
Heyo @david-allison, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was pinged on Discord about this, but it doesn't seem like this is ready for re-review.
A number of my comments don't seem resolved/replied to
AnkiDroid/src/main/java/com/ichi2/anki/browser/ColumnSelectionDialogFragment.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/browser/ColumnSelectionDialogFragment.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/browser/ColumnSelectionDialogFragment.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/browser/CardBrowserViewModel.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/browser/CardBrowserViewModel.kt
Outdated
Show resolved
Hide resolved
6f7ce1d
to
246ac6d
Compare
- Used bundleOf instead of Bundle().apply for cleaner argument handling. - Made dialog title translatable for localization support. - Reverted Flow usage in fetchAvailableColumns as it was unnecessary.
246ac6d
to
3208589
Compare
@Siddheshjondhale When you get a chance, could you mark the comments which are resolved as 'resolved'? I'll get around to another review once this is done |
- Reverted ColumnWithSample to ColumnHeading. - Updated ColumnHeading data class to include ankiColumnKey.
I have marked the comments as resolved that were resolved in the commits. I have also reverted the |
Purpose / Description
Added dialog on single-click of column name to show available columns for change, as mentioned in the issue.
Fixes
Approach
TextView
insidebrowser_column_headings
) to open a dialog.updateActiveColumns()
fromCardBrowserViewModel.kt
to apply the change without reloading all columns.How Has This Been Tested?
Tested by long-pressing the column heading to open the manage columns dialog and single-clicking to change columns, both functioning as expected. Physical Device: (Samsung Galaxy A6+)
Video:
WhatsApp.Video.2025-02-06.at.00.08.25_f20a952f.mp4
Checklist
Please, go through these checks before submitting the PR.