Anki/rslib/src
RumovZ 6ac2d5eb66 Merging Notetypes on Import (#2612)
* Remember original id when importing notetype

* Reuse notetypes with matching original id

* Add field and template ids

* Enable merging imported notetypes

* Fix test

Note should be updated if the incoming note's notetype is
remapped to the existing note's notetype.
On the other hand, it should be skipped if its notetype id is mapped
to some new notetype.

* Change field and template ids to i32

* Add merge notetypes flag to proto message

* Add dialog for apkg import

* Move HelpModal into components

* Generalize import dialog

* Move SettingTitle into components

* Add help modal to ImportAnkiPackagePage

* Move SwitchRow into components

* Fix backend method import

* Make testable in browser

* Fix broken modal

* Wrap in container and fix margins

* Update commented Anki version of new proto fields

* Check ids when comparing notetype schemas

* Add tooltip for merging notetypes.

* Allow updating notes regardless of mtime

* Gitignore yarn-error.log

* Allow updating notetypes regardless of mtime

* Fix apkg help carousel

* Use i64s for template and field ids

* Add option to omit importing scheduling info

* Restore last settings in apkg import dialog

* Display error when getting metadata in webview

* Update manual links for apkg importing

* Apply suggestions from code review

Co-authored-by: Damien Elmes <dae@users.noreply.github.com>

* Omit schduling -> Import all cards as new cards

* Tweak importing-update-notes-help

* UpdateCondition → ImportAnkiPackageUpdateCondition

* Load keyboard.ftl

* Skip updating dupes in 'update alwyas' case

* Explain more when merging notetypes is required

* "omit scheduling" → "with scheduling"

* Skip updating notetype dupes if 'update always'

* Merge duplicated notetypes from previous imports

* Fix rebase aftermath

* Fix panic when merging

* Clarify 'update notetypes' help

* Mention 'merge notetypes' in the log

* Add a test which covers the previously panicking path

* Use nested ftl messages to ensure consistency

* Make order of merged fields deterministic

* Rewrite test to trigger panic

* Update version comment on new fields
2023-09-09 09:00:55 +10:00
..
ankidroid Refactor service generation (#2552) 2023-06-19 15:33:40 +10:00
backend Wrap backend in an outer Arc 2023-09-07 14:10:50 +10:00
card Make some more fields/methods public 2023-06-20 21:59:49 +10:00
card_rendering Avoid allocating in extract_latex() if possible; make public 2023-08-19 08:05:39 +10:00
collection Drop legacy schema option 2023-09-06 15:49:14 +10:00
config Merging Notetypes on Import (#2612) 2023-09-09 09:00:55 +10:00
deckconfig Integrate the FSRS optimizer (#2633) 2023-09-05 18:45:05 +10:00
decks Update nightly formatter 2023-09-02 16:13:50 +10:00
error Fix stack overflow in request::Error mapping 2023-09-05 15:27:17 +10:00
i18n Refactor service generation (#2552) 2023-06-19 15:33:40 +10:00
image_occlusion Merging Notetypes on Import (#2612) 2023-09-09 09:00:55 +10:00
import_export Merging Notetypes on Import (#2612) 2023-09-09 09:00:55 +10:00
media Merging Notetypes on Import (#2612) 2023-09-09 09:00:55 +10:00
notes Make some more fields/methods public 2023-06-20 21:59:49 +10:00
notetype Merging Notetypes on Import (#2612) 2023-09-09 09:00:55 +10:00
revlog Bump Rust version 2023-03-31 14:11:33 +10:00
scheduler Integrate the FSRS optimizer (#2633) 2023-09-05 18:45:05 +10:00
search Merging Notetypes on Import (#2612) 2023-09-09 09:00:55 +10:00
stats Update nightly formatter 2023-09-02 16:13:50 +10:00
storage Merging Notetypes on Import (#2612) 2023-09-09 09:00:55 +10:00
sync Change Anki's version scheme; bump to 23.09 (#2640) 2023-09-07 12:37:15 +10:00
tags Refactor service generation (#2552) 2023-06-19 15:33:40 +10:00
undo Fix invalid ids on db check (#2445) 2023-03-19 10:58:35 +10:00
adding.rs Default to current deck in csv import if settings allow it (#2527) 2023-05-31 13:47:12 +10:00
browser_table.rs Rework RenderCardOutput::question/answer 2023-06-27 00:37:41 +10:00
cloze.rs Update nightly formatter 2023-09-02 16:13:50 +10:00
dbcheck.rs Update nightly formatter 2023-09-02 16:13:50 +10:00
findreplace.rs Fix invalid ids on db check (#2445) 2023-03-19 10:58:35 +10:00
latex.rs Fix clippy issues in Rust 1.72 2023-08-25 07:56:38 +10:00
lib.rs Refactor service generation (#2552) 2023-06-19 15:33:40 +10:00
links.rs Fix importing link 2023-08-31 07:52:21 +10:00
log.rs Update Rust deps (#2332) 2023-01-18 22:24:29 +10:00
markdown.rs Switch Rust import style (#2330) 2023-01-18 21:39:55 +10:00
ops.rs Feature image occlusion (#2367) 2023-03-29 12:33:19 +10:00
preferences.rs Move generated protobuf into anki_proto 2023-06-12 15:47:51 +10:00
prelude.rs Move generated protobuf into anki_proto 2023-06-12 15:47:51 +10:00
progress.rs Wrap backend in an outer Arc 2023-09-07 14:10:50 +10:00
serde.rs Take another approach to dealing with conflicting flattened keys 2023-08-15 11:25:53 +10:00
services.rs Refactor service generation (#2552) 2023-06-19 15:33:40 +10:00
template.rs Update nightly formatter 2023-09-02 16:13:50 +10:00
template_filters.rs Fix clippy issues in Rust 1.72 2023-08-25 07:56:38 +10:00
tests.rs Merging Notetypes on Import (#2612) 2023-09-09 09:00:55 +10:00
text.rs Fix clippy issues in Rust 1.72 2023-08-25 07:56:38 +10:00
timestamp.rs Add time of date to browser date columns 2023-03-26 14:49:49 +10:00
typeanswer.rs Fix clippy issues in Rust 1.72 2023-08-25 07:56:38 +10:00
types.rs update scheduling ops 2021-04-06 16:38:42 +10:00
version.rs Rework syncing code, and replace local sync server (#2329) 2023-01-18 12:43:46 +10:00