Skip to content
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

Reintroduce Deck Selector to Statistics Page #15197

Open
yellowjello opened this issue Jan 11, 2024 · 4 comments · May be fixed by #15648
Open

Reintroduce Deck Selector to Statistics Page #15197

yellowjello opened this issue Jan 11, 2024 · 4 comments · May be fixed by #15648
Assignees
Labels
Accepted Maintainers welcome a PR implementing this feature
Milestone

Comments

@yellowjello
Copy link
Contributor

yellowjello commented Jan 11, 2024

Is your feature request related to a problem? Please describe.
The old Statistics screen used to have a deck selector on top, making it easy to switch between different decks and see their statistics. However, this deck selector is no longer there in the new version of the Statistics screen.

Now, the only ways to switch the deck used for Statistics are:

  1. Select a deck to review (to switch the current deck), back out, then open Statistics
  2. Type in the deck name (which can be quite long) as a search query

Both of these options are quite awkward.

One thing to note is that both Anki Desktop and AnkiMobile have a deck selector available for their stats page, so AnkiDroid is actually missing functionality that is available in other parts of the Anki ecosystem.

Describe the solution you'd like
Ideally we add a deck picker to the top bar, which is where the old Statistics screen had the deck picker and is consistent with the Card Browser.

Implementation Notes
Both Anki Desktop and AnkiMobile implement the deck switching by having the Deck Selector set the Current Deck and then reloading the Statistics page.

However, taking the same approach and setting the Current Deck in the Statistics deck picker can be problematic with AnkiDroid's current UI flow, since the Statistics page is accessible from the Reviewer via the sidebar.

If we set the Current Deck in the Statistics deck picker, it will result in the reintroduction of this bug: #13442, which we have resolved for now precisely by not changing the Current Deck.

Some options to deal with this on the top of my head:

  1. Make the deck picker change the Current Deck and find another solution for dealing with the Reviewer state inconsistency issue (for example, it looks like Anki Desktop detects the change and refreshes the Reviewer upon return).
  2. Reworking the UI flow so that you have to exit the Reviewer in order to access the Card Browser or Statistics page.
  3. Find a way to expose a parameter for the deck in the Statistics webpage (will involve changing code in the Anki Desktop repo) and then pass in the selected deck without changing the Current Deck.
@david-allison david-allison added the Accepted Maintainers welcome a PR implementing this feature label Jan 11, 2024
@criticalAY
Copy link
Contributor

Taking it up

@user1823
Copy link
Contributor

user1823 commented Feb 4, 2024

Reworking the UI flow so that you have to exit the Reviewer in order to access the Card Browser or Statistics page.

In the Desktop version too, you don't have to exit the Reviewer to open the Stats page. But when you return to the reviewer after changing the current deck in the stats page, the reviewer refreshes. So, it doesn't show the "not at the top of queue" error. Rather, it shows the card from the cards from the currently (= newly) selected deck.

I think that the easiest solution is to copy the Desktop approach of refreshing the reviewer on returning if the current deck has changed.

@david-allison
Copy link
Member

david-allison commented Feb 10, 2024

Pending a discussion (almost certainly for 2.18 at the earliest)

Personally: if I switch decks in the reviewer or the Card Browser, I don't want the current review session's deck to change

We have JS API functionality which opens up a search during review. I wouldn't want opening the Browser to terminate the review sessions (for example: this is frustrating if a user is using the Timebox)

@criticalAY
Copy link
Contributor

Will do it after 2.17 sorry, and in favour of

I don't want the current review session's deck to change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Maintainers welcome a PR implementing this feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants