* Keep filtered decks when importing apkg
If all original decks exist and scheduling is included.
* Create missing decks from csv
* Export original decks if with_scheduling
* Also remap original deck ids on import
* Update imported filtered decks
* Fix meta column being mapped to tags
* Fix ids in csv deck and notetype columns
Note: This implies names which parse to an i64 will be seen as ids,
likely resulting in the intended deck/notetype not being found.
* Check for scheduling with revlog and deck configs
Might help with cases in which scheduling was included, but all cards
are new. In such a case, filtered deck should not be converted.
* Fix duplicate with same GUID being created
* Remove redundant `distinct`s from sql query
* Match notes by _either_ guid _or_ first field
* Refactor to emphasise GUID/first field distinction
* Export default deck and config if with scheduling
* Fix default deck being exported if it's a parent
* Add card meta for persisting custom scheduling state
* Rename meta -> custom_data
* Enforce limits on size of custom data
Large values will slow down table scans of the cards table, and it's
easier to be strict now and possibly relax things in the future than
the opposite.
* Pack card states and customData into a single message
+ default customData to empty if it can't be parsed
Co-authored-by: Damien Elmes <gpg@ankiweb.net>
* Introduce setting to collapse field by default
* Fix schema order
* Change wording from adjective to imperative
sounds a bit less clunky
* Update rslib/src/notetype/schema11.rs (dae)
* Keep settings in single column
* Add back Toggle Visual Editor string
* Add RichTextBadge component and show it conditionally
* Reverse input order depending on default setting
* Make PlainTextInput border-radius responsive to toggle states
* Prevent first Collapsible transition differently
* Focus inputs after Collapsible transition
The double tick calls are just a temporary solution until I find the exact moment an input is focusable again.
* Use requestAnimationFrame to await focusable state
Note: Svelte tick doesn't seem to work in this scenario.
* make dvipng use transparent background by default
Note that if using all-lowercase 'transparent', it will give "a simple fully transparent background with non-transparent antialiased pixels", which is unnecessary.
* latex.py: format
I suspect the PyQt maintainer uploaded a new wheel and yanked the old
one, which made pip fall back on a source install which failed. If that's
the case, he really should have used a new version number, as this makes
building/bisecting older releases more cumbersome.
* Make all Anki-native exceptions inherit from same base class
Allows add-ons to easily catch all Anki-native exceptions without being coupled to the currently implemented exceptions.
* Satisfy pylint
* Keep content of unmapped fields when importing
* Test new behaviour
* Fix typo in `canonify_tags_without_resgistering`
* Log updated note instead of original one
* Revert merging imported tags
But keep old note tags if no new ones are provided.
* Add MessageBox class and associated funcs to aqt.utils and update some callers in aqt.sync and aqt.addons
* Cleanup imports in aqt.sync
* Fix return values for ask_user and ask_user_dialog
* Fix wrong argument name in aqt.utils.ask_user
* Add type annotations to **kwargs in utils.py
* Type annotation for callback in aqt.sync.full_sync
* MessageBox accepts StandardButton in addition to str, fix linting issues
* Assess default buttons in correct order and return correct button name in MessageBox
* Add explicit Optionals in aqt.utils
* Pass button index to callback in MessageBox
* Update type hints for aqt.utils.MessageBox
* Use Sequence for aqt.utils.MessageBox buttons arg
* default_button > default_yes in aqt.utils.ask_user
* Dark mode question icon in aqt.utils.MessageBox
* Adjust size of legacy buttons
* Revert "Adjust size of legacy buttons"
This reverts commit fb888fe1db9050c34b1a7b0820e6da5ac91ccee6.
* Remove unused function from #1476
* Use outline version for tag icon
* Add chevron icons
* Remove code icons, keep one pin icon version
* Add code-bg color
* Redesign fields
* Remove unused import
* Fix imports
* Move PlainTextBadge between editing inputs
where it belongs :)
* Make whole separator line clickable
* Fix transition
and format
* Don't show toggle when field is collapsed
* Show toggle only on hover
for mobile I'd like to implement a swipe mechanism.
* Use tweened SVG for triangle instead of CSS hack
* Implement more obvious HTML toggle on bottom right
* Reduce field height by a few pixels
* Reduce field height by two pixels
* Show HTML toggle when PlainTextInput is active, regardless of hover/focus
* Remove RichTextBadge.svelte
* Create separate collapsed field state
this means users can collapse fields with the HTML editor open and it will stay open when the field is expanded again.
* Add slide out animation to EditingArea, RichTextInput and PlainTextInput
only for collapsing, because it is choppy on expansion (common issue with Svelte transitions).
* Fix aliasing issue on focused field corners
* Make StickyBadge feel more responsive
* Move StickyBadge closer to field border
* Adjust field gutter/margins
* Make LabelContainer sticky
to make field operations accessible on fields with a lot of content.
* Add back html icons, remove visual editor icons
* Revert "Add code-bg color"
This reverts commit 4200f354193710b3acd9bcf84b67958e200ddcdb.
* Add rich text icon, remove strikethrough code icon
* Revert PlainTextBadge to original position
* Adjust margins in FieldState
* Rename PlainTextBadge to SecondaryInputBadge
in preparation for #1987
* Run eslint and prettier
* Make whole LabelContainer clickable area for collapse/expand
* Revert "Add slide out animation to EditingArea, RichTextInput and PlainTextInput"
This reverts commit 9a2b3410d0ead37ae1da408d68e14507a058a613.
* Fix error on collapse/expansion
this was caused by the {#if} blocks, which resulted in the deletion of original EditingAreas.
* Refocus when toggling chevron and secondary input badge
* Revert "Revert "Add code-bg color""
This reverts commit 1cfd3bda65354ab90c1ab4cbbef47596a1be8754.
* Use single rotating chevron icon and make it RTL-compatible
* Remove redundant CSS transition rule
* Introduce animated Collapsible component and fix refocus on toggle
* Do not try to force repaint, as it is not required
* Remove RTL store from LabelContainer
the direction is already applied globally.
* Collapse secondary input with field
* Add focusedField to NoteEditorAPI
* Replace :global CSS selector with class .visible
thus removing the assumption that the component is used inside an EditorField.
https://github.com/ankitects/anki/pull/2002#discussion_r944876448
* Use named function syntax instead of function expressions
* Add explanation comment
* Remove unnecessary :bind directive
* Create CollapseBadge component
* Move :global selector into .plain-text-input
* Add comment explaining box-shadow pseudo-element
* Move Collapsible from EditingArea, PlainTextInput and RichTextInput into user components
* Rename SecondaryInputBadge to PlainTextBadge and remove generalization logic
I kept the rich text icon inside icons.ts for future use.
* Sort imports
* Fix background-color for duplicates not showing
with yet another pseudo-element :)
The pseudo-element that covers up field borders on scroll caused this issue. Fighting fire with fire here.
* Increase size of plain text toggle to original value again
This makes the clickable area a bit bigger and looks slightly more consistent with StickyBadge.
* Scrap pseudo-element mess in LabelContainer and tackle the actual issue
* Add class .visible to StickyBadge too
This introduces a peculiar bug: The active prop of StickyBadge resets to false when the mouse leaves the field - regardless of the actual back-end value.
* Fix sticky badge resetting on mouseleave/blur
* Apply overflow: hidden only during transition
fixes MathJax handle getting cut off by fields
* Remove unused variable
* Fix visual bug caused by overflow:hidden not applying in time
I tried several asynchronous approaches, but they all caused issues: either they prevented the CSS transition or they made field inputs lose focus.
In the end I resorted to direct, synchronous DOM-manipulation and added an explanatory comment.
* Decrease Collapsible load time by blocking first transition
I noticed the sliding animation has a hefty performance impact when a large number of fields is loaded simultaneously.
Blocking the first transition (which isn't even visible) results in a big boost in load time.
* Replace usages of gap with margins for children
* Revert unnecessary removal of grid-gap definition
* Correct comments about flex-gap property
mistook that for grid-gap.
* Resolve style issues
* Add minimum targets to gap comment
Co-authored-by: Henrik Giesel <hengiesel@gmail.com>
* Remove overscroll-behavior: none for * (all elements)
* Revert "Remove overscroll-behavior: none for * (all elements)"
This reverts commit 189358908cecd03027e19d8fe47822735319ec17.
* Use body instead of *, but keep CSS rule
* Unify two CSS rules
* Introduce field setting to use plain text editor by default
* Remove leftover function from #1476
* Use boolean instead of string
* Simplify clear_other_field_duplicates
* Convert plain text key to camelCase
* Move HTML item below the existing checkbox, instead of to the right (dae)
Showing it on the right is more space efficient, but feels a bit
cluttered IMHO.
* Make private properties in Surrounder truly private
* Fix remove logic of Surrounder
* No reason for toggleTriggerRemove to be async
* Allow using alt-shift to set all remove formats but this one
* modifyFormat => updateFormat
* Fix formatting
* Export surrounder directly from RichTextInput
* Change wording in editor/surround
* Remove empty line
* Change wording
* Fix interfaces
* Add field description directly in NoteEditor
* Strip description logic from ContentEditable
* Make RichTextInput position: relative
* Make attachToShadow an async function
* Apply field styling to field description
* Show FieldDescription only if content empty
* Remove descriptionStore and descriptionKey
* Revert "Make attachToShadow an async function"
This reverts commit b62705eadf7335c7ee0c6c8797047e1f1ccdbf44.
SvelteActionReturnType does not accept Promise<void>
* Fix mess after merge commit
* Require registering surround formats
* Improve margins
* Remove right border on non-macOS systems
Would be interesting to know why this was implemented in the first place. Looks quite ugly on Linux.
* Add focus border
* Align height of toolbar icons with search bar
* Remove leftover f-strings
* call_add-on_update_after_initial_sync
* Add safeMode restriction
* check for anki update after other modal dialogs
* fix failing test
* make changes suggested in review
From [the documentation](https://docs.python.org/3.9/library/platform.html#platform.platform):
> Returns a single string identifying the underlying platform with as much useful information as possible.
The output is intended to be human readable rather than machine parseable. It may look different on different platforms and this is intended.
Changed in version 3.8: On macOS, the function now uses mac_ver(), if it returns a non-empty release string, to get the macOS version rather than the darwin version.
The main advantage of this change is that it provides the architecture of the platform, which is increasingly relevant as ARM systems are becoming more common.
The sidebar (QDockWidget) was not restored properly in some environments
when re-opening the browser if the browser was closed while maximized
under the condition that the window size in the normal window state was
very small.