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(card-template-editor): Add Restore to Default feature #17461

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

RobozinhoD
Copy link
Contributor

Fixes

Approach

Implemented these methods

https://github.com/ankitects/anki/blob/3c20b49ccac4da63a85bf65b89af845d1f4851fb/pylib/anki/stdmodels.py#L23-L59

Then made the equivalent dialogs

How Has This Been Tested?

1.webm
2.webm

Learning (optional, can help others)

Describe the research stage

Links to blog posts, patterns, libraries or addons used to solve this problem

Checklist

Please, go through these checks before submitting the PR.

  • 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

Copy link
Member

@david-allison david-allison left a comment

Choose a reason for hiding this comment

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

Looks great!

A few stylistic nitpicks I'd like sorting, primarily the comparison/documentation of != 0, as the functionality is not obvious to a reader

Could you add a few @NeedsTest annotations so we can get around to this in future

Copy link
Contributor

@criticalAY criticalAY left a comment

Choose a reason for hiding this comment

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

I am copy pasting it from discord ->

imo a rln b/w list index and enum can work or maybe create a temp model for future ref though the current approach will break for sure in case new kinds are added
plus the serialization fragility ig

@RobozinhoD
Copy link
Contributor Author

imo a rln b/w list index and enum can work or maybe create a temp model for future ref though the current approach will break for sure in case new kinds are added
plus the serialization fragility ig

I don't understand what you mean, but thanks anyway 😁

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.

Works well. Thanks!

@BrayanDSO BrayanDSO added Needs Second Approval Has one approval, one more approval to merge and removed Needs Author Reply Waiting for a reply from the original author Needs Review Has Conflicts labels Dec 14, 2024
@RobozinhoD
Copy link
Contributor Author

Hello @david-allison. Sorry for the ping, but I have addressed your requests. Will you take a look at this, please?

@david-allison
Copy link
Member

Please don't apologize, this shouldn't have sat for so long

Copy link
Member

@david-allison david-allison left a comment

Choose a reason for hiding this comment

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

Sorry this sat for so long!

Couple of questions, code quality is great!

Copy link
Member

@david-allison david-allison left a comment

Choose a reason for hiding this comment

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

Cheers!

@david-allison david-allison added this pull request to the merge queue Dec 17, 2024
Merged via the queue into ankidroid:main with commit fab4ed0 Dec 17, 2024
9 checks passed
@github-actions github-actions bot removed the Needs Second Approval Has one approval, one more approval to merge label Dec 17, 2024
@github-actions github-actions bot added this to the 2.21 release milestone Dec 17, 2024
@david-allison david-allison changed the title Add Restore to Default feature feat(card-template-editor): Add Restore to Default feature Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Card template editor: restore to default
4 participants