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

feat(deck-options): progress dialog for Optimize #17810

Merged
merged 3 commits into from
Jan 15, 2025

Conversation

david-allison
Copy link
Member

@david-allison david-allison commented Jan 14, 2025

Fixes

Approach

  • move to a UI backend method
  • Fix a bug in percentage calculation
  • Use the same progress extraction method as updateDeckConfigsRaw

How Has This Been Tested?

Screenshot 2025-01-14 at 09 06 48
old Screenshot 2025-01-14 at 01 26 19

Checklist

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

Percentage was incorrectly generated as an Int
@user1823
Copy link
Contributor

user1823 commented Jan 14, 2025

The optimizing presets message is technically incorrect. The parameters have been already optimized. It's just about the memory states of the cards being updated using the new parameters.

The optimizing presets message is appropriate for the optimize all presets button, though.

Here is the Anki code for reference:
https://github.com/ankitects/anki/blob/39e293b27d36318e00131fd10144755eec8d1922/qt/aqt/mediasrv.py#L455-L481

@david-allison david-allison added the Needs Author Reply Waiting for a reply from the original author label Jan 14, 2025
@david-allison
Copy link
Member Author

@user1823 that's what I get for trying this without a reference image 😁

Then again, it led to a bugfix, and it's one of those "5 minute" changes to fix

Thanks for the guidance!

`computeFsrsParams` now uses the same output as `updateDeckConfigsRaw`

* move from a collection to a UI method

Fixes 16642
@david-allison
Copy link
Member Author

david-allison commented Jan 14, 2025

I like this less (% progress is much easier to grok), but it's ecosystem compatible

Screenshot 2025-01-14 at 09 06 48

@david-allison david-allison removed the Needs Author Reply Waiting for a reply from the original author label Jan 14, 2025
Copy link
Member

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mikehardy mikehardy added Needs Second Approval Has one approval, one more approval to merge and removed Needs Review labels Jan 14, 2025
Copy link
Member

@BrayanDSO BrayanDSO left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@BrayanDSO BrayanDSO added Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) and removed Needs Second Approval Has one approval, one more approval to merge labels Jan 15, 2025
@BrayanDSO BrayanDSO added this pull request to the merge queue Jan 15, 2025
Merged via the queue into ankidroid:main with commit 1655499 Jan 15, 2025
9 checks passed
@github-actions github-actions bot added this to the 2.21 release milestone Jan 15, 2025
@github-actions github-actions bot removed the Pending Merge Things with approval that are waiting future merge (e.g. targets a future release, CI wait, etc) label Jan 15, 2025
@david-allison david-allison deleted the optimize-progress branch January 15, 2025 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show progress when updating FSRS memory states
4 participants