Anki/ts/components
RumovZ 14de8451dc
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
..
Absolute.svelte Translate Editor entirely to Svelte (#1403) 2021-10-18 22:01:15 +10:00
BackendProgressIndicator.svelte Do not show [object Object] (#2636) 2023-09-04 11:17:42 +10:00
Badge.svelte Insert symbols overlay (#2051) 2022-09-10 18:46:59 +10:00
ButtonGroup.svelte Improved add-on extension API (#1626) 2022-02-03 14:52:11 +10:00
ButtonGroupItem.svelte Use eslint for sorting our imports (#1637) 2022-02-04 18:36:34 +10:00
ButtonToolbar.svelte UI size tweaks (#2184) 2022-11-23 16:50:15 +10:00
CheckBox.svelte Experiment with disabling prettier whitespace sensitivity 2023-06-01 11:11:26 +10:00
Col.svelte Redesign deck options screen, swap tooltips for help modals (#2139) 2022-10-25 16:18:50 +10:00
Collapsible.svelte Fix CodeMirror not properly sized when opening editor (#2426) 2023-03-08 19:46:50 +10:00
ConfigInput.svelte Merging Notetypes on Import (#2612) 2023-09-09 09:00:55 +10:00
Container.svelte Improved add-on extension API (#1626) 2022-02-03 14:52:11 +10:00
context-keys.ts Refactor Select component | Fix CSV import issue (#2227) 2022-12-01 19:24:26 +10:00
DropdownDivider.svelte WIP: Use our components in deckoptions sticky bar 2021-05-18 16:32:29 +02:00
DropdownItem.svelte Add style for disabled DropdownItem (#2265) 2022-12-11 13:06:18 +10:00
DynamicallySlottable.svelte Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
EnumSelector.svelte Merging Notetypes on Import (#2612) 2023-09-09 09:00:55 +10:00
EnumSelectorRow.svelte Merging Notetypes on Import (#2612) 2023-09-09 09:00:55 +10:00
ErrorPage.svelte Merging Notetypes on Import (#2612) 2023-09-09 09:00:55 +10:00
FloatingArrow.svelte Remove dark theme exclusive inset shadow from FloatingArrow (#2257) 2022-12-11 11:18:59 +10:00
helpers.ts Re-enable formatting for .ts files 2022-11-28 09:33:04 +10:00
HelpModal.svelte Merging Notetypes on Import (#2612) 2023-09-09 09:00:55 +10:00
HelpSection.svelte Merging Notetypes on Import (#2612) 2023-09-09 09:00:55 +10:00
IconButton.svelte UI size tweaks (#2184) 2022-11-23 16:50:15 +10:00
IconConstrain.svelte Redesign deck options inputs (#2082) 2022-09-27 12:16:45 +10:00
icons.ts Merging Notetypes on Import (#2612) 2023-09-09 09:00:55 +10:00
Item.svelte Improved add-on extension API (#1626) 2022-02-03 14:52:11 +10:00
Label.svelte Merging Notetypes on Import (#2612) 2023-09-09 09:00:55 +10:00
LabelButton.svelte Use a ninja variable for Protoc binary (#2345) 2023-01-23 20:44:47 +10:00
Popover.svelte Update to Svelte 4, and update most other JS deps (#2565) 2023-07-01 16:21:53 +10:00
resizable.ts Make tags editor resizable using Henrik's components (#2046) 2022-09-28 14:02:32 +10:00
RevertButton.svelte Merging Notetypes on Import (#2612) 2023-09-09 09:00:55 +10:00
Row.svelte Improved add-on extension API (#1626) 2022-02-03 14:52:11 +10:00
ScrollArea.svelte Update to Svelte 4, and update most other JS deps (#2565) 2023-07-01 16:21:53 +10:00
Select.svelte Update to Svelte 4, and update most other JS deps (#2565) 2023-07-01 16:21:53 +10:00
SelectOption.svelte Migrate to protobuf-es (#2547) 2023-06-14 22:47:37 +10:00
SettingTitle.svelte Merging Notetypes on Import (#2612) 2023-09-09 09:00:55 +10:00
Shortcut.svelte Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
Spacer.svelte Space out Sticky Bottom with Spacer component 2021-09-09 15:37:58 +02:00
SpinBox.svelte Detect incorrect usage of triple slash in TypeScript (#2524) 2023-05-26 12:49:44 +10:00
StickyContainer.svelte Redesign deck options inputs (#2082) 2022-09-27 12:16:45 +10:00
StickyHeader.svelte Merging Notetypes on Import (#2612) 2023-09-09 09:00:55 +10:00
Switch.svelte Update to Svelte 4, and update most other JS deps (#2565) 2023-07-01 16:21:53 +10:00
SwitchRow.svelte Merging Notetypes on Import (#2612) 2023-09-09 09:00:55 +10:00
TitledContainer.svelte Revamp Preferences, implement Minimalist Mode and Qt widget gallery to test GUI changes (#2289) 2023-01-18 21:24:16 +10:00
tsconfig.json update to latest rules_nodejs & switch to ts_project 2021-10-01 12:52:53 +10:00
types.ts Merging Notetypes on Import (#2612) 2023-09-09 09:00:55 +10:00
VirtualTable.svelte Improve presentation of importing results (#2568) 2023-08-02 20:29:44 +10:00
WithContext.svelte Use eslint for sorting our imports (#1637) 2022-02-04 18:36:34 +10:00
WithFloating.svelte Update to Svelte 4, and update most other JS deps (#2565) 2023-07-01 16:21:53 +10:00
WithOverlay.svelte Update to Svelte 4, and update most other JS deps (#2565) 2023-07-01 16:21:53 +10:00
WithState.svelte Use WithFloating for MathjaxOverlay (#2011) 2022-09-05 17:20:00 +10:00
WithTooltip.svelte Improve presentation of importing results (#2568) 2023-08-02 20:29:44 +10:00