When a pop-up menu was closed by clicking on an empty space
outside the fields, the variable controlling the display state
was not changed, causing the pop-up menu to flash momentarily
the next time a field was focused.
The existing architecture serializes all cards and revlog entries in
the search range into a protobuf message, which the web frontend needs
to decode and then process. The thinking at the time was that this would
make it easier for add-ons to add extra graphs, but in the ~2.5 years
since the new graphs were introduced, no add-ons appear to have taken
advantage of it.
The cards and revlog entries can grow quite large on large collections -
on a collection I tested with approximately 2.5M reviews, the serialized
data is about 110MB, which is a lot to have to deserialize in JavaScript.
This commit shifts the preliminary processing of the data to the Rust end,
which means the data is able to be processed faster, and less needs to
be sent to the frontend. On the test collection above, this reduces the
serialized data from about 110MB to about 160KB, resulting in a more
than 2x performance improvement, and reducing frontend memory usage from
about 400MB to about 40MB.
This also makes #2043 more feasible - while it is still about 50-100%
slower than protobufjs, with the much smaller message size, the difference
is only about 10ms.
* Run cargo +nightly fmt
* Latest prost-build includes clippy workaround
* Tweak Rust protobuf imports
- Avoid use of stringify!(), as JetBrains editors get confused by it
- Stop merging all protobuf symbols into a single namespace
* Remove some unnecessary qualifications
Found via IntelliJ lint
* Migrate some asserts to assert_eq/ne
* Remove mention of node_modules exclusion
This no longer seems to be necessary after migrating away from Bazel,
and excluding it means TS/Svelte files can't be edited properly.
This reverts commit 09cb8b3cf6.
Overhead on larger folders/slower devices is more than I originally
anticipated, and can run into multiple seconds. This seems to be
particularly egregious on mobile, which I presume is due to sandboxing
overhead.
* Fix MathJax popup fails to appear when adding MathJax via Fx button
* Revert "Fix MathJax popup fails to appear when adding MathJax via Fx button"
This reverts commit 11115f59bcbde22bbc0448bfd6b86e887a8a56a7.
* Fix MathJax popup fails to appear when adding MathJax via Fx button
Use setTimeout() according to the PR review
This reverts commit 5dc79e22cd.
I appear to have been confused in my earlier testing, as reverting
this change seems to make no difference the top bar on first startup,
and fixes a bunch of other regressions that the original change introduced.
https://github.com/ankitects/anki/issues/2269
* Replace border-with inset shadow on button hover
* Align gradient-end with base color for primary buttons too
to achieve a more natural hover effect.
* Make SpinBox chevrons more subtle
and keep showing them when input is focused.
* Show chevrons only on hover
* Revert "Show chevrons only on hover"
This reverts commit 20e5ec169116fe3638c53c6ec414151d20c0de6b.
* Swap flag and mark indicator position in RTL mode
* Make buttons of bottom toolbar align to edge of screen in RTL mode
* Use start instead of left and end instead of right
Ensures the background is the correct color by the time the webview
is shown. We keep the #night check for now, as it's useful when testing
in an external browser.
The starting size of a webview seems to be 640x480, but if it is hidden
without retainSizeWhenHidden being set, the dialog it contains can end
up with a height of 0, which prevents the dialog from being shown.
By being explicit about our desired starting size, we can use a more
useful default, and avoid the issue of missing dialogs.
* Remove deprecated `and_hms()`
* Update chrono
* Update licenses and fix script
* Remove deprecated Date struct
* Remove chrono pin
* Skip format check on .vscode
Was failing for no reason.
* Replace deprecated chrono functions
* Add cargo-deny to update-licenses & pin versions (dae)
* Remove time 0.1 dependency (dae)
We don't need to wait for chrono 0.5; it was provided behind a legacy
feature flag.
* Facilitate updating of hooks
- Add instructions in contributing.md
- Change addon_config_editor_will_update_json hook to work with the new
hookslib code
* Fix typo in docs
* Always run replaced hook
* Use lowercase list for typing
* Forbid defining both a replaced and a legacy hook
* Persist collapsed- and field states with SessionOptions object
* Format types.ts
* Replace format function with f-string
* Give setters more descriptive parameter names
* Do not use default prefix for descriptions and fonts
since they are not meant to be changed via Svelte.
* Do not include oldIdx in Select change event
I included it due to confusion about the variable names in the Change Notetype components.
* Remove redundant on:change listener from NotetypeSelector
* Use Select component in Change Notetype MapperRow (again)
* Remove redundant --cols and --col-size definitions
Bootstrap divides rows into columns of equal width by default.
* Add highlight to active DropdownItem
* Remove bootstrap dropdown item styling
* Fix JS error on dropdown accept action
cause: When closing the dropdown, buttonRef was removed before the callback in setTimeout was run.