-
-
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
feat(browse): more than 2 columns #17781
feat(browse): more than 2 columns #17781
Conversation
Important Maintainers: This PR contains Strings changes
|
AnkiDroid/src/main/java/com/ichi2/anki/browser/BrowserColumnSelectionFragment.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/browser/BrowserColumnSelectionFragment.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/browser/BrowserMultiColumnAdapter.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/browser/BrowserMultiColumnAdapter.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/browser/BrowserMultiColumnAdapter.kt
Outdated
Show resolved
Hide resolved
AnkiDroid/src/main/java/com/ichi2/anki/browser/BrowserMultiColumnAdapter.kt
Outdated
Show resolved
Hide resolved
This comment was marked as resolved.
This comment was marked as resolved.
cc173fb
to
a072fbc
Compare
7e1bf25
to
54a640a
Compare
This comment was marked as outdated.
This comment was marked as outdated.
4a968f2
to
5676b32
Compare
Thanks for getting to this! I've moved to layouts and removed the 'disabled' status for the checkmark There's more to do with in-IDE layout previews (low priority. On me) Fixed: animations
Help Wanted
Anki-Android/AnkiDroid/src/main/java/com/ichi2/anki/browser/BrowserColumnSelectionFragment.kt Lines 113 to 114 in 5676b32
|
5676b32
to
3af3c04
Compare
651e63e
to
b01dba5
Compare
This should use the main view if available
Prep for a variable column count * replace `setColumn1(` with `setColumn(0, ` Issue 17780
21946d8
to
9141054
Compare
I've also improved the Using |
We introduce BrowserColumnSelectionFragment: a full screen dialog which allows a user to select and reorder the available columns in the Browse window There are two headings: 'active' & 'available' Headings are implemented as RecyclerView items, so dragging feels natural. Headings may not be dragged. It has two primary functions: * Drag to reorder * +/- to quickly add/remove from 'active' A 'preview' is obtained from the first row of the Browse window If there are no rows, there is no preview Issue 17780
A user can long press the column headings or edit them from the options to add/remove multiple columns Issue 17780
If a user is editing options and changes 'cards/notes' then they should be editing columns for their provided selection If a user saves columns, then reverts the switch, columns should not be updated Issue 17780
Added bonus: This means we can remove 'initCompleted' and don't need to handle flow re-subscription if the user moves from dark to light mode Fixes a bug in the Columns where the preview didn't remain if switching dark/light mode * make searchForCards non-blocking * stop refreshing searches unconditionally on state restore
* cards.reset() is no longer needed * onCleared is no longer needed: * It's called when the theme changes, and we didn't actually want this, as we wanted to persist the rows in the ViewModel
* After a collection change, `setActiveBrowserColumns` is reset * After a language change, column headers need to be updated Due to the language change, the activity goes through `onCreate`, so pick up this change on `onRestoreInstanceState` This was a good opportunity to decouple the column data and the column headings in the View Fixes 17803 Fixes 17367
9141054
to
9d80674
Compare
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.
Still LGTM, even better with the extension on the Dialog.
Did a strings sync in I'm out for now but will merge if not already done when I come back. |
Maintainers: Please Sync Translations to produce a commit with only the automated changes from this PR. Read more about updating strings on the wiki, |
Ooooo smells like new alpha time :-) |
Thanks for these great works! Has the following change been withdrawn?
(I skimmed through this PR page some times, but unfortunately could not find out what happened about it.) |
It was. I marked the comment as outdated, but should have communicated more. Apologies! I felt that this PR would already be a huge change to get in, and didn't want to change functionality, especially if it would act as a rationale to drag out the review. I figured it would be faster to do it in two PRs, and it's a trivial change now the PR is in. Needs a little discussion, I'm pretty ambivalent but happy to implement it |
Thank you for the clarification! I understand. |
Purpose / Description
Anki Desktop allows more than 2 columns in the Browse screen. Let's do the same for AnkiDroid
Fixes
Approach
The settings screen allows a user to reorder and 'select' usable columns
A full-screen dialog fragment with two headings: 'displayed' & 'available'
Headings are implemented as RecyclerView items, so dragging feels natural. Headings may not be dragged.
It has two primary functions:
A 'preview' is obtained from the first row of the Browse window. If there are no rows, there is no preview
How Has This Been Tested?
Unit tested, and tested on an API 32 emulator
Checklist